(function($){
    $.fn.slidingNav = function(options){
        options = $.extend({
            speed: 500,
            reset: 1500
           // easing: 'easeOutExpo'
        }, options);
        
        return this.each(function(){
            var nav = $(this), blob, reset;
			var currentPageItem = nav.children('.active');
            $('<li id="blob"><span>&nbsp;</span></li>').appendTo(this).css({
                width: currentPageItem.first('a').width() + 20,
                left: currentPageItem.position().left - 10
            }).appendTo(this);
            
            blob = $('#blob', nav);
            
            $('li:not(#blob)', nav).hover(function(){
                // mouse over
                clearTimeout(reset);
                blob.animate({
                    left: $(this).position().left - 10,
                    width: $(this).first('a').width() + 20
                }, {
                    duration: options.speed,
                    easing: options.easing,
                    queue: false
                });
            }, function(){
                // mouse out	
                reset = setTimeout(function(){
                    blob.animate({
                        width: currentPageItem.first('a').width() + 20,
                        left: currentPageItem.position().left - 10
                    }, options.speed)
                }, options.reset);
                
            });
        }); // end each
    };
})(jQuery);



