(function($){
 	function hvmenuAffiche(elm,speed)
	{
		elm.stop(true,true).slideDown(speed);
	}
	
 	function hvmenuMasque(elm,speed)
	{
		elm.stop(true,true).slideUp(speed);	
	}
 
 
    //Attach this new method to jQuery
    $.fn.extend({
         
        //This is where you write your plugin's name
        hvmenu: function(speed,hauteur) {
 			
            //Iterate over the current set of matched elements
            return this.each(function() {
				$(this).css('height',hauteur);									  
				$(this).css('position','relative');
				$(this).children('div:eq(1)').css('position','absolute');
				$(this).children('div').css('top','0px');
				$(this).children('div').css('left','0px');
				
				$(this).children().children('div').each(function(){
					
					$(this).css('float','left');
					$(this).children('div:eq(0)').hide();
					$(this).children('div:eq(0)').css('width',$(this).children('div:eq(1)').css('width'));
					
					$(this).hover(
							function(){hvmenuAffiche($(this).children('div:eq(0)'),speed);},
							function(){hvmenuMasque($(this).children('div:eq(0)'),speed);}
						);
						
										
					
				});
				
			});
      }
  });
     
//pass jQuery to the function,
//So that we will able to use any valid Javascript variable name
//to replace "$" SIGN. But, we'll stick to $ (I like dollar sign: ) )      
})(jQuery);
