// site_global_params.js
// fichier javascript avec les paramètres récurrents du site

$(document).ready(function(){
	// construit le menu de sélection des langues ------------------------------------
    $("#lang li").hover(
        function(){ $("ul.cache", this).fadeIn("fast"); }, 
        function(){ $("ul.cache", this).fadeOut("fast"); } 
	
    );
	$("#lang li ul").hide();
	// ---- fin
	
	// construit le menu de navigation principal -------------------------------------
    $("#nav-principal li").hover(
			function(){ $("ul", this).fadeIn("fast"); }, 
			function() { } 
		);
    if (document.all) {
        $("#nav-principal li").hoverClass("sfHover");
    }
	// ---- fin

	

});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};

function getelementheight(cherche) {
	var maxh = 0;
	$(cherche).each(function(i){
		var height = $(this).height();
		//alert(height+'/ maxh:'+maxh);
		maxh = Math.max(height,maxh);			
	});
	//alert('maxh:'+maxh);
	return maxh;
}