$(document).ready(function(){
	$(function(){
			   
			   
			   
				$("#encart_sommaire .onglet").not(":first").hide();
				$("#encart_sommaire .onglet:first").addClass("actif");
				$("#menu_sommaire_bis li a:first").addClass("hover");
				$("#menu_sommaire li a:first, #menu_sommaire_bis li a:first").addClass("actif");
				
				$(".fermer_chapeau a").click(function(){
					$(".chapeau").animate({right:"-302px", opacity:"hide"});
				});
				
				$("#menu_sommaire li a, #menu_sommaire_bis li a").hover(function(){
					$(".chapeau").hide();
					$("#encart_sommaire .onglet").removeClass("actif");
					$("#menu_sommaire_bis li a").removeClass("hover");
					$("#menu_sommaire li a, #menu_sommaire_bis li a").parent("li").removeClass("actif");
					$("#encart_sommaire .onglet").fadeOut("normal");
					$(this.hash).fadeIn("normal", function() {
						$(".chapeau").css("right","-302px").addClass("bugfix").animate({right:"0", opacity:"show"});}
					).addClass("actif");
					$(this).addClass("hover");
					$(this).blur().parent("li").addClass("actif");
        			return false;										  
				});
				
				$(".photo").not(".not").each(function(){
				var infobulle = $(this).find("img").attr('alt');
				
					if (infobulle != "") {
						$("<div class='Title'></div>").text(infobulle).appendTo(this).hide();
					};
				});
				
				$(".photo img").mouseover(function(){
						$(this).parents(".photo").find(".Title").show();
				});
				
				$(".photo img").mouseout(function(){
						$(this).parents(".photo").find(".Title").blur().hide();
				});
				$(".Title").mouseover(function(){
						$(this).show();
				});
				$(".Title").mouseout(function(){
						$(this).hide();
				});
				

	});

});
