var obj = null;
function checkHover() {//fonction de disparition
	if (obj) {
		obj.children('ul').css({visibility: "hidden"});
	} //if
} //checkHover

 (function($){

	$.fn.mafonction = function(){
			
			var id='#'+this.attr('id');
			var sousmenu= '.sous'+this.attr('id');
			$(id+' > li').hover(function() {
				if (obj) {//condition d'initialisation du hover on initialise l'élèment
					obj.children('ul').css({visibility: "hidden"});
					obj.removeClass('hover');
					obj = null;
					
				}
				
				$(this).addClass('hover');
				$(this).children('ul').css({visibility: "visible",display: "none"}).slideDown(500);
				
			}, function() {
				obj = $(this);
				setTimeout(
					"checkHover()",
					0); 
				$(this).removeClass('hover');
			});
		};

	})(jQuery)
	
	
	/*
		faire cliniotter
		$('.SMoutils > li').hover(function(){
		$(this).fadeTo('slow', 0.6);
		$(this).fadeTo('normal', 1);});
	*/

