$(document).ready(function() {
	
	
	$(".accueil #text hr:eq(0)").prev("p").each(function(){
		$(this).wrapAll("<div id='division'></div>");
	});
	
	$(".accueil #division").after("<div id='divFilm'></div>");
	$("#divFilm").after("<div id='divMat'></div>");
	
	$(".accueil #text hr:eq(1)").nextAll("p").each(function(){
		$(this).appendTo("#divMat");
	});
	
	$(".accueil #text hr:eq(0)").nextAll("p").each(function(){
		$(this).appendTo("#divFilm");
	});
	
	$("#banner .first_level li").hover(function(){
	   $(this).addClass("iehover");
	 },function(){
	   $(this).removeClass("iehover");
	 });
	
	// $('.pageSommaire #main #text img').load(function() {
	// 		$(".pageSommaire #main .first_level").height($(".pageSommaire #main #text img").height()+1);
	// 	});
	
	
	$(".pageProd #text hr:eq(0)").next("p").each(function(){
			$(this).prependTo("#rightbar");
		});
		
		$(".pageProd #rightbar").height($("#article").height()-50);
		
		// if($(".pageProd #rightbar img").length == 0){
		// 			$("#rightbar").css({'display':'none'});
		// 			$("#article").width(700);
		// 		}

	
	
		
			
			

	
	

	
	
});


