//vision:0.91113
//o={speed:"time",start:"int",end:"int"}
//scroll nav
//
(function($){
	$.fn.scrollNav=function(o)
	{
		o=typeof(o)=="object"?o:{};
		var that=$(this);
		var reset=0;
		var current=that.filter(".current");
		var speed=o.speed||200;
		var start=that.not($(".current")).css("top")||o.start||"0";
		var end=($(this).parent().height()-$(this).height())||current.css("top")||o.end||"0";
		that.not($(".current")).hover(show,unshow);
		function show()
		{
			doAnimate.call(this,end);
			clearTimeout(reset);
			doAnimate.call(current,start);
		}
		function unshow()
		{
			doAnimate.call(this,start);
			clearTimeout(reset);
			reset=setTimeout(function(){doAnimate.call(current,end)},150);
		}
		function doAnimate(state)
		{
			$(this).stop().animate({top:state},speed);
		}
		return this;
	}
})(jQuery);
