PageSourceSearch

https://www.newarkadvertiser.co.uk/_resources/jquery.nicescroll-v2082836.js

js newarkadvertiser.co.uk collected 2026-10-02 07:50:48 UTC 57,182 bytes, 1 lines download raw bytes

1(function(n){function b(){var n=document.getElementsByTagName("script"),t=n[n.length-1].src.split("?")[0];return t.split("/").length>0?t.split("/").slice(0,-1).join("/")+"/":""}function nt(n,t,i){for(var r=0;r<t.length;r++)i(n,t[r])}var o=!1,c=!1,p=5e3,w=2e3,u=0,t=n,k=b(),f,e;Array.prototype.forEach||(Array.prototype.forEach=function(n,t){for(var i=0,r=this.length;i<r;++i)n.call(t,this[i],i,this)});var i=window.requestAnimationFrame||!1,r=window.cancelAnimationFrame||!1;["ms","moz","webkit","o"].forEach(function(n){i||(i=window[n+"RequestAnimationFrame"]);r||(r=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"])});var s=window.MutationObserver||window.WebKitMutationObserver||!1,v={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:!1,cursordragontouch:!1},l=!1,d=function(){function e(){var u=["-moz-grab","-webkit-grab","grab"],i,r;for((n.ischrome&&!n.ischrome22||n.isie)&&(u=[]),i=0;i<u.length;i++)if(r=u[i],t.style.cursor=r,t.style.cursor==r)return r;return"url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize"}var t,n,r,i;if(l)return l;for(t=document.createElement("DIV"),n={},n.haspointerlock=("pointerLockElement"in document)||("mozPointerLockElement"in document)||("webkitPointerLockElement"in document),n.isopera=("opera"in window),n.isopera12=n.isopera&&("getUserMedia"in navigator),n.isie=("all"in document)&&("attachEvent"in t)&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in t.style),n.isie7=n.isie&&!n.isieold&&(!("documentMode"in document)||document.documentMode==7),n.isie8=n.isie&&("documentMode"in document)&&document.documentMode==8,n.isie9=n.isie&&("performance"in window)&&document.documentMode>=9,n.isie10=n.isie&&("performance"in window)&&document.documentMode>=10,n.isie9mobile=/iemobile.9/i.test(navigator.userAgent),n.isie9mobile&&(n.isie9=!1),n.isie7mobile=!n.isie9mobile&&n.isie7&&/iemobile/i.test(navigator.userAgent),n.ismozilla=("MozAppearance"in t.style),n.iswebkit=("WebkitAppearance"in t.style),n.ischrome=("chrome"in window),n.ischrome22=n.ischrome&&n.haspointerlock,n.ischrome26=n.ischrome&&("transition"in t.style),n.cantouch=("ontouchstart"in document.documentElement)||("ontouchstart"in window),n.hasmstouch=window.navigator.msPointerEnabled||!1,n.ismac=/^mac$/i.test(navigator.platform),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform),n.isios4=n.isios&&!("seal"in Object),n.isandroid=/android/i.test(navigator.userAgent),n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1,r=["transform","msTransform","webkitTransform","MozTransform","OTransform"],i=0;i<r.length;i++)if(typeof t.style[r[i]]!="undefined"){n.trstyle=r[i];break}n.hastransform=n.trstyle!=!1;n.hastransform&&(t.style[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(t.style[n.trstyle]));n.transitionstyle=!1;n.prefixstyle="";n.transitionend=!1;var r=["transition","webkitTransition","MozTransition","OTransition","OTransition","msTransition","KhtmlTransition"],u=["","-webkit-","-moz-","-o-","-o","-ms-","-khtml-"],f=["transitionend","webkitTransitionEnd","transitionend","otransitionend","oTransitionEnd","msTransitionEnd","KhtmlTransitionEnd"];for(i=0;i<r.length;i++)if(r[i]in t.style){n.transitionstyle=r[i];n.prefixstyle=u[i];n.transitionend=f[i];break}return n.ischrome26&&(n.prefixstyle=u[1]),n.hastransition=n.transitionstyle,n.cursorgrabvalue=e(),n.hasmousecapture="setCapture"in t,n.hasMutationObserver=s!==!1,t=null,l=n,n},g=function(n,f){function it(){var n=e.win,t;if("zIndex"in n)return n.zIndex();while(n.length>0){if(n[0].nodeType==9)return!1;if(t=n.css("zIndex"),!isNaN(t)&&t!=0)return parseInt(t);n=n.parent()}return!1}function l(n,t,i){var u=n.css(t),r=parseFloat(u),f;return isNaN(r)?(r=g[u]||0,f=r==3?i?e.win.outerHeight()-e.win.innerHeight():e.win.outerWidth()-e.win.innerWidth():1,e.isie8&&r&&(r+=1),f?r:0):r}function nt(n,t,i,r){e._bind(n,t,function(r){var r=r?r:window.event,u={original:r,target:r.target||r.srcElement,type:"wheel",deltaMode:r.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return t=="mousewheel"?(u.deltaY=-1/40*r.wheelDelta,r.wheelDeltaX&&(u.deltaX=-1/40*r.wheelDeltaX)):u.deltaY=r.detail,i.call(n,u)},r)}function tt(n,t,i){var u,r;if(n.deltaMode==0?(u=-Math.floor(n.deltaX*(e.opt.mousescrollstep/54)),r=-Math.floor(n.deltaY*(e.opt.mousescrollstep/54))):n.deltaMode==1&&(u=-Math.floor(n.deltaX*e.opt.mousescrollstep),r=-Math.floor(n.deltaY*e.opt.mousescrollstep)),t&&u==0&&r&&(u=r,r=0),u&&(e.scrollmom&&e.scrollmom.stop(),e.lastdeltax+=u,e.debounced("mousewheelx",function(){var n=e.lastdeltax;e.lastdeltax=0;e.rail.drag||e.doScrollLeftBy(n)},120)),r){if(e.opt.nativeparentscrolling&&i&&!e.ispage&&!e.zoomactive)if(r<0){if(e.getScrollTop()>=e.page.maxh)return!0}else if(e.getScrollTop()<=0)return!0;e.scrollmom&&e.scrollmom.stop();e.lastdeltay+=r;e.debounced("mousewheely",function(){var n=e.lastdeltay;e.lastdeltay=0;e.rail.drag||e.doScrollBy(n)},120)}return n.stopImmediatePropagation(),n.preventDefault()}var e=this,a,h,g;if(this.version="3.4.0",this.name="nicescroll",this.me=f,this.opt={doc:t("body"),win:!1},t.extend(this.opt,v),this.opt.snapbackspeed=80,n||!1)for(a in e.opt)typeof n[a]!="undefined"&&(e.opt[a]=n[a]);this.doc=e.opt.doc;this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test(e.opt.win?e.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=e.opt.win!==!1;this.win=e.opt.win||(this.ispage?t(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?t(window):this.win;this.body=t("body");this.viewport=!1;
1this.isfixed=!1;this.iframe=!1;this.isiframe=this.doc[0].nodeName=="IFRAME"&&this.win[0].nodeName=="IFRAME";this.istextarea=this.win[0].nodeName=="TEXTAREA";this.forcescreen=!1;this.canshowonmouseevent=e.opt.autohidemode!="scroll";this.onmousedown=!1;this.onmouseup=!1;this.onmousemove=!1;this.onmousewheel=!1;this.onkeypress=!1;this.ongesturezoom=!1;this.onclick=!1;this.onscrollstart=!1;this.onscrollend=!1;this.onscrollcancel=!1;this.onzoomin=!1;this.onzoomout=!1;this.view=!1;this.page=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.checkrtlmode=!1;this.scrollrunning=!1;this.scrollmom=!1;this.observer=!1;this.observerremover=!1;do this.id="ascrail"+w++;while(document.getElementById(this.id));if(this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.overflowx=e.opt.overflowx,this.overflowy=e.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=d(),h=t.extend({},this.detected),this.canhwscroll=h.hastransform&&e.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&e.haswrapper,this.istouchcapable=!1,h.cantouch&&h.ischrome&&!h.isios&&!h.isandroid&&(this.istouchcapable=!0,h.cantouch=!1),h.cantouch&&h.ismozilla&&!h.isios&&(this.istouchcapable=!0,h.cantouch=!1),e.opt.enablemouselockapi||(h.hasmousecapture=!1,h.haspointerlock=!1),this.delayed=function(n,t,i,r){var u=e.delaylist[n],f=(new Date).getTime();if(!r&&u&&u.tt)return!1;u&&u.tt&&clearTimeout(u.tt);u&&u.last+i>f&&!u.tt?e.delaylist[n]={last:f+i,tt:setTimeout(function(){e.delaylist[n].tt=0;t.call()},i)}:u&&u.tt||(e.delaylist[n]={last:f,tt:0},setTimeout(function(){t.call()},0))},this.debounced=function(n,t,i){var r=e.delaylist[n],u=(new Date).getTime();e.delaylist[n]=t;r||setTimeout(function(){var t=e.delaylist[n];e.delaylist[n]=!1;t.call()},i)},this.synched=function(n,t){function r(){e.onsync||(i(function(){e.onsync=!1;for(n in e.synclist){var t=e.synclist[n];t&&t.call(e);e.synclist[n]=!1}}),e.onsync=!0)}return e.synclist[n]=t,r(),n},this.unsynched=function(n){e.synclist[n]&&(e.synclist[n]=!1)},this.css=function(n,t){for(var i in t)e.saved.css.push([n,i,n.css(i)]),n.css(i,t[i])},this.scrollTop=function(n){return typeof n=="undefined"?e.getScrollTop():e.setScrollTop(n)},this.scrollLeft=function(n){return typeof n=="undefined"?e.getScrollLeft():e.setScrollLeft(n)},BezierClass=function(n,t,i,r,u,f,e){this.st=n;this.ed=t;this.spd=i;this.p1=r||0;this.p2=u||1;this.p3=f||0;this.p4=e||1;this.ts=(new Date).getTime();this.df=this.ed-this.st},BezierClass.prototype={B2:function(n){return 3*n*n*(1-n)},B3:function(n){return 3*n*(1-n)*(1-n)},B4:function(n){return(1-n)*(1-n)*(1-n)},getNow:function(){var t=(new Date).getTime(),n=1-(t-this.ts)/this.spd,i=this.B2(n)+this.B3(n)+this.B4(n);return n<0?this.ed:this.st+Math.round(this.df*i)},update:function(n,t){return this.st=this.getNow(),this.ed=n,this.spd=t,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};h.hastranslate3d&&h.isios&&this.doc.css("-webkit-backface-visibility","hidden");function b(){var n=e.doc.css(h.trstyle);return n&&n.substr(0,6)=="matrix"?n.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}this.getScrollTop=function(n){if(!n){var t=b();if(t)return t.length==16?-t[13]:-t[5];if(e.timerscroll&&e.timerscroll.bz)return e.timerscroll.bz.getNow()}return e.doc.translate.y};this.getScrollLeft=function(n){if(!n){var t=b();if(t)return t.length==16?-t[12]:-t[4];if(e.timerscroll&&e.timerscroll.bh)return e.timerscroll.bh.getNow()}return e.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(n){var t=document.createEvent("UIEvents");t.initUIEvent("scroll",!1,!0,window,1);n.dispatchEvent(t)}:document.fireEvent?function(n){var t=document.createEventObject();n.fireEvent("onscroll");t.cancelBubble=!0}:function(){};h.hastranslate3d&&e.opt.enabletranslate3d?(this.setScrollTop=function(n,t){e.doc.translate.y=n;e.doc.translate.ty=n*-1+"px";
1e.doc.css(h.trstyle,"translate3d("+e.doc.translate.tx+","+e.doc.translate.ty+",0px)");t||e.notifyScrollEvent(e.win[0])},this.setScrollLeft=function(n,t){e.doc.translate.x=n;e.doc.translate.tx=n*-1+"px";e.doc.css(h.trstyle,"translate3d("+e.doc.translate.tx+","+e.doc.translate.ty+",0px)");t||e.notifyScrollEvent(e.win[0])}):(this.setScrollTop=function(n,t){e.doc.translate.y=n;e.doc.translate.ty=n*-1+"px";e.doc.css(h.trstyle,"translate("+e.doc.translate.tx+","+e.doc.translate.ty+")");t||e.notifyScrollEvent(e.win[0])},this.setScrollLeft=function(n,t){e.doc.translate.x=n;e.doc.translate.tx=n*-1+"px";e.doc.css(h.trstyle,"translate("+e.doc.translate.tx+","+e.doc.translate.ty+")");t||e.notifyScrollEvent(e.win[0])})}else this.getScrollTop=function(){return e.docscroll.scrollTop()},this.setScrollTop=function(n){return e.docscroll.scrollTop(n)},this.getScrollLeft=function(){return e.docscroll.scrollLeft()},this.setScrollLeft=function(n){return e.docscroll.scrollLeft(n)};this.getTarget=function(n){return n?n.target?n.target:n.srcElement?n.srcElement:!1:!1};this.hasParent=function(n,t){if(!n)return!1;for(var i=n.target||n.srcElement||n||!1;i&&i.id!=t;)i=i.parentNode||!1;return i!==!1};g={thin:1,medium:3,thick:5};this.getOffset=function(){if(e.isfixed)return{top:parseFloat(e.win.css("top")),left:parseFloat(e.win.css("left"))};if(!e.viewport)return e.win.offset();var n=e.win.offset(),t=e.viewport.offset();return{top:n.top-t.top+e.viewport.scrollTop(),left:n.left-t.left+e.viewport.scrollLeft()}};this.updateScrollBar=function(n){var r,t,u,i;if(e.ishwscroll)e.rail.css({height:e.win.innerHeight()}),e.railh&&e.railh.css({width:e.win.innerWidth()});else if(r=e.getOffset(),t={top:r.top,left:r.left},t.top+=l(e.win,"border-top-width",!0),u=(e.win.outerWidth()-e.win.innerWidth())/2,t.left+=e.rail.align?e.win.outerWidth()-l(e.win,"border-right-width")-e.rail.width:l(e.win,"border-left-width"),i=e.opt.railoffset,i&&(i.top&&(t.top+=i.top),e.rail.align&&i.left&&(t.left+=i.left)),e.locked||e.rail.css({top:t.top,left:t.left,height:n?n.h:e.win.innerHeight()}),e.zoom&&e.zoom.css({top:t.top+1,left:e.rail.align==1?t.left-20:t.left+e.rail.width+4}),e.railh&&!e.locked){var t={top:r.top,left:r.left},f=e.railh.align?t.top+l(e.win,"border-top-width",!0)+e.win.innerHeight()-e.railh.height:t.top+l(e.win,"border-top-width",!0),o=t.left+l(e.win,"border-left-width");e.railh.css({top:f,left:o,width:e.railh.width})}};this.doRailClick=function(n,t,i){var r,f,u,o;e.locked||(e.cancelEvent(n),t?(r=i?e.doScrollLeft:e.doScrollTop,u=i?(n.pageX-e.railh.offset().left-e.cursorwidth/2)*e.scrollratio.x:(n.pageY-e.rail.offset().top-e.cursorheight/2)*e.scrollratio.y,r(u)):(r=i?e.doScrollLeftBy:e.doScrollBy,u=i?e.scroll.x:e.scroll.y,o=i?n.pageX-e.railh.offset().left:n.pageY-e.rail.offset().top,f=i?e.view.w:e.view.h,u>=o?r(f):r(-f)))};e.hasanimationframe=i;e.hascancelanimationframe=r;e.hasanimationframe?e.hascancelanimationframe||(r=function(){e.cancelAnimationFrame=!0}):(i=function(n){return setTimeout(n,15-Math.floor(+new Date/1e3)%16)},r=clearInterval);this.init=function(){var f,n,b,l,d,tt,a,r,i,v,w,g,nt,rt,ft,et;if(e.saved.css=[],h.isie7mobile)return!0;if(h.hasmstouch&&e.css(e.ispage?t("html"):e.win,{"-ms-touch-action":"none"}),e.zindex="auto",e.zindex=e.ispage||e.opt.zindex!="auto"?e.opt.zindex:it()||"auto",e.ispage||e.zindex=="auto"||e.zindex>u&&(u=e.zindex),e.isie&&e.zindex==0&&e.opt.zindex=="auto"&&(e.zindex="auto"),!e.ispage||!h.cantouch&&!h.isieold&&!h.isie9mobile){f=e.docscroll;e.ispage&&(f=e.haswrapper?e.win:e.doc);h.isie9mobile||e.css(f,{"overflow-y":"hidden"});e.ispage&&h.isie7&&(e.doc[0].nodeName=="BODY"?e.css(t("html"),{"overflow-y":"hidden"}):e.doc[0].nodeName=="HTML"&&e.css(t("body"),{"overflow-y":"hidden"}));!h.isios||e.ispage||e.haswrapper||e.css(t("body"),{"-webkit-overflow-scrolling":"touch"});r=t(document.createElement("div"));r.css({position:"relative",top:0,float:"right",width:e.opt.cursorwidth,height:"0px","background-color":e.opt.cursorcolor,border:e.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":e.opt.cursorborderradius,"-moz-border-radius":e.opt.cursorborderradiu
1s,"border-radius":e.opt.cursorborderradius});r.hborder=parseFloat(r.outerHeight()-r.innerHeight());e.cursor=r;n=t(document.createElement("div"));n.attr("id",e.id);n.addClass("nicescroll-rails");d=["left","right"];for(tt in d)l=d[tt],b=e.opt.railpadding[l],b?n.css("padding-"+l,b+"px"):e.opt.railpadding[l]=0;if(n.append(r),n.width=Math.max(parseFloat(e.opt.cursorwidth),r.outerWidth())+e.opt.railpadding.left+e.opt.railpadding.right,n.css({width:n.width+"px",zIndex:e.zindex,background:e.opt.background,cursor:"default"}),n.visibility=!0,n.scrollable=!0,n.align=e.opt.railalign=="left"?0:1,e.rail=n,e.rail.drag=!1,a=!1,!e.opt.boxzoom||e.ispage||h.isieold||(a=document.createElement("div"),e.bind(a,"click",e.doZoom),e.zoom=t(a),e.zoom.css({cursor:"pointer","z-index":e.zindex,backgroundImage:"url("+k+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),e.opt.dblclickzoom&&e.bind(e.win,"dblclick",e.doZoom),h.cantouch&&e.opt.gesturezoom&&(e.ongesturezoom=function(n){return n.scale>1.5&&e.doZoomIn(n),n.scale<.8&&e.doZoomOut(n),e.cancelEvent(n)},e.bind(e.win,"gestureend",e.ongesturezoom))),e.railh=!1,e.opt.horizrailenabled&&(e.css(f,{"overflow-x":"hidden"}),r=t(document.createElement("div")),r.css({position:"relative",top:0,height:e.opt.cursorwidth,width:"0px","background-color":e.opt.cursorcolor,border:e.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":e.opt.cursorborderradius,"-moz-border-radius":e.opt.cursorborderradius,"border-radius":e.opt.cursorborderradius}),r.wborder=parseFloat(r.outerWidth()-r.innerWidth()),e.cursorh=r,i=t(document.createElement("div")),i.attr("id",e.id+"-hr"),i.addClass("nicescroll-rails"),i.height=Math.max(parseFloat(e.opt.cursorwidth),r.outerHeight()),i.css({height:i.height+"px",zIndex:e.zindex,background:e.opt.background}),i.append(r),i.visibility=!0,i.scrollable=!0,i.align=e.opt.railvalign=="top"?0:1,e.railh=i,e.railh.drag=!1),e.ispage?(n.css({position:"fixed",top:"0px",height:"100%"}),n.align?n.css({right:"0px"}):n.css({left:"0px"}),e.body.append(n),e.railh&&(i.css({position:"fixed",left:"0px",width:"100%"}),i.align?i.css({bottom:"0px"}):i.css({top:"0px"}),e.body.append(i))):(e.ishwscroll?(e.win.css("position")=="static"&&e.css(e.win,{position:"relative"}),v=e.win[0].nodeName=="HTML"?e.body:e.win,e.zoom&&(e.zoom.css({position:"absolute",top:1,right:0,"margin-right":n.width+4}),v.append(e.zoom)),n.css({position:"absolute",top:0}),n.align?n.css({right:0}):n.css({left:0}),v.append(n),i&&(i.css({position:"absolute",left:0,bottom:0}),i.align?i.css({bottom:0}):i.css({top:0}),v.append(i))):(e.isfixed=e.win.css("position")=="fixed",w=e.isfixed?"fixed":"absolute",e.isfixed||(e.viewport=e.getViewport(e.win[0])),e.viewport&&(e.body=e.viewport,/relative|absolute/.test(e.viewport.css("position"))==!1&&e.css(e.viewport,{position:"relative"})),n.css({position:w}),e.zoom&&e.zoom.css({position:w}),e.updateScrollBar(),e.body.append(n),e.zoom&&e.body.append(e.zoom),e.railh&&(i.css({position:w}),e.body.append(i))),h.isios&&e.css(e.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),h.isie&&e.opt.disableoutline&&e.win.attr("hideFocus","true"),h.iswebkit&&e.opt.disableoutline&&e.win.css({outline:"none"})),e.opt.autohidemode===!1?(e.autohidedom=!1,e.rail.css({opacity:e.opt.cursoropacitymax}),e.railh&&e.railh.css({opacity:e.opt.cursoropacitymax})):e.opt.autohidemode===!0?(e.autohidedom=t().add(e.rail),h.isie8&&(e.autohidedom=e.autohidedom.add(e.cursor)),e.railh&&(e.autohidedom=e.autohidedom.add(e.railh)),e.railh&&h.isie8&&(e.autohidedom=e.autohidedom.add(e.cursorh))):e.opt.autohidemode=="scroll"?(e.autohidedom=t().add(e.rail),e.railh&&(e.autohidedom=e.autohidedom.add(e.railh))):e.opt.autohidemode=="cursor"?(e.autohidedom=t().add(e.cursor),e.railh&&(e.autohidedom=e.autohidedom.add(e.cursorh))):e.opt.autohidemode=="hidden"&&(e.autohidedom=!1,e.hide(),e.locked=!1),h.isie9mobile)e.scrollmom=new y(e),e.onmangotouch=function(){var n=e.getScrollTop(),t=e.getScrollLeft(),c,s;if(n==e.scrollmom.lastscrolly&&t==e.scrollmom.lastscrollx)return!0;var r=n-e.mangotouch.sy,u=t-e.mangotouch.sx,h=Math.round(Math.sqrt(Math.pow(u,2)+Math.pow(r,2)));if(h!=0){var f=r<0?-1:1,o=u<0?-1:1,i=+new Date;e.mangotouch.lazy&&clearTimeout(e.mangotouch.lazy);i-e.mangotouch.tm>80||e.mangotouch.dry!=f||e.mangotouch.drx!=o?(e.scrollmom.stop(),e.scrollmom.reset(t,n),e.mangotouch.sy=n,e.mangotouch.ly=n,e.mangotouch.sx=t,e.mangotouch.lx=t,e.mangotouch.dry=f,e.mangotouch.drx=o,e.mangotouch.tm=i):(e.scrollmom.stop(),e.scrollmom.update(e.mangotouch.sx-u,e.mangotouch.sy-r),c=i-e.mangotouch.tm,e.mangotouch.tm=i,s=Math.max(Math.abs(e.mangotouch.ly-n),Math.abs(e.mangotouch.lx-t)),e.mangotouch.ly=n,e.mangotouch.lx=t,s>2&&(e.mangotouch.lazy=setTimeout(function(){e.mangotouch.lazy=!1;e.mangotouch.dry=0;e.mangotouch.drx=0;e.mangotouch.tm=0;e.scrollmom.doMomentum(30)},100)))}},g=e.getScrollTop(),nt=e.getScrollLeft(),e.mangotouch={sy:g,ly:g,dry:0,sx:nt,lx:nt,drx:0,lazy:!1,tm:0},e.bind(e.docscroll,"scroll",e.onmangotouch);
1else{if((h.cantouch||e.istouchcapable||e.opt.touchbehavior||h.hasmstouch)&&(e.scrollmom=new y(e),e.ontouchstart=function(n){var r,i,o,u,n,f,l;if(n.pointerType&&n.pointerType!=2)return!1;if(!e.locked){if(h.hasmstouch)for(i=n.target?n.target:!1;i;){if(r=t(i).getNiceScroll(),r.length>0&&r[0].me==e.me)break;if(r.length>0)return!1;if(i.nodeName=="DIV"&&i.id==e.id)break;i=i.parentNode?i.parentNode:!1}if(e.cancelScroll(),i=e.getTarget(n),i&&(o=/INPUT/i.test(i.nodeName)&&/range/i.test(i.type),o))return e.stopPropagation(n);if(!("clientX"in n)&&"changedTouches"in n&&(n.clientX=n.changedTouches[0].clientX,n.clientY=n.changedTouches[0].clientY),e.forcescreen&&(u=n,n={original:n.original?n.original:n},n.clientX=u.screenX,n.clientY=u.screenY),e.rail.drag={x:n.clientX,y:n.clientY,sx:e.scroll.x,sy:e.scroll.y,st:e.getScrollTop(),sl:e.getScrollLeft(),pt:2,dl:!1},e.ispage||!e.opt.directionlockdeadzone)e.rail.drag.dl="f";else{var s={w:t(window).width(),h:t(window).height()},c={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},a=Math.max(0,c.h-s.h),v=Math.max(0,c.w-s.w);e.rail.drag.ck=!e.rail.scrollable&&e.railh.scrollable?a>0?"v":!1:e.rail.scrollable&&!e.railh.scrollable?v>0?"h":!1:!1;e.rail.drag.ck||(e.rail.drag.dl="f")}if(e.opt.touchbehavior&&e.isiframe&&h.isie&&(f=e.win.position(),e.rail.drag.x+=f.left,e.rail.drag.y+=f.top),e.hasmoving=!1,e.lastmouseup=!1,e.scrollmom.reset(n.clientX,n.clientY),!h.cantouch&&!this.istouchcapable&&!h.hasmstouch){if(l=i?/INPUT|SELECT|TEXTAREA/i.test(i.nodeName):!1,!l)return!e.ispage&&h.hasmousecapture&&i.setCapture(),e.cancelEvent(n);/SUBMIT|CANCEL|BUTTON/i.test(t(i).attr("type"))&&(pc={tg:i,click:!1},e.preventclick=pc)}}},e.ontouchend=function(n){return n.pointerType&&n.pointerType!=2?!1:e.rail.drag&&e.rail.drag.pt==2&&(e.scrollmom.doMomentum(),e.rail.drag=!1,e.hasmoving&&(e.hasmoving=!1,e.lastmouseup=!0,e.hideCursor(),h.hasmousecapture&&document.releaseCapture(),!h.cantouch))?e.cancelEvent(n):void 0},rt=e.opt.touchbehavior&&e.isiframe&&!h.hasmousecapture,e.ontouchmove=function(n,i){var w,a,n,v,y,u,s;if(n.pointerType&&n.pointerType!=2)return!1;if(e.rail.drag&&e.rail.drag.pt==2){if(h.cantouch&&typeof n.original=="undefined")return!0;e.hasmoving=!0;e.preventclick&&!e.preventclick.click&&(e.preventclick.click=e.preventclick.tg.onclick||!1,e.preventclick.tg.onclick=e.onpreventclick);w=t.extend({original:n},n);n=w;"changedTouches"in n&&(n.clientX=n.changedTouches[0].clientX,n.clientY=n.changedTouches[0].clientY);e.forcescreen&&(a=n,n={original:n.original?n.original:n},n.clientX=a.screenX,n.clientY=a.screenY);v=ofy=0;rt&&!i&&(y=e.win.position(),v=-y.left,ofy=-y.top);var f=n.clientY+ofy,b=f-e.rail.drag.y,o=n.clientX+v,k=o-e.rail.drag.x,r=e.rail.drag.st-b;if(e.ishwscroll&&e.opt.bouncescroll?r<0?r=Math.round(r/2):r>e.page.maxh&&(r=e.page.maxh+Math.round((r-e.page.maxh)/2)):(r<0&&(r=0,f=0),r>e.page.maxh&&(r=e.page.maxh,f=0)),e.railh&&e.railh.scrollable&&(u=e.rail.drag.sl-k,e.ishwscroll&&e.opt.bouncescroll?u<0?u=Math.round(u/2):u>e.page.maxw&&(u=e.page.maxw+Math.round((u-e.page.maxw)/2)):(u<0&&(u=0,o=0),u>e.page.maxw&&(u=e.page.maxw,o=0))),s=!1,e.rail.drag.dl)s=!0,e.rail.drag.dl=="v"?u=e.rail.drag.sl:e.rail.drag.dl=="h"&&(r=e.rail.drag.st);else{var c=Math.abs(b),p=Math.abs(k),l=e.opt.directionlockdeadzone;if(e.rail.drag.ck=="v"){if(c>l&&p<=c*.3)return e.rail.drag=!1,!0;p>l&&(e.rail.drag.dl="f",t("body").scrollTop(t("body").scrollTop()))}else if(e.rail.drag.ck=="h"){if(p>l&&c<=az*.3)return e.rail.drag=!1,!0;c>l&&(e.rail.drag.dl="f",t("body").scrollLeft(t("body").scrollLeft()))}}if(e.synched("touchmove",function(){e.rail.drag&&e.rail.drag.pt==2&&(e.prepareTransition&&e.prepareTransition(0),e.rail.scrollable&&e.setScrollTop(r),e.scrollmom.update(o,f),e.railh&&e.railh.scrollable?(e.setScrollLeft(u),e.showCursor(r,u)):e.showCursor(r),h.isie10&&document.selection.clear())}),h.ischrome&&e.istouchcapable&&(s=!1),s)return e.cancelEvent(n)}}),e.onmousedown=function(n,t){if(!e.rail.drag||e.rail.drag.pt==1){if(e.locked)return e.cancelEvent(n);e.cancelScroll();e.rail.drag={x:n.clientX,y:n.clientY,sx:e.scroll.x,sy:e.scroll.y,pt:1,hr:!!t};var i=e.getTarget(n);return!e.ispage&&h.hasmousecapture&&i.setCapture(),e.isiframe&&!h.hasmousecapture&&(e.saved.csspointerevents=e.doc.css("pointer-events"),e.css(e.doc,{"pointer-events":"none"})),e.cancelEvent(n)}},e.onmouseup=function(n){if(e.rail.drag)return(h.hasmousecapture&&document.releaseCapture(),e.isiframe&&!h.hasmousecapture&&e.doc.
1css("pointer-events",e.saved.csspointerevents),e.rail.drag.pt!=1)?void 0:(e.rail.drag=!1,e.cancelEvent(n))},e.onmousemove=function(n){var t,i;if(e.rail.drag)return e.rail.drag.pt!=1?void 0:h.ischrome&&n.which==0?e.onmouseup(n):(e.cursorfreezed=!0,e.rail.drag.hr?(e.scroll.x=e.rail.drag.sx+(n.clientX-e.rail.drag.x),e.scroll.x<0&&(e.scroll.x=0),t=e.scrollvaluemaxw,e.scroll.x>t&&(e.scroll.x=t)):(e.scroll.y=e.rail.drag.sy+(n.clientY-e.rail.drag.y),e.scroll.y<0&&(e.scroll.y=0),i=e.scrollvaluemax,e.scroll.y>i&&(e.scroll.y=i)),e.synched("mousemove",function(){e.rail.drag&&e.rail.drag.pt==1&&(e.showCursor(),e.rail.drag.hr?e.doScrollLeft(Math.round(e.scroll.x*e.scrollratio.x),e.opt.cursordragspeed):e.doScrollTop(Math.round(e.scroll.y*e.scrollratio.y),e.opt.cursordragspeed))}),e.cancelEvent(n))},h.cantouch||e.opt.touchbehavior)e.onpreventclick=function(n){if(e.preventclick)return e.preventclick.tg.onclick=e.preventclick.click,e.preventclick=!1,e.cancelEvent(n)},e.bind(e.win,"mousedown",e.ontouchstart),e.onclick=h.isios?!1:function(n){return e.lastmouseup?(e.lastmouseup=!1,e.cancelEvent(n)):!0},e.opt.grabcursorenabled&&h.cursorgrabvalue&&(e.css(e.ispage?e.doc:e.win,{cursor:h.cursorgrabvalue}),e.css(e.rail,{cursor:h.cursorgrabvalue}));else{function ut(n){var i,t,r;e.selectiondrag&&(n&&(i=e.win.outerHeight(),t=n.pageY-e.selectiondrag.top,t>0&&t<i&&(t=0),t>=i&&(t-=i),e.selectiondrag.df=t),e.selectiondrag.df!=0)&&(r=-Math.floor(e.selectiondrag.df/6)*2,e.doScrollBy(r),e.debounced("doselectionscroll",function(){ut()},50))}e.hasTextSelected="getSelection"in document?function(){return document.getSelection().rangeCount>0}:"selection"in document?function(){return document.selection.type!="None"}:function(){return!1};e.onselectionstart=function(){e.ispage||(e.selectiondrag=e.win.offset())};e.onselectionend=function(){e.selectiondrag=!1};e.onselectiondrag=function(n){e.selectiondrag&&e.hasTextSelected()&&e.debounced("selectionscroll",function(){ut(n)},250)}}h.hasmstouch&&(e.css(e.rail,{"-ms-touch-action":"none"}),e.css(e.cursor,{"-ms-touch-action":"none"}),e.bind(e.win,"MSPointerDown",e.ontouchstart),e.bind(document,"MSPointerUp",e.ontouchend),e.bind(document,"MSPointerMove",e.ontouchmove),e.bind(e.cursor,"MSGestureHold",function(n){n.preventDefault()}),e.bind(e.cursor,"contextmenu",function(n){n.preventDefault()}));this.istouchcapable&&(e.bind(e.win,"touchstart",e.ontouchstart),e.bind(document,"touchend",e.ontouchend),e.bind(document,"touchcancel",e.ontouchend),e.bind(document,"touchmove",e.ontouchmove));e.bind(e.cursor,"mousedown",e.onmousedown);e.bind(e.cursor,"mouseup",e.onmouseup);e.railh&&(e.bind(e.cursorh,"mousedown",function(n){e.onmousedown(n,!0)}),e.bind(e.cursorh,"mouseup",function(n){if(!e.rail.drag||e.rail.drag.pt!=2)return e.rail.drag=!1,e.hasmoving=!1,e.hideCursor(),h.hasmousecapture&&document.releaseCapture(),e.cancelEvent(n)}));!e.opt.cursordragontouch&&(h.cantouch||e.opt.touchbehavior)||(e.rail.css({cursor:"default"}),e.railh&&e.railh.css({cursor:"default"}),e.jqbind(e.rail,"mouseenter",function(){e.canshowonmouseevent&&e.showCursor();e.rail.active=!0}),e.jqbind(e.rail,"mouseleave",function(){e.rail.active=!1;e.rail.drag||e.hideCursor()}),e.opt.sensitiverail&&(e.bind(e.rail,"click",function(n){e.doRailClick(n,!1,!1)}),e.bind(e.rail,"dblclick",function(n){e.doRailClick(n,!0,!1)}),e.bind(e.cursor,"click",function(n){e.cancelEvent(n)}),e.bind(e.cursor,"dblclick",function(n){e.cancelEvent(n)})),e.railh&&(e.jqbind(e.railh,"mouseenter",function(){e.canshowonmouseevent&&e.showCursor();e.rail.active=!0}),e.jqbind(e.railh,"mouseleave",function(){e.rail.active=!1;e.rail.drag||e.hideCursor()}),e.opt.sensitiverail&&(e.bind(e.railh,"click",function(n){e.doRailClick(n,!1,!0)}),e.bind(e.railh,"dblclick",function(n){e.doRailClick(n,!0,!0)}),e.bind(e.cursorh,"click",function(n){e.cancelEvent(n)}),e.bind(e.cursorh,"dblclick",function(n){e.cancelEvent(n)}))));h.cantouch||e.opt.touchbehavior?(e.bind(h.hasmousecapture?e.win:document,"mouseup",e.ontouchend),e.bind(document,"mousemove",e.ontouchmove),e.onclick&&e.bind(document,"click",e.onclick),e.opt.cursordragontouch&&(e.bind(e.curs
1or,"mousedown",e.onmousedown),e.bind(e.cursor,"mousemove",e.onmousemove),e.cursorh&&e.bind(e.cursorh,"mousedown",e.onmousedown),e.cursorh&&e.bind(e.cursorh,"mousemove",e.onmousemove))):(e.bind(h.hasmousecapture?e.win:document,"mouseup",e.onmouseup),e.bind(document,"mousemove",e.onmousemove),e.onclick&&e.bind(document,"click",e.onclick),!e.ispage&&e.opt.enablescrollonselection&&(e.bind(e.win[0],"mousedown",e.onselectionstart),e.bind(document,"mouseup",e.onselectionend),e.bind(e.cursor,"mouseup",e.onselectionend),e.cursorh&&e.bind(e.cursorh,"mouseup",e.onselectionend),e.bind(document,"mousemove",e.onselectiondrag)),e.zoom&&(e.jqbind(e.zoom,"mouseenter",function(){e.canshowonmouseevent&&e.showCursor();e.rail.active=!0}),e.jqbind(e.zoom,"mouseleave",function(){e.rail.active=!1;e.rail.drag||e.hideCursor()})));e.opt.enablemousewheel&&(e.isiframe||e.bind(h.isie&&e.ispage?document:e.docscroll,"mousewheel",e.onmousewheel),e.bind(e.rail,"mousewheel",e.onmousewheel),e.railh&&e.bind(e.railh,"mousewheel",e.onmousewheelhr));e.ispage||h.cantouch||/HTML|BODY/.test(e.win[0].nodeName)||(e.win.attr("tabindex")||e.win.attr({tabindex:p++}),e.jqbind(e.win,"focus",function(n){o=e.getTarget(n).id||!0;e.hasfocus=!0;e.canshowonmouseevent&&e.noticeCursor()}),e.jqbind(e.win,"blur",function(){o=!1;e.hasfocus=!1}),e.jqbind(e.win,"mouseenter",function(n){c=e.getTarget(n).id||!0;e.hasmousefocus=!0;e.canshowonmouseevent&&e.noticeCursor()}),e.jqbind(e.win,"mouseleave",function(){c=!1;e.hasmousefocus=!1}))}e.onkeypress=function(n){var i,f,u;if(e.locked&&e.page.maxh==0||(n=n?n:window.e,i=e.getTarget(n),i&&/INPUT|TEXTAREA|SELECT|OPTION/.test(i.nodeName)&&(f=i.getAttribute("type")||i.type||!1,!f||!/submit|button|cancel/i.tp)))return!0;if(e.hasfocus||e.hasmousefocus&&!o||e.ispage&&!o&&!c){if(u=n.keyCode,e.locked&&u!=27)return e.cancelEvent(n);var r=n.ctrlKey||!1,s=n.shiftKey||!1,t=!1;switch(u){case 38:case 63233:e.doScrollBy(72);t=!0;break;case 40:case 63235:e.doScrollBy(-72);t=!0;break;case 37:case 63232:e.railh&&(r?e.doScrollLeft(0):e.doScrollLeftBy(72),t=!0);break;case 39:case 63234:e.railh&&(r?e.doScrollLeft(e.page.maxw):e.doScrollLeftBy(-72),t=!0);break;case 33:case 63276:e.doScrollBy(e.view.h);t=!0;break;case 34:case 63277:e.doScrollBy(-e.view.h);t=!0;break;case 36:case 63273:e.railh&&r?e.doScrollPos(0,0):e.doScrollTo(0);t=!0;break;case 35:case 63275:e.railh&&r?e.doScrollPos(e.page.maxw,e.page.maxh):e.doScrollTo(e.page.maxh);t=!0;break;case 32:e.opt.spacebarenabled&&(s?e.doScrollBy(e.view.h):e.doScrollBy(-e.view.h),t=!0);break;case 27:e.zoomactive&&(e.doZoom(),t=!0)}if(t)return e.cancelEvent(n)}};e.opt.enablekeyboard&&e.bind(document,h.isopera&&!h.isopera12?"keypress":"keydown",e.onkeypress);e.bind(window,"resize",e.lazyResize);e.bind(window,"orientationchange",e.lazyResize);e.bind(window,"load",e.lazyResize);!h.ischrome||e.ispage||e.haswrapper||(ft=e.win.attr("style"),et=parseFloat(e.win.css("width"))+1,e.win.css("width",et),e.synched("chromefix",function(){e.win.attr("style",ft)}));e.onAttributeChange=function(){e.lazyResize(250)};e.ispage||e.haswrapper||(s!==!1?(e.observer=new s(function(n){n.forEach(e.onAttributeChange)}),e.observer.observe(e.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),e.observerremover=new s(function(n){n.forEach(function(n){if(n.removedNodes.length>0)for(var t in n.removedNodes)if(n.removedNodes[t]==e.win[0])return e.remove()})}),e.observerremover.observe(e.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(e.bind(e.win,h.isie&&!h.isie9?"propertychange":"DOMAttrModified",e.onAttributeChange),h.isie9&&e.win[0].attachEvent("onpropertychange",e.onAttributeChange),e.bind(e.win,"DOMNodeRemoved",function(n){n.target==e.win[0]&&e.remove()})));!e.ispage&&e.opt.boxzoom&&e.bind(window,"resize",e.resizeZoom);e.istextarea&&e.bind(e.win,"mouseup",e.lazyResize);e.checkrtlmode=!0;e.lazyResize(30)}if(this.doc[0].nodeName=="IFRAME"){function ot(){var n,r,i;e.iframexd=!1;try{n="contentDocument"in this?this.contentDocument:this.contentWindow.document;r=n.domain}catch(e){e.iframexd=!0;n=!1}if(e.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;e.forcescreen=!0;e.isiframe&&(e.iframe={doc:t(n),html:e.doc.contents().find("html")[0],body:e.doc.contents().find("body")[0]},e.getContentSize=function(){return{w:Math.max(e.iframe.html.scrollWidth,e.iframe.body.scrollWidth),h:Math.max(e.iframe.html.scrollHeight,e.iframe.body.scrollHeight)}},e.docscroll=t(e.iframe.body));h.isios||!e.opt.iframeautoresize||e.isiframe||(e.win.scrollTop(0),e.doc.height(""),i=Math.max(n.getElementsByTagName("html")[0].scrollHeight,n.body.scrollHeight),e.doc.height(i));e.lazyResize(30);h.isie7&&e.css(t(e.iframe.html),{"overflow-y":"hidden"});e.css(t(e.iframe.body),{"overflow-y":"hidden"});"contentWindow"in this?e.bind(this.contentWindow,"scroll",e.onscroll):e.bind(n,"scroll",e.onscroll);e.opt.enablemousewheel&&e.bind(n,"mousewheel",e.onmousewheel);e.opt.enablekeyboard&&e.bind(n,h.isopera?"keypress":"keydown",e.onkeypress);(h.cantouch||e.opt.touchbehavior)&&(e.bind(n,"mousedown",e.onmousedown),e.bind(n,"mousemove",function(n){e.onmousemove(n,!0)}),e.opt.grabcursorenabled&&h.cursorgrabvalue&&e.css(t(n.body),{cursor:h.cursorgrabvalue}));e.bind(n,"mouseup",e.onmouseup);e.zoom&&(e.opt.dblclickzoom&&e.bind(n,"dblclick",e.doZoom),e.ongesturezoom&&e.bind(n,"gestureend",e.ongesturezoom))}this.doc[0].readyState&&this.doc[0].readyState=="complete"&&setTimeout(function(){ot.call(e.doc[0],!1)},500);e.bind(this.doc,"load",ot)}};this.showCursor=function(n,t){(e.cursortimeout&&(clearTimeout(e.cursortimeout),e.cursortimeout=0),e.rail)&&(e.autohidedom&&(e.autohidedom.stop().css({opacity:e.opt.cursoropacitymax}),e.cursoractive=!0),e.rail.drag&&e.rail.drag.pt==1||(typeof n!="undefined"&&n!==!1&&(e.scroll.y=Math.round(n*1/e.scrollratio.y)),typeof t!="undefined"&&(e.scroll.x=Math.round(t*1/e.scrollratio.x))),e.cursor.css({height:e.cursorheight,top:e.scroll.y}),e.cursorh&&(!e.rail.align&&e.rail.visibility?e.cursorh.css({width:e.curs
1orwidth,left:e.scroll.x+e.rail.width}):e.cursorh.css({width:e.cursorwidth,left:e.scroll.x}),e.cursoractive=!0),e.zoom&&e.zoom.stop().css({opacity:e.opt.cursoropacitymax}))};this.hideCursor=function(n){e.cursortimeout||e.rail&&e.autohidedom&&(e.cursortimeout=setTimeout(function(){e.rail.active&&e.showonmouseevent||(e.autohidedom.stop().animate({opacity:e.opt.cursoropacitymin}),e.zoom&&e.zoom.stop().animate({opacity:e.opt.cursoropacitymin}),e.cursoractive=!1);e.cursortimeout=0},n||e.opt.hidecursordelay))};this.noticeCursor=function(n,t,i){e.showCursor(t,i);e.rail.active||e.hideCursor(n)};this.getContentSize=e.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:e.haswrapper?function(){return{w:e.doc.outerWidth()+parseInt(e.win.css("paddingLeft"))+parseInt(e.win.css("paddingRight")),h:e.doc.outerHeight()+parseInt(e.win.css("paddingTop"))+parseInt(e.win.css("paddingBottom"))}}:function(){return{w:e.docscroll[0].scrollWidth,h:e.docscroll[0].scrollHeight}};this.onResize=function(n,t){var i,r,u;if(!e.win)return!1;if(!e.haswrapper&&!e.ispage){if(e.win.css("display")=="none")return e.visibility&&e.hideRail().hideRailHr(),!1;e.hidden||e.visibility||e.showRail().showRailHr()}var f=e.page.maxh,o=e.page.maxw,s={h:e.view.h,w:e.view.w};if(e.view={w:e.ispage?e.win.width():parseInt(e.win[0].clientWidth),h:e.ispage?e.win.height():parseInt(e.win[0].clientHeight)},e.page=t?t:e.getContentSize(),e.page.maxh=Math.max(0,e.page.h-e.view.h),e.page.maxw=Math.max(0,e.page.w-e.view.w),e.page.maxh==f&&e.page.maxw==o&&e.view.w==s.w){if(e.ispage||(i=e.win.offset(),e.lastposition&&(r=e.lastposition,r.top==i.top&&r.left==i.left)))return e;e.lastposition=i}return(e.page.maxh==0?(e.hideRail(),e.scrollvaluemax=0,e.scroll.y=0,e.scrollratio.y=0,e.cursorheight=0,e.setScrollTop(0),e.rail.scrollable=!1):e.rail.scrollable=!0,e.page.maxw==0?(e.hideRailHr(),e.scrollvaluemaxw=0,e.scroll.x=0,e.scrollratio.x=0,e.cursorwidth=0,e.setScrollLeft(0),e.railh.scrollable=!1):e.railh.scrollable=!0,e.locked=e.page.maxh==0&&e.page.maxw==0,e.locked)?(e.ispage||e.updateScrollBar(e.view),!1):(e.hidden||e.visibility?e.hidden||e.railh.visibility||e.showRailHr():e.showRail().showRailHr(),e.istextarea&&e.win.css("resize")&&e.win.css("resize")!="none"&&(e.view.h-=20),e.cursorheight=Math.min(e.view.h,Math.round(e.view.h*(e.view.h/e.page.h))),e.cursorheight=e.opt.cursorfixedheight?e.opt.cursorfixedheight:Math.max(e.opt.cursorminheight,e.cursorheight),e.cursorwidth=Math.min(e.view.w,Math.round(e.view.w*(e.view.w/e.page.w))),e.cursorwidth=e.opt.cursorfixedheight?e.opt.cursorfixedheight:Math.max(e.opt.cursorminheight,e.cursorwidth),e.scrollvaluemax=e.view.h-e.cursorheight-e.cursor.hborder,e.railh&&(e.railh.width=e.page.maxh>0?e.view.w-e.rail.width:e.view.w,e.scrollvaluemaxw=e.railh.width-e.cursorwidth-e.cursorh.wborder),e.checkrtlmode&&e.railh&&(e.checkrtlmode=!1,e.opt.rtlmode&&e.scroll.x==0&&e.setScrollLeft(e.page.maxw)),e.ispage||e.updateScrollBar(e.view),e.scrollratio={x:e.page.maxw/e.scrollvaluemaxw,y:e.page.maxh/e.scrollvaluemax},u=e.getScrollTop(),u>e.page.maxh?e.doScrollTop(e.page.maxh):(e.scroll.y=Math.round(e.getScrollTop()*(1/e.scrollratio.y)),e.scroll.x=Math.round(e.getScrollLeft()*(1/e.scrollratio.x)),e.cursoractive&&e.noticeCursor()),e.scroll.y&&e.getScrollTop()==0&&e.doScrollTo(Math.floor(e.scroll.y*e.scrollratio.y)),e)};this.resize=e.onResize;this.lazyResize=function(n){return n=isNaN(n)?30:n,e.delayed("resize",e.resize,n),e};
1this._bind=function(n,t,i,r){e.events.push({e:n,n:t,f:i,b:r,q:!1});n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent?n.attachEvent("on"+t,i):n["on"+t]=i};this.jqbind=function(n,i,r){e.events.push({e:n,n:i,f:r,q:!0});t(n).bind(i,r)};this.bind=function(n,t,i,r){var u="jquery"in n?n[0]:n,f,o;t=="mousewheel"?"onwheel"in e.win?e._bind(u,"wheel",i,r||!1):(f=typeof document.onmousewheel!="undefined"?"mousewheel":"DOMMouseScroll",nt(u,f,i,r||!1),f=="DOMMouseScroll"&&nt(u,"MozMousePixelScroll",i,r||!1)):u.addEventListener?(h.cantouch&&/mouseup|mousedown|mousemove/.test(t)&&(o=t=="mousedown"?"touchstart":t=="mouseup"?"touchend":"touchmove",e._bind(u,o,function(n){var t;n.touches?n.touches.length<2&&(t=n.touches.length?n.touches[0]:n,t.original=n,i.call(this,t)):n.changedTouches&&(t=n.changedTouches[0],t.original=n,i.call(this,t))},r||!1)),e._bind(u,t,i,r||!1),h.cantouch&&t=="mouseup"&&e._bind(u,"touchcancel",i,r||!1)):e._bind(u,t,function(n){return n=n||window.event||!1,n&&n.srcElement&&(n.target=n.srcElement),"pageY"in n||(n.pageX=n.clientX+document.documentElement.scrollLeft,n.pageY=n.clientY+document.documentElement.scrollTop),i.call(u,n)===!1||r===!1?e.cancelEvent(n):!0})};this._unbind=function(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r):n.detachEvent?n.detachEvent("on"+t,i):n["on"+t]=!1};this.unbindAll=function(){for(var n,t=0;t<e.events.length;t++)n=e.events[t],n.q?n.e.unbind(n.n,n.f):e._unbind(n.e,n.n,n.f,n.b)};this.cancelEvent=function(n){var n=n.original?n.original:n?n:window.event||!1;return n?(n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.preventManipulation&&n.preventManipulation(),n.cancelBubble=!0,n.cancel=!0,n.returnValue=!1,!1):!1};this.stopPropagation=function(n){var n=n.original?n.original:n?n:window.event||!1;return n?n.stopPropagation?n.stopPropagation():(n.cancelBubble&&(n.cancelBubble=!0),!1):!1};this.showRail=function(){return e.page.maxh!=0&&(e.ispage||e.win.css("display")!="none")&&(e.visibility=!0,e.rail.visibility=!0,e.rail.css("display","block")),e};this.showRailHr=function(){return e.railh?(e.page.maxw!=0&&(e.ispage||e.win.css("display")!="none")&&(e.railh.visibility=!0,e.railh.css("display","block")),e):e};this.hideRail=function(){return e.visibility=!1,e.rail.visibility=!1,e.rail.css("display","none"),e};this.hideRailHr=function(){return e.railh?(e.railh.visibility=!1,e.railh.css("display","none"),e):e};this.show=function(){return e.hidden=!1,e.locked=!1,e.showRail().showRailHr()};this.hide=function(){return e.hidden=!0,e.locked=!0,e.hideRail().hideRailHr()};this.toggle=function(){return e.hidden?e.show():e.hide()};this.remove=function(){var t,n;for(e.stop(),e.cursortimeout&&clearTimeout(e.cursortimeout),e.doZoomOut(),e.unbindAll(),e.observer!==!1&&e.observer.disconnect(),e.observerremover!==!1&&e.observerremover.disconnect(),e.events=[],e.cursor&&(e.cursor.remove(),e.cursor=null),e.cursorh&&(e.cursorh.remove(),e.cursorh=null),e.rail&&(e.rail.remove(),e.rail=null),e.railh&&(e.railh.remove(),e.railh=null),e.zoom&&(e.zoom.remove(),e.zoom=null),t=0;t<e.saved.css.length;t++)n=e.saved.css[t],n[0].css(n[1],typeof n[2]=="undefined"?"":n[2]);return e.saved=!1,e.me.data("__nicescroll",""),e.me=null,e.doc=null,e.docscroll=null,e.win=null,e};this.scrollstart=function(n){return this.onscrollstart=n,e};this.scrollend=function(n){return this.onscrollend=n,e};this.scrollcancel=function(n){return this.onscrollcancel=n,e};this.zoomin=function(n){return this.onzoomin=n,e};this.zoomout=function(n){return this.onzoomout=n,e};this.isScrollable=function(n){var i=n.target?n.target:n,r,u;if(i.nodeName=="OPTION")return!0;while(i&&i.nodeType==1&&!/BODY|HTML/.test(i.nodeName)){if(r=t(i),u=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"",/scroll|auto/.test(u))return i.clientHeight!=i.scrollHeight;i=i.parentNode?i.parentNode:!1}return!1};this.getViewport=function(n){for(var i=n&&n.parentNode?n.parentNode:!1,r,u;i&&i.nodeType==1&&!/BODY|HTML/.test(i.nodeName);){if((r=t(i),u=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"",/scroll|auto/.test(u)&&i.clientHeight!=i.scrollHeight)||r.getNiceScroll().length>0)return r;i=i.parentNode?i.parentNode:!1}return!1};this.onmousewheel=function(n){var t,i,r;return e.locked?!0:e.rail.drag?e.cancelEvent(n):e.rail.scrollable?(t=+new Date,i=!1,e.opt.preservenativescrolling&&e.checkarea+600<t&&(e.nativescrollingarea=e.isScrollable(n),i=!0),e.checkarea=t,e.nativescrollingarea)?!0:(r=tt(n,!1,i),r&&(e.checkarea=0),r):e.railh&&e.railh.scrollable?e.onmousewheelhr(n):!0};this.onmousewheelhr=function(n){if(e.locked||!e.railh.scrollable)return!0;
1if(e.rail.drag)return e.cancelEvent(n);var t=+new Date,i=!1;return(e.opt.preservenativescrolling&&e.checkarea+600<t&&(e.nativescrollingarea=e.isScrollable(n),i=!0),e.checkarea=t,e.nativescrollingarea)?!0:e.locked?e.cancelEvent(n):tt(n,!0,i)};this.stop=function(){return e.cancelScroll(),e.scrollmon&&e.scrollmon.stop(),e.cursorfreezed=!1,e.scroll.y=Math.round(e.getScrollTop()*(1/e.scrollratio.y)),e.noticeCursor(),e};this.getTransitionSpeed=function(n){var i=Math.round(e.opt.scrollspeed*10),t=Math.min(i,Math.round(n/20*e.opt.scrollspeed));return t>20?t:0};e.opt.smoothscroll?e.ishwscroll&&h.hastransition&&e.opt.usetransition?(this.prepareTransition=function(n,t){var i=t?n>20?n:0:e.getTransitionSpeed(n),r=i?h.prefixstyle+"transform "+i+"ms ease-out":"";return e.lasttransitionstyle&&e.lasttransitionstyle==r||(e.lasttransitionstyle=r,e.doc.css(h.transitionstyle,r)),i},this.doScrollLeft=function(n,t){var i=e.scrollrunning?e.newscrolly:e.getScrollTop();e.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=e.scrollrunning?e.newscrollx:e.getScrollLeft();e.doScrollPos(i,n,t)},this.doScrollPos=function(n,t,i){var r=e.getScrollTop(),u=e.getScrollLeft();if((((e.newscrolly-r)*(t-r)<0||(e.newscrollx-u)*(n-u)<0)&&e.cancelScroll(),e.opt.bouncescroll==!1&&(t<0?t=0:t>e.page.maxh&&(t=e.page.maxh),n<0?n=0:n>e.page.maxw&&(n=e.page.maxw)),e.scrollrunning&&n==e.newscrollx&&t==e.newscrolly)||(e.newscrolly=t,e.newscrollx=n,e.newscrollspeed=i||!1,e.timer))return!1;e.timer=setTimeout(function(){var u=e.getScrollTop(),f=e.getScrollLeft(),r={},o,i,s,c,l;r.x=n-f;r.y=t-u;r.px=f;r.py=u;o=Math.round(Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)));i=e.newscrollspeed&&e.newscrollspeed>1?e.newscrollspeed:e.getTransitionSpeed(o);e.newscrollspeed&&e.newscrollspeed<=1&&(i*=e.newscrollspeed);e.prepareTransition(i,!0);e.timerscroll&&e.timerscroll.tm&&clearInterval(e.timerscroll.tm);i>0&&(!e.scrollrunning&&e.onscrollstart&&(s={type:"scrollstart",current:{x:f,y:u},request:{x:n,y:t},end:{x:e.newscrollx,y:e.newscrolly},speed:i},e.onscrollstart.call(e,s)),h.transitionend?e.scrollendtrapped||(e.scrollendtrapped=!0,e.bind(e.doc,h.transitionend,e.onScrollEnd,!1)):(e.scrollendtrapped&&clearTimeout(e.scrollendtrapped),e.scrollendtrapped=setTimeout(e.onScrollEnd,i)),c=u,l=f,e.timerscroll={bz:new BezierClass(c,e.newscrolly,i,0,0,.58,1),bh:new BezierClass(l,e.newscrollx,i,0,0,.58,1)},e.cursorfreezed||(e.timerscroll.tm=setInterval(function(){e.showCursor(e.getScrollTop(),e.getScrollLeft())},60)));e.synched("doScroll-set",function(){e.timer=0;e.scrollendtrapped&&(e.scrollrunning=!0);e.setScrollTop(e.newscrolly);e.setScrollLeft(e.newscrollx);e.scrollendtrapped||e.onScrollEnd()})},50)},this.cancelScroll=function(){if(!e.scrollendtrapped)return!0;var n=e.getScrollTop(),t=e.getScrollLeft();return e.scrollrunning=!1,h.transitionend||clearTimeout(h.transitionend),e.scrollendtrapped=!1,e._unbind(e.doc,h.transitionend,e.onScrollEnd),e.prepareTransition(0),e.setScrollTop(n),e.railh&&e.setScrollLeft(t),e.timerscroll&&e.timerscroll.tm&&clearInterval(e.timerscroll.tm),e.timerscroll=!1,e.cursorfreezed=!1,e.showCursor(n,t),e},this.onScrollEnd=function(){var n,t,i;if(e.scrollendtrapped&&e._unbind(e.doc,h.transitionend,e.onScrollEnd),e.scrollendtrapped=!1,e.prepareTransition(0),e.timerscroll&&e.timerscroll.tm&&clearInterval(e.timerscroll.tm),e.timerscroll=!1,n=e.getScrollTop(),t=e.getScrollLeft(),e.setScrollTop(n),e.railh&&e.setScrollLeft(t),e.noticeCursor(!1,n,t),e.cursorfreezed=!1,n<0?n=0:n>e.page.maxh&&(n=e.page.maxh),t<0?t=0:t>e.page.maxw&&(t=e.page.maxw),n!=e.newscrolly||t!=e.newscrollx)return e.doScrollPos(t,n,e.opt.snapbackspeed);e.onscrollend&&e.scrollrunning&&(i={type:"scrollend",current:{x:t,y:n},end:{x:e.newscrollx,y:e.newscrolly}},e.onscrollend.call(e,i));e.scrollrunning=!1}):(this.doScrollLeft=function(n,t){var i=e.scrollrunning?e.newscrolly:e.getScrollTop();e.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=e.scrollrunning?e.newscrollx:e.getScrollLeft();e.doScrollPos(i,n,t)},this.doScrollPos=function(n,t,u){function v(){var r,n,t,u,f;if(e.cancelAnimationFrame)return!0;if(e.scrollrunning=!0,a=1-a,a)return e.timer=i(v)||1;r=0;n=sy=e.getScrollTop();
1e.dst.ay?(n=e.bzscroll?e.dst.py+e.bzscroll.getNow()*e.dst.ay:e.newscrolly,u=n-sy,(u<0&&n<e.newscrolly||u>0&&n>e.newscrolly)&&(n=e.newscrolly),e.setScrollTop(n),n==e.newscrolly&&(r=1)):r=1;t=sx=e.getScrollLeft();e.dst.ax?(t=e.bzscroll?e.dst.px+e.bzscroll.getNow()*e.dst.ax:e.newscrollx,u=t-sx,(u<0&&t<e.newscrollx||u>0&&t>e.newscrollx)&&(t=e.newscrollx),e.setScrollLeft(t),t==e.newscrollx&&(r+=1)):r+=1;r==2?(e.timer=0,e.cursorfreezed=!1,e.bzscroll=!1,e.scrollrunning=!1,n<0?n=0:n>e.page.maxh&&(n=e.page.maxh),t<0?t=0:t>e.page.maxw&&(t=e.page.maxw),t!=e.newscrollx||n!=e.newscrolly?e.doScrollPos(t,n):e.onscrollend&&(f={type:"scrollend",current:{x:sx,y:sy},end:{x:e.newscrollx,y:e.newscrolly}},e.onscrollend.call(e,f))):e.timer=i(v)||1}var t=typeof t=="undefined"||t===!1?e.getScrollTop(!0):t,f,o,h,l,c,s,a,y;if(e.timer&&e.newscrolly==t&&e.newscrollx==n)return!0;(e.timer&&r(e.timer),e.timer=0,f=e.getScrollTop(),o=e.getScrollLeft(),((e.newscrolly-f)*(t-f)<0||(e.newscrollx-o)*(n-o)<0)&&e.cancelScroll(),e.newscrolly=t,e.newscrollx=n,e.bouncescroll&&e.rail.visibility||(e.newscrolly<0?e.newscrolly=0:e.newscrolly>e.page.maxh&&(e.newscrolly=e.page.maxh)),e.bouncescroll&&e.railh.visibility||(e.newscrollx<0?e.newscrollx=0:e.newscrollx>e.page.maxw&&(e.newscrollx=e.page.maxw)),e.dst={},e.dst.x=n-o,e.dst.y=t-f,e.dst.px=o,e.dst.py=f,h=Math.round(Math.sqrt(Math.pow(e.dst.x,2)+Math.pow(e.dst.y,2))),e.dst.ax=e.dst.x/h,e.dst.ay=e.dst.y/h,l=0,c=h,e.dst.x==0?(l=f,c=t,e.dst.ay=1,e.dst.py=0):e.dst.y==0&&(l=o,c=n,e.dst.ax=1,e.dst.px=0),s=e.getTransitionSpeed(h),u&&u<=1&&(s*=u),e.bzscroll=s>0?e.bzscroll?e.bzscroll.update(c,s):new BezierClass(l,c,s,0,1,0,1):!1,e.timer)||((f==e.page.maxh&&t>=e.page.maxh||o==e.page.maxw&&n>=e.page.maxw)&&e.checkContentSize(),a=1,e.cancelAnimationFrame=!1,e.timer=1,e.onscrollstart&&!e.scrollrunning&&(y={type:"scrollstart",current:{x:o,y:f},request:{x:n,y:t},end:{x:e.newscrollx,y:e.newscrolly},speed:s},e.onscrollstart.call(e,y)),v(),(f==e.page.maxh&&t>=f||o==e.page.maxw&&n>=o)&&e.checkContentSize(),e.noticeCursor())},this.cancelScroll=function(){return e.timer&&r(e.timer),e.timer=0,e.bzscroll=!1,e.scrollrunning=!1,e}):(this.doScrollLeft=function(n,t){var i=e.getScrollTop();e.doScrollPos(n,i,t)},this.doScrollTop=function(n,t){var i=e.getScrollLeft();e.doScrollPos(i,n,t)},this.doScrollPos=function(n,t){var r=n>e.page.maxw?e.page.maxw:n,i;r<0&&(r=0);i=t>e.page.maxh?e.page.maxh:t;i<0&&(i=0);e.synched("scroll",function(){e.setScrollTop(i);e.setScrollLeft(r)})},this.cancelScroll=function(){});this.doScrollBy=function(n,t){var i=0,u,r;if(t?i=Math.floor((e.scroll.y-n)*e.scrollratio.y):(u=e.timer?e.newscrolly:e.getScrollTop(!0),i=u-n),e.bouncescroll&&(r=Math.round(e.view.h/2),i<-r?i=-r:i>e.page.maxh+r&&(i=e.page.maxh+r)),e.cursorfreezed=!1,py=e.getScrollTop(!0),i<0&&py<=0)return e.noticeCursor();if(i>e.page.maxh&&py>=e.page.maxh)return e.checkContentSize(),e.noticeCursor();e.doScrollTop(i)};this.doScrollLeftBy=function(n,t){var i=0,u,r;if((t?i=Math.floor((e.scroll.x-n)*e.scrollratio.x):(u=e.timer?e.newscrollx:e.getScrollLeft(!0),i=u-n),e.bouncescroll&&(r=Math.round(e.view.w/2),i<-r?i=-r:i>e.page.maxw+r&&(i=e.page.maxw+r)),e.cursorfreezed=!1,px=e.getScrollLeft(!0),i<0&&px<=0)||i>e.page.maxw&&px>=e.page.maxw)return e.noticeCursor();e.doScrollLeft(i)};this.doScrollTo=function(n,t){var i=t?Math.round(n*e.scrollratio.y):n;i<0?i=0:i>e.page.maxh&&(i=e.page.maxh);e.cursorfreezed=!1;e.doScrollTop(n)};this.checkContentSize=function(){var n=e.getContentSize();(n.h!=e.page.h||n.w!=e.page.w)&&e.resize(!1,n)};e.onscroll=function(){e.rail.drag||e.cursorfreezed||e.synched("scroll",function(){e.scroll.y=Math.round(e.getScrollTop()*(1/e.scrollratio.y));e.railh&&(e.scroll.x=Math.round(e.getScrollLeft()*(1/e.scrollratio.x)));e.noticeCursor()})};e.bind(e.docscroll,"scroll",e.onscroll);this.doZoomIn=function(n){var r,f,s,i,o;if(!e.zoomactive){e.zoomactive=!0;e.zoomrestore={style:{}};r=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"];f=e.win[0].style;for(s in r)i=r[s],e.zoomrestore.style[i]=typeof f[i]!="undefined"?f[i]:"";return e.zoomrestore.style.width=e.win.css("width"),e.zoomrestore.style.height=e.win.css("height"),e.zoomrestore.padding={w:e.win.outerWidth()-e.win.width(),h:e.win.outerHeight()-e.win.height()},h.isios4&&(e.zoomrestore.scrollTop=t(window).scrollTop(),t(window).scrollTop(0)),e.win.css({position:h.isios4?"absolute":"fixed",top:0,left:0,"z-index":u+100,margin:"0px"}
1),o=e.win.css("backgroundColor"),(o==""||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(o))&&e.win.css("backgroundColor","#fff"),e.rail.css({"z-index":u+101}),e.zoom.css({"z-index":u+102}),e.zoom.css("backgroundPosition","0px -18px"),e.resizeZoom(),e.onzoomin&&e.onzoomin.call(e),e.cancelEvent(n)}};this.doZoomOut=function(n){if(e.zoomactive)return e.zoomactive=!1,e.win.css("margin",""),e.win.css(e.zoomrestore.style),h.isios4&&t(window).scrollTop(e.zoomrestore.scrollTop),e.rail.css({"z-index":e.zindex}),e.zoom.css({"z-index":e.zindex}),e.zoomrestore=!1,e.zoom.css("backgroundPosition","0px 0px"),e.onResize(),e.onzoomout&&e.onzoomout.call(e),e.cancelEvent(n)};this.doZoom=function(n){return e.zoomactive?e.doZoomOut(n):e.doZoomIn(n)};this.resizeZoom=function(){if(e.zoomactive){var n=e.getScrollTop();e.win.css({width:t(window).width()-e.zoomrestore.padding.w+"px",height:t(window).height()-e.zoomrestore.padding.h+"px"});e.onResize();e.setScrollTop(Math.min(e.page.maxh,n))}};this.init();t.nicescroll.push(this)},y=function(n){var t=this;this.nc=n;this.lastx=0;this.lasty=0;this.speedx=0;this.speedy=0;this.lasttime=0;this.steptime=0;this.snapx=!1;this.snapy=!1;this.demulx=0;this.demuly=0;this.lastscrollx=-1;this.lastscrolly=-1;this.chkx=0;this.chky=0;this.timer=0;this.time=function(){return+new Date};this.reset=function(n,i){t.stop();var r=t.time();t.steptime=0;t.lasttime=r;t.speedx=0;t.speedy=0;t.lastx=n;t.lasty=i;t.lastscrollx=-1;t.lastscrolly=-1};this.update=function(n,i){var r=t.time();t.steptime=r-t.lasttime;t.lasttime=r;var u=i-t.lasty,f=n-t.lastx,s=t.nc.getScrollTop(),h=t.nc.getScrollLeft(),e=s+u,o=h+f;t.snapx=o<0||o>t.nc.page.maxw;t.snapy=e<0||e>t.nc.page.maxh;t.speedx=f;t.speedy=u;t.lastx=n;t.lasty=i};this.stop=function(){t.nc.unsynched("domomentum2d");t.timer&&clearTimeout(t.timer);t.timer=0;t.lastscrollx=-1;t.lastscrolly=-1};this.doSnapy=function(n,i){var r=!1;i<0?(i=0,r=!0):i>t.nc.page.maxh&&(i=t.nc.page.maxh,r=!0);n<0?(n=0,r=!0):n>t.nc.page.maxw&&(n=t.nc.page.maxw,r=!0);r&&t.nc.doScrollPos(n,i,t.nc.opt.snapbackspeed)};this.doMomentum=function(n){var e=t.time(),c=n?e+n:t.lasttime,l=t.nc.getScrollLeft(),a=t.nc.getScrollTop(),o=t.nc.page.maxh,s=t.nc.page.maxw,f,v,y,u,h;if(t.speedx=s>0?Math.min(60,t.speedx):0,t.speedy=o>0?Math.min(60,t.speedy):0,f=c&&e-c<=50,(a<0||a>o||l<0||l>s)&&(f=!1),v=t.speedy&&f?t.speedy:!1,y=t.speedx&&f?t.speedx:!1,v||y){u=Math.max(16,t.steptime);u>50&&(h=u/50,t.speedx*=h,t.speedy*=h,u=50);t.demulxy=0;t.lastscrollx=t.nc.getScrollLeft();t.chkx=t.lastscrollx;t.lastscrolly=t.nc.getScrollTop();t.chky=t.lastscrolly;var i=t.lastscrollx,r=t.lastscrolly,p=function(){var n=t.time()-e>600?.04:.02;t.speedx&&(i=Math.floor(t.lastscrollx-t.speedx*(1-t.demulxy)),t.lastscrollx=i,(i<0||i>s)&&(n=.1));t.speedy&&(r=Math.floor(t.lastscrolly-t.speedy*(1-t.demulxy)),t.lastscrolly=r,(r<0||r>o)&&(n=.1));t.demulxy=Math.min(1,t.demulxy+n);t.nc.synched("domomentum2d",function(){var n,u;
1t.speedx&&(n=t.nc.getScrollLeft(),n!=t.chkx&&t.stop(),t.chkx=i,t.nc.setScrollLeft(i));t.speedy&&(u=t.nc.getScrollTop(),u!=t.chky&&t.stop(),t.chky=r,t.nc.setScrollTop(r));t.timer||(t.nc.hideCursor(),t.doSnapy(i,r))});t.demulxy<1?t.timer=setTimeout(p,u):(t.stop(),t.nc.hideCursor(),t.doSnapy(i,r))};p()}else t.doSnapy(t.nc.getScrollLeft(),t.nc.getScrollTop())}},h=n.fn.scrollTop;n.cssHooks.pageYOffset={get:function(n){var i=t.data(n,"__nicescroll")||!1;return i&&i.ishwscroll?i.getScrollTop():h.call(n)},set:function(n,i){var r=t.data(n,"__nicescroll")||!1;return r&&r.ishwscroll?r.setScrollTop(parseInt(i)):h.call(n,i),this}};n.fn.scrollTop=function(n){if(typeof n=="undefined"){var i=this[0]?t.data(this[0],"__nicescroll")||!1:!1;return i&&i.ishwscroll?i.getScrollTop():h.call(this)}return this.each(function(){var i=t.data(this,"__nicescroll")||!1;i&&i.ishwscroll?i.setScrollTop(parseInt(n)):h.call(t(this),n)})};f=n.fn.scrollLeft;t.cssHooks.pageXOffset={get:function(n){var i=t.data(n,"__nicescroll")||!1;return i&&i.ishwscroll?i.getScrollLeft():f.call(n)},set:function(n,i){var r=t.data(n,"__nicescroll")||!1;return r&&r.ishwscroll?r.setScrollLeft(parseInt(i)):f.call(n,i),this}};n.fn.scrollLeft=function(n){if(typeof n=="undefined"){var i=this[0]?t.data(this[0],"__nicescroll")||!1:!1;return i&&i.ishwscroll?i.getScrollLeft():f.call(this)}return this.each(function(){var i=t.data(this,"__nicescroll")||!1;i&&i.ishwscroll?i.setScrollLeft(parseInt(n)):f.call(t(this),n)})};e=function(n){var i=this,r;if(this.length=0,this.name="nicescrollarray",this.each=function(n){for(var t=0;t<i.length;t++)n.call(i[t]);return i},this.push=function(n){i[i.length]=n;i.length++},this.eq=function(n){return i[n]},n)for(a=0;a<n.length;a++)r=t.data(n[a],"__nicescroll")||!1,r&&(this[this.length]=r,this.length++);return this};nt(e.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(n,t){n[t]=function(){var n=arguments;return this.each(function(){this[t].apply(this,n)})}});n.fn.getNiceScroll=function(n){return typeof n=="undefined"?new e(this):t.data(this[n],"__nicescroll")||!1};n.extend(n.expr[":"],{nicescroll:function(n){return t.data(n,"__nicescroll")?!0:!1}});t.fn.niceScroll=function(n,i){var r,u;return typeof i=="undefined"&&(typeof n!="object"||"jquery"in n||(i=n,n=!1)),r=new e,typeof i=="undefined"&&(i={}),(n||!1)&&(i.doc=t(n),i.win=t(this)),u=!("doc"in i),u||"win"in i||(i.win=t(this)),this.each(function(){var n=t(this).data("__nicescroll")||!1;n||(i.doc=u?t(this):i.doc,n=new g(i,t(this)),t(this).data("__nicescroll",n));r.push(n)}),r.length==1?r[0]:r};window.NiceScroll={getjQuery:function(){return n}};t.nicescroll||(t.nicescroll=new e,t.nicescroll.options=v)})(jQuery)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.