$(document).ready(function() 
{
	$(".pasliresuite").hide(); 
	$(".off").hide(); 
	$(".element").hide(); 
	$(".elementie").hide(); 
	$(".on").show(); 
	$('.toggler').click(function() 
	{
		if($(this).next(".element:visible").length == 0)
		{
			
			$(".element").slideUp("normal"); 
			$(".liresuite",this).hide(500);
			$(".pasliresuite",this).show(500);
			$(this).next(".element").slideDown("normal"); 

		}
		else
		{
			$(".liresuite",this).show(500);
			$(".pasliresuite",this).hide(500);
			$(".element").slideUp("normal");

		}
		return false;
		
	}); 
	$('.togglerie').click(function() 
	{
		if($(this).next(".elementie:visible").length == 0)
		{
			
			$(".elementie").slideUp("normal"); 
			$(".liresuite",this).hide(500);
			$(".pasliresuite",this).show(500);
			$(this).next(".elementie").slideDown("normal"); 
			
		}
		else
		{
			$(".liresuite",this).show(500);
			$(".pasliresuite",this).hide(500);
			$(".elementie").slideUp("normal");
			
		}
		return false;
		
	});

	
	window.onload = function () {
	   $('.diaporama').cycle( 
		{
			/*fx:     'scrollHorz', 
			speed:   4000, 
			timeout: 2000,*/
			fx:     'fade', 
			speed:   1000, 
			timeout: 6000,
			next:   '#next2', 
			prev:   '#prev2' 
		});
		$('.diaporamacom').cycle({ 
			fx:   'shuffle', 
			shuffle: { 
			left:  560 
			}, 
			next:   '#nextcom', 
			prev:   '#prevcom',
			timeout: 0, 
			speed:   500
		});
		
		
		$("#next2").hide();
		$("#prev2").hide();
		$('.diaporama').hover(function(){
			$("#next2").show(500);
			$("#prev2").show(500);
 
		});
		$('.general').hover(function(){
			$("#next2").hide(200);
			$("#prev2").hide(200);
 
		});
	}
});

