/* * Affichage d'un contenu suivant *  * @copyright	egzakt.com * * @version 	2007/06/05 * @package		EDU-083 * @author 		Emilie */function bloc_deroulant(objet) {		objet.next().slideToggle("normal");	objet.toggleClass("selected");	objet.parent().toggleClass("bloc_deroulant_selected");	return false;}function document_ready() {		// Blocs déroulants	$(".zone_deroulante:not(.ouvert)").hide();		$("a.lien_deroulant").click(		function(){			return bloc_deroulant($(this));		}	);		// Submit d'un form sur le keydown d'un champs pour IE	if (navigator.appName == "Microsoft Internet Explorer") {		$("input").keydown(function(e){			if(e.keyCode == 13) {				$(this).parents("form").submit();				return false;			}		});	}		$("table.tmpl_tableau_colore tbody tr:even").addClass("pair");		if(typeof jQuery.fn.fancybox == 'function') {		$("a.fancybox").fancybox({			'speedIn'		:	600, 			'speedOut'		:	200, 			'transitionIn'  :   'elastic',			'opacity'       :   true,			'titlePosition' :   'inside'		});	}		populate_inputs();}/* * Vérifier si une valeur alt="" est fournis au champs input et textarea * et si le input/textarea a l'attribut value vide, mettre la valeur du  * alt dans l'attribut value.  * * Était direct dans le .ready jusqu'a se que je remarque qu'il ne * s'appliquait pas au formulaire loader en ajax, maintenant on n'a qu'a * caller populate_inputs() sur le callback du load. */function populate_inputs() {	$("input,textarea").each(function(index) {		if ($(this).attr("alt") != "") {			if ($(this).val() == "") {				$(this).val($(this).attr("alt"));			}		}	});		$("input,textarea").focus(function(){		if ($(this).attr("alt") != "") {			if ($(this).val() == $(this).attr("alt")) {				$(this).val("");			}		}	});	$("input,textarea").blur(function(){		if ($(this).attr("alt") != "") {			if ($(this).val() == "") {				$(this).val($(this).attr("alt"));			}		}    });}
