	var slidespeed=7000;
	
	function slideimages(actimg){
		pocet=$('.menucover>img').size();
		if (pocet && actimg<pocet){
			$('.menucover>img').fadeOut('slow');
			$('.menucover>img:eq('+actimg+')').fadeIn('slow');
			setTimeout("slideimages("+((actimg+1)%pocet)+")",slidespeed);
		}
	}

  $(document).ready(function(){
    countdown(10,06,11,00,00,1);
    $('img').closest('a[href$=jpg]').lightbox();
    $('#tabslist>li>a:first').css('borderLeft','none').attr('class','active');
    $('#tabslist>li>a').attr('href','javascript:;').click(function(){
        $('#tabs>div').hide();
        $('#tabs>div:eq('+$('#tabslist>li>a').index(this)+')').show();
        $('#tabslist>li>a').attr('class','inactive');
        $(this).attr('class','active');
       });
    $('#tabs>div').map(function(){
        if(!$(this).text()){
          $('#tabslist>li:eq('+($('#tabs>div').index(this))+')').hide();
        }
      }
    );
    $('#tabs>div:not(:first)').hide();
    $('.locations>li:first').attr('class','locfirst');
    $('.locations>li:last').attr('class','loclast');
    $('.locations>li>h4>a').click(function(){
      akt=$('.locations>li>h4>a').index(this);
      $('.locations>li>div:not(:eq('+akt+'))').slideUp('slow');
      if ($(this).closest('li').children('div:hidden').size()){
        $(this).closest('li').children('div').slideDown('slow');
        $('.locations>li>h4>a').attr('class','nonactive');
        $(this).attr('class','active');
        return false;
      }
    });
    $('.menucover>img:not(:first)').hide();
    $('.datepicker').datepicker();
    setTimeout("slideimages(1)",slidespeed);
  });
  
function countdown(year, month, day, hour, minute, format)
         {
         Today = new Date();
         Todays_Year = Today.getFullYear() - 2000;
         Todays_Month = Today.getMonth();                  
         
         //Convert both today's date and the target date into miliseconds.                           
         Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(), 
                                 Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();                                 
         Target_Date = (new Date(year, month - 1, day, hour, minute, 00)).getTime();                  
         
         //Find their difference, and convert that into seconds.                  
         Time_Left = Math.round((Target_Date - Todays_Date) / 1000);
         
         if(Time_Left < 0)
            Time_Left = 0;
            
        //More datailed.
        xdays = Math.floor(parseInt(Time_Left) / (60 * 60 * 24));
        Time_Left %= (60 * 60 * 24);
        xhours = Math.floor(Time_Left / (60 * 60));
        Time_Left %= (60 * 60);
        xminutes = Math.floor(Time_Left / 60);
        Time_Left %= 60;
        xseconds = Time_Left;
        
        $('#days').text(xdays);
        $('#hrs').text(xhours);
        $('#mins').text(xminutes);
        $('#sec').text(xseconds);
               
         setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000);
}
