// JavaScript Document

// initialise plugins
// jQuery(function(){
	// jQuery('ul.sf-menu').superfish({
			//delay:       1000,                            // one second delay on mouseout 
            //animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            //speed:       'fast',                          // faster animation speed 
       //      autoArrows:  false,                             // disable generation of arrow mark-up 
          //   dropShadows: false                              // disable drop shadows 
		// });
// });



$(document).ready(function(){


		$("div.gregor").hover(function() {
		$("div.gregor_leger").fadeIn(800);
	}, function() {
		$("div.gregor_leger").fadeOut(800);
	});
			
			
	$("div.tobias").hover(function() {
		$("div.tobias_leger").fadeIn(800);
	}, function() {
		$("div.tobias_leger").fadeOut(800);
	});	
			
			
				$('ul.sf-menu').superfish({
			//delay:       1000,                            // one second delay on mouseout 
            //animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            //speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                             // disable generation of arrow mark-up 
            dropShadows: false                              // disable drop shadows 
		});
			
			
			
			
			
			
			
				//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
	$('.accordionButton').click(function() {

		//REMOVE THE ON CLASS FROM ALL BUTTONS
		$('.accordionButton').removeClass('on');
		  
		//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
	 	$('.accordionContent').slideUp('normal');
   
		//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
		if($(this).next().is(':hidden') == true) {
			
			//ADD THE ON CLASS TO THE BUTTON
			$(this).addClass('on');
			  
			//OPEN THE SLIDE
			$(this).next().slideDown('normal');
		 } 
		  
	 });
	  
	
	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
	
	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 
	$('.accordionButton').mouseover(function() {
		$(this).addClass('over');
		
	//ON MOUSEOUT REMOVE THE OVER CLASS
	}).mouseout(function() {
		$(this).removeClass('over');										
	});
	
	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/
	
	
	/********************************************************************************************************************
	CLOSES ALL S ON PAGE LOAD
	********************************************************************************************************************/	
	$('.accordionContent').hide();

			
			
			
			
			

});


