	$(document).ready(function(){
		//create thickboxify
		//$('img').thickboxify({oniframe:true});
		
		//Bannières Flash
		$("#div_entete embed").attr('height', '288');
		$("#div_entete embed").attr('width', '999');
		
		//Hauteur du contenue si plus petit que la hauteur de la page
		if($("#div_page").height() < $(window).height()){
			$("#div_content").height($(window).height()-$("#div_entete").height()-$("#div_pied").height());
		}
		//Hauteur du menu de gauche
		if($("#div_menu").height() < $("#div_content").height()){
			$("#div_menu").height($("#div_content").height());
		}
		else{
			//$("#div_content").height($("#div_menu").height());
			$("#div_content").css('min-height',$("#div_menu").height());
		}
		//Hauteur du contenue (texte)
		if($("#div_contenue").height() < ($("#div_content").height()-$("#div_pied2").height())){
			//$("#div_contenue").height($("#div_content").height()-$("#div_pied2").height());
			$("#div_contenue").css('min-height',$("#div_content").height()-$("#div_pied2").height());
		}
		
		//Patch s'il y a du contenue AJAX qui change la hauteur du contenue
		$("#div_content").bind( "resize", function(){
			$("#div_menu").height($("#div_content").height());
		});
		
		//Menu éclair au survol
		$("ul.eclair").hover(function(){
				$(this).find("a:not(:first)").show('blind');
			},
			function(){
				$(this).find("a:not(:first)").hide('blind');
			}
		);
	});
	
	function module_submit(form){
		$(form).ajaxSubmit({
			success: function(responseText, statusText, xhr, $form){
				if(responseText.substr(0,1)=='1'){
					alert(responseText.substr(1));
					$("input[type=text], select, textarea", form).val('');
					if($("input[name='redirurl']", form).val()!=""){
						document.location.href=$("input[name='redirurl']", form).val();
					}
				}
				else
					alert(responseText.substr(1));
				$("#captcha_reload").click();
				$("input[name='module_captcha_code']", form).val("");
			}
		});
	}
