(function($) {
	$.fn.menu = function(options) {
		var menu = this;
		
		$(this).find('li').each(function () {
			var li = this;
			
			if ($(this).find('ul')) {
				var mo_timeout;
				
				$(this).mouseover(function () {
					clearTimeout(mo_timeout);
					$(menu).find('li > ul').hide();
					$(this).find('ul').show();
				});
				$(this).mouseout(function () {
					var ul = this;
					mo_timeout = setTimeout(function () {
						$(ul).find('ul').hide();
					},400);
				});
			}
		});
	};
})(jQuery);


