(function($) {

    $.fn.ASKMenu = function(options)
    {
        var defaults = {
        };
        var options = $.extend(defaults, options);

    	return this.each(function() {

    		var $$ = $(this);
    		$$.children('li').each(function() {
    			var menu = $(this);
				var submenu = $(this).children('ul');

				$(this).mouseenter(function(e) {
    				$(this).siblings().each(function() {
    					$(this).children('ul').hide();
    				});
					submenu.show();
				}).mouseleave(function(e) {
    				$(this).siblings().each(function() {
    					$(this).children('ul').hide();
    				});
				});

				submenu.mouseleave(function(e) {
    				e.stopPropagation();
    				$(this).hide();
    			});

    		});

    	});
    };

})(jQuery);