$(document).ready(function() {
	var heightBlockMax=0;
	
	$('#tabs').tabs();
	
	$(".blockNewsletter input:text").bind("focus", function(){ if(this.value == "Votre e-mail") this.value = ""; });
	$(".blockNewsletter input:text").bind("blur", function(){ if(this.value == "") this.value = "Votre e-mail"; });
	
	if(document.getElementById('cp')) {
	  $(".agencies #cp").bind("focus", function(){ if(this.value == "Code postal") this.value = ""; });
	  $(".agencies #cp").bind("blur", function(){ if(this.value == "") this.value = "Code postal"; });
	}
	
	$(".tools input:text").eq(0).bind("focus", function(){ if(this.value == "E-mail de votre ami") this.value = ""; });
	$(".tools input:text").eq(0).bind("blur", function(){ if(this.value == "") this.value = "E-mail de votre ami"; });
	
	$(".tools input:text").eq(1).bind("focus", function(){ if(this.value == "Votre e-mail") this.value = ""; });
	$(".tools input:text").eq(1).bind("blur", function(){ if(this.value == "") this.value = "Votre e-mail"; });
	
	/* home */
	$(".containerBlockType1 .contentTop").each(function(){ if( $(this).height() > heightBlockMax ) heightBlockMax = $(this).height(); }); // get max height
	$(".containerBlockType1 .contentTop").each(function(){ $(this).css("height",heightBlockMax); }); // assign max height
	heightBlockMax=0;

	$(".containerBlockType1 .contentBottom").each(function(){ if( $(this).height() > heightBlockMax ) heightBlockMax = $(this).height(); }); // get max height
	$(".containerBlockType1 .contentBottom .offer").each(function(){ $(this).css("height", (heightBlockMax-11) ); }); // assign max height
	heightBlockMax=0;
	/* /home */
	
	$(".inside .containerBlockType1 .contentBottom .offer").each(function(){ $(this).css("height", "auto"); });
	
	$(".containerBlockType1").each(function(){ if( $(this).height() > heightBlockMax ) heightBlockMax = $(this).height(); }); // get max height
	$(".containerBlockType1").each(function(){ $(this).css("height",heightBlockMax); }); // assign max height
	heightBlockMax=0;
	
	/* detail agencie > reception */
	$(".receptionContainer li").each(function(){ if( $(this).height() > heightBlockMax ) heightBlockMax = $(this).height(); }); // get max height
	$(".receptionContainer li").each(function(){ $(this).css("height",heightBlockMax ); }); // assign max height
	heightBlockMax=0;
	
	/* block tools */
	/*$(".tools .send").click(function(){( $(".tools .formSend").is(":visible") ) ? $(".tools .formSend").hide().slideUp(500) : $(".tools .formSend").slideDown(500).show(); return false; });
	$(".tools .formSend").hide();
	$(".tools .formSend").after("<a href=\"javascript:window.print();\" class=\"print\">Imprimer</a>");*/
});