$(document).ready(function() {
     // hides the slickbox as soon as the DOM is ready
      $('#header').hide();
      $('#footer').hide();
      $('#footer2').hide();
      $('#levy_panel_obsah').hide();
      $('#pravy_panel_obsah').hide();
      $('#tabs-1').hide();
      $('#menu').hide();
      $('#cara_menu').hide();
      $('#english').hide();
      $('#intro').hide();
      $('img#intro1').hide();
      $('img#intro2').hide();
      $('img#intro3').hide();
      
 
      
         function show8(){
                   $('#levy_panel_obsah').show("fold", { direction: "horizontal" }, 1000);
                   
                   };
                   
         function show1(){
                   $('#pravy_panel_obsah').show("fold", { direction: "horizontal" }, 1000);
                   
                   };
                   
         function show2(){
                   $('#footer').fadeIn("slow");
                   
                   };
         function show2b(){
                   $('#footer2').fadeIn("slow");
                   
                   };
         function show3(){
                   $('#header').fadeIn("slow");
                   
                   };
                   
       function show4(){
                    $('#tabs-1').show("fold", { direction: "horizontal" }, 1000);
                   
                   };
       function show5(){
                    $('#menu').fadeIn("slow");
                   
                   };
       function show6(){
                    $('#cara_menu').fadeIn("slow");
                   
                   };
       function show7(){
                    $('#english').fadeIn("slow");
                   
                   };
                   
       function show_intro(){                     $('#intro').fadeIn("fast");           };
       
       function show_intro1(){                    $('img#intro1').fadeIn("slow");           };
       function show_intro2(){                    $('img#intro2').fadeIn("slow");           };
       function show_intro3(){                    $('img#intro3').fadeIn("slow");           };
       
       function hide_intro1(){                    $('img#intro1').fadeOut("slow");           };
       function hide_intro2(){                    $('img#intro2').fadeOut("slow");           };
       function hide_intro3(){                    $('img#intro3').fadeOut("slow");           };
                   

                   
   ///    function show_intro1(){$('#intro1').fadeIn("slow");};
    //   function show_intro2(){$('#intro2').fadeIn("slow");};
    //   function show_intro3(){$('#intro3').fadeIn("slow");};
      
       window.setTimeout( show3, 300 );  
       window.setTimeout( show5, 600 );  
       window.setTimeout( show6, 600 );  
       window.setTimeout( show7, 600 ); 
       window.setTimeout( show8, 900 ); 
       window.setTimeout( show1, 1200 ); 
       window.setTimeout( show_intro, 1500 ); 
       window.setTimeout( intro, 1500 ); 
       window.setTimeout( show4, 1500 ); 
       window.setTimeout( show2, 2300 ); 
       window.setTimeout( show2b, 2400 ); 
       
       
       
       function intro(){  
                          window.setTimeout(show_intro1,1000);
                          window.setTimeout(hide_intro1,6000);
                          window.setTimeout(show_intro2,7000);
                          window.setTimeout(hide_intro2,13000);
                          window.setTimeout(show_intro3,14000);
                          window.setTimeout(hide_intro3,20000);
                           
                          window.setTimeout( intro,20000 ); 
                          
       };
                   
       
      
         /*    $(".resultsDisplay").click(function(event) {
              event.preventDefault();
              $.ajax({
                  url: $(this).attr("href"),
                  success: function(msg){
                       
                      $("#stredni_panel_obsah").html(msg);
                  }
              });
              return false;
          });*/

      
     
   
    });
    
    
    $(function(){
                                        
// Tabs
 
$('#tabs').tabs(
{
    
   
   fx: { 
   height: 'toggle', 
   opacity: 'toggle',
   duration: 'slow'                  
   }
   
   /*, 
        load: function(event, ui) {
            
       $('a', ui.panel).click(function() {
       $(ui.panel).load(this.href);
       return false;
       });
   
   }*/
   
});
/*
	$('a[href]').each(function(){
	    if(this.hash){
	        if($(this.hash + '.ui-tabs-panel') && $(this).parents('div.ui-tabs').length == 0 ){
            link = this.href.replace(this.hash, '');
	            page = window.location.href.replace(window.location.hash, '');
	            if(link == page || link == ''){
	                this.onclick = function(){
	                    $('.tabs').tabs('select', this.hash);
	                    return false;
	                }
	            }
	        }
	    }
	});
 */
$("#tabs").bind("tabsselect", function(e, tab) {
	     $('#footer').hide();  
       $('#footer2').hide();    
	       
          	     function show_popup(){
                   $('#footer').fadeIn("slow");
                   $('#footer2').fadeIn("slow");
                   
                   };
                   window.setTimeout( show_popup, 1500 ); 


	    });
	    

                                	
                                         				
	});
	/*
   $(function() {
        $('#pravy_panel_obsah').find("a").click(function() {
            $('#stredni_panel_obsah').load(this.href);
            return false;
        });
    });

	
*/
	
 
$('#tabs').tabs({
    load: function(event, ui) {
        $('a', ui.panel).click(function() {
            $(ui.panel).load(this.href);
            return false;
        });
    }
});
 
 

