(function($)
{
    var opts;

    var methods = {

        init : function(options)
        {
            opts = $.extend({},$.fn.nmenu.defaults,options);

            return this.each(function()
            {
                var menu_options = $('.menu_options',this);
                var default_height = menu_options.height();
                
                // set the default height to 0
                menu_options.css({'height':'0'});
                
                $(this).bind({
                
                	mouseover : function(){
                	
                		menu_options.stop().animate({height:default_height},{duration:300});
                	
                	},
                	
                	mouseout : function(){
                		menu_options.stop().animate({height:0},{duration:300});
                	}
                
                });
            });
        }
    };

	// ADD EXTRA METHODS HERE

    $.fn.nmenu = function(method)
    {
        if (methods[method])
        {
            return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
        }
        else if (typeof method === 'object' || !method)
        {
            return methods.init.apply(this, arguments);
        }
        else
        {
            $.error('Method ' + method + ' does not exist on jQuery.nmenu');
        }
    };

    $.fn.nmenu.defaults = {
		// DEFAULT CONFIG HERE
    };

})(jQuery);

$(function()
{
	$('ul.menu').nmenu();
});
