$(document).ready(function(){
        /*FANCZYBOX*/
        $('.fancybox a').fancybox();

        /*DENNI MENU CAROUSEL*/
        $('#denniMenu').jcarousel({
                scroll: 1
        });
        
        /*RESTAURACE MENU*/
        $('.restauraceMenuTextPlace').html($('.restauraceMenuText:first').html())        
        $('.restauraceMenuLink:first').addClass('linkActive');
        
        $('a.restauraceMenuLink').click(function() {        
                if(!$(this).hasClass('linkActive')) {
                        $('.restauraceMenuLink').removeClass('linkActive');
                        $(this).addClass('linkActive');
                                                                  
                        $('.restauraceMenuTextPlace').html($(this).next('.restauraceMenuText').html());
                        Cufon.refresh();
                }
                return false;
        });        

        /*LAYER CITIES*/
        /*if($('.citiesLayer').length > 0){
                $(document, '.citiesLayer a.close').click(function() {
        		$('.citiesLayer').fadeOut();
        	});
        };		      
	$('#guidepost h4 a').click(function() {
                $('.citiesLayer').fadeOut();
		$(this).parent('h4').nextAll('.citiesLayer').fadeIn();
		$(this).parent('h4').nextAll('.citiesLayer').css('display','block');
		return false;
	});        */  
        
        /*LAYER HLEDAME POSILY*/
        if($('.jobsLayer').length > 0){
                $(document, '.jobsLayer a.close').click(function() {
        		$('.jobsLayer').fadeOut();
        		/*return false;*/
        	});
        };		        
	$('.phJobItem a.link').click(function() {
   //             $('.jobsLayer').fadeOut();
		//$(this).next('.jobsLayer').fadeIn();
		$(this).next('.jobsLayer').css('display','block');
		return false;
	});
	
	/*GALLERY*/
        $('a', '.galleryImgs li:first').addClass('active');
        $('.galleryImgs li a').click(function(){
                $('.galleryImgs li a').removeClass('active');
                $(this).addClass('active');
                $('.galleryImg img.galleryImage').attr('src', $(this).attr('href'));
                $('.galleryImg a').attr('href', $(this).attr('href'));
                return false;
        })
        
        
        $('a.noCarousel').click(function(){
                $('#denniMenuCarousel').css('width', 'auto');
                $('#denniMenuCarousel').css('left', '0');
                $('.jcarousel-next').remove();
                $('.jcarousel-prev').remove();
                $('#denniMenu h3').css('padding', '20px 0 5px 0');
                $('.weekmenu a.noCarousel').remove();
                $('.weekmenu').append('<a href="">Zpět na menu</a>');
                return false;
        }) 
        
        
});

