jQuery(document).ready(function() {
	
jQuery.fn.menuprojektclose = function()
	{
		//jQuery("#NaviProjekte").slideUp("slow");
		jQuery("#linkprojekte").removeClass('active');
        $('.projekt01').stop().animate({ opacity: 0.6 }, 300);
        $('.projekt02').stop().animate({ opacity: 0.6 }, 300);
        $('.projekt03').stop().animate({ opacity: 0.6 }, 300);	
	};


jQuery.fn.menuprojektopen = function()
	{
		//jQuery('#NaviProjekte').slideDown("slow");
		jQuery("#linkprojekte").addClass('active');
        $('.projekt01').stop().animate({ opacity: 1.0 }, 300);
        $('.projekt02').stop().animate({ opacity: 1.0 }, 300);
        $('.projekt03').stop().animate({ opacity: 1.0 }, 300);
	};



jQuery.fn.setanimation = function()
	{
	jQuery('#navigationContainer').mouseleave(function() { jQuery().menuprojektclose();}); 
	
	jQuery('#navigationtab01').mouseenter(function() { jQuery().menuprojektclose();});  	
	jQuery('#navigationtab02').mouseenter(function() { jQuery().menuprojektopen();});  	
	jQuery('#navigationtab03').mouseenter(function() { jQuery().menuprojektclose();}); 	
	jQuery('#navigationtab04').mouseenter(function() { jQuery().menuprojektclose();});  	
	jQuery('#navigationtab05').mouseenter(function() { jQuery().menuprojektclose();});  	

	jQuery('.projekt01').mouseenter(function() { jQuery().menuprojektopen();}); 	
	jQuery('.projekt02').mouseenter(function() { jQuery().menuprojektopen();});  	
	jQuery('.projekt03').mouseenter(function() { jQuery().menuprojektopen();});  	

	jQuery('#navigationtab01').mouseleave(function() { jQuery().menuprojektclose();});  	
	jQuery('#navigationtab03').mouseleave(function() { jQuery().menuprojektclose();}); 	
	jQuery('#navigationtab04').mouseleave(function() { jQuery().menuprojektclose();});  	
	jQuery('#navigationtab05').mouseleave(function() { jQuery().menuprojektclosex();});  	


	};
	
jQuery().setanimation();


//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Vertical Sliding
//Full Caption Sliding (Hidden to Visible)
	jQuery('.boxgrid.captionfull').hover(function(){
		jQuery(".cover", this).stop().animate({top:'180px'},{queue:false,duration:160});
		}, function() {
		jQuery(".cover", this).stop().animate({top:'258px'},{queue:false,duration:160});
	});
//Caption Sliding (Partially Hidden to Visible)

    
        $('.projekt01').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({ opacity: 1.0 }, 300);
            },
           function() {
               $(this).stop().animate({ opacity: 0.6 }, 300);
           });
        });

        $('.projekt02').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({ opacity: 1.0 }, 300);
            },
           function() {
               $(this).stop().animate({ opacity: 0.6 }, 300);
           });
        });

        $('.projekt03').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({ opacity: 1.0 }, 300);
            },
           function() {
               $(this).stop().animate({ opacity: 0.6 }, 300);
           });
        });

});

