!function(t){t.fn.jScroll=function(e){t.extend();return this.each(function(e){function o(t){a.css("top",t),d.css("margin-top",-t/(s.outerHeight()-a.outerHeight())*(d.outerHeight()-c.height()))}function n(t){var e=.1*f,n=t||window.event,i=n.wheelDelta||n.detail;if(navigator.userAgent.toLowerCase().indexOf("firefox")>=0&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1),-120==i||3==i){var r=a.position().top+e;return r>=f?(a.css("top",f),o(f)):o(r),!1}if(120==i||-3==i){var r=a.position().top-e;return r<=1?(o(0),a.css("top",1)):o(r),!1}}var i=t(this),r=!1,u=i.find(".scrollBody"),s=u.find(".scrollBar"),a=s.find("p"),c=u.find(".all-list"),d=c.find("ul"),l=u.prev(),p=a.outerHeight()/2,f=s.outerHeight()-a.outerHeight();a.mousedown(function(t){r=!0}),t(document).mouseup(function(){r=!1}),t(document).mousemove(function(t){if(r){var e=s.offset().top,n=e+s.outerHeight(),u=i.outerHeight()+i.offset().top;if(t.pageY>=e&&t.pageY<=n)var c=t.pageY-u-70,d=c-p;d<=1?(o(0),a.css("top",1)):d>=f?(a.css("top",f),o(f)):o(d)}});var m=!!window.ActiveXObject,g=m&&!window.XMLHttpRequest,h=m&&!!document.documentMode,v=m&&!g&&!h;h||v?(document.getElementById("scrollBody").attachEvent&&(document.getElementById("scrollBody").onmousewheel=n),document.getElementById("scrollBody").attachEvent("DOMMouseScroll",n,!1)):(document.getElementById("scrollBody").addEventListener&&document.getElementById("scrollBody").addEventListener("DOMMouseScroll",n,!0),document.getElementById("scrollBody").onmousewheel=n),function(e){e.find("a").hover(function(){var e=t(this).index(),o=t(this).parent().next(),n=o.find("li").eq(e).position().top,i=d.height(),r=c.height();n<=1?(a.stop(!0,!1).animate({top:1},500),d.stop(!0,!1).animate({"margin-top":0},500)):n>=i-r?(a.stop(!0,!1).animate({top:f},500),d.stop(!0,!1).animate({"margin-top":-(i-r)},500)):function(t){a.stop(!0,!1).animate({top:t/(i-r)*(s.outerHeight()-a.outerHeight())},500),d.stop(!0,!1).animate({"margin-top":-t},500)}(n)})}(l)})}}(jQuery);