$(document).ready(function(){
	
	/* Toggle Head topic */	
	$("#head_thematic #auteur .toggle:first").click(function(event, simulate){if(!simulate) $("#head_thematic .about a.toggle").trigger("click", [true]);});
	$("#head_thematic .about a.toggle").click(function(event, simulate){
		//Eviter une boucle infinie
		if(!simulate) $("#head_thematic #auteur .toggle:first").trigger("click", [true]);
		
		if(!$(this).hasClass("down")){
			contentHeight = $(this).prev().find(".left img").height() + 4;
			closeState = true;
		}else{
			contentHeight = Math.max($(this).prev().find(".left").height(), $(this).prev().find(".right").height());
			closeState = false;
		}
		$(this).toggleClass("down").toggleText(Drupal.t("Masquer"),Drupal.t("Read more")).prev().animate({
			height:contentHeight
		}, function(){
			if(closeState){
				$(this).css("overflow","hidden");
			}
		});
		return false;
	});

});;

