$(window).load(function () {
$("#thumbs").fadeIn(1500);
});


	jQuery(function($){ 
	 
	  var settings = { 
		thumbListId: "thumbs", 
		imgViewerId: "viewer", 
		activeClass: "active", 
		activeTitle: "Photo en cours de visualisation", 
	  }; 
	 
	  var thumbLinks = $("#"+settings.thumbListId).find("a"), 
		firstThumbLink = thumbLinks.eq(0), 
		highlight = function(elt){ 
		  thumbLinks.removeClass(settings.activeClass).removeAttr("title"); 
		  elt.addClass(settings.activeClass).attr("title",settings.activeTitle); 
		}, 
		loader = $(document.createElement("img")).attr({ 
		  alt: settings.loaderTitle, 
		}); 
	 
	  highlight(firstThumbLink); 
	 
	  $("#"+settings.thumbListId).before( 
		$(document.createElement("p")) 
		  .attr("id",settings.imgViewerId) 
		  .append( 
			$(document.createElement("img")).attr({ 
			  alt: "", 
			  src: firstThumbLink.attr("href") 
			}) 
		  ) 
	  ); 
	 
	  var imgViewer = $("#"+settings.imgViewerId), 
		bigPic = imgViewer.children("img"); 

	  thumbLinks 
		.click(function(e){ 
		  e.preventDefault(); 
		  var $this = $(this), 
			target = $this.attr("href");
				
		  if (bigPic.attr("src") == target) return; 
		  highlight($this); 
		  imgViewer.html(loader); 
		  bigPic 
			.load(function(){ 
			  imgViewer.html($(this).fadeIn(400)); 
			}) 
			.attr("src",target); 
		}); 
		

		var bool=false;
		$('#fleche').click(function() {
			
			if (!bool)
				{//$('#thumbs').slideUp("slow");
				bool=true;
				$('#fleche').attr("src","images/fleche_gauche.jpg");
				$(".partie2").show("slow");
				$(".partie1").hide();
				
				
				
				}
			else if (bool)
				{//$('#thumbs').slideDown("slow");
				bool=false;
				$('#fleche').attr("src","images/fleche_droite.jpg");
				$(".partie2").hide();
				$(".partie1").show("slow");
				}
		});

			$("#fleche").hover(
	function () {
	$(this).css('cursor','pointer');

	},
	function () {
	$(this).css('cursor','auto');
	}
	);

		
	});




