(function($){
    $.fn.showMenu = function(options){
        var $$ = $(this);
        offset = $$.offset();
        var defaults = {
            "start": 380,
            "stop": 2000,
            "coeff": 1,
			"toggle": 1
        };
        var opts = $.extend(defaults, options);
        return this.each(function(){
            $(window).bind('scroll', function() {
                windowTop = $(window).scrollTop();
                if((windowTop >= opts.start) && opts.toggle==1 && parseInt($$.css('margin-top'), 10)) {
					opts.toggle = 0;
					$$.stop(true).animate({
                        "margin-top": 0 + "px"
                    });
                }
				if((windowTop <= opts.start) && opts.toggle==0 && parseInt($$.css('margin-top'), 10) !== -65) {
					opts.toggle = 1;
					$$.stop(true).animate({
                        "margin-top": -65 + "px"
                    });
                }
            });
        });
    };
})(jQuery);
