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