!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){var o=!1,t=!1,i=0,r=2e3,n=0,s=["webkit","ms","moz","o"],l=window.requestAnimationFrame||!1,a=window.cancelAnimationFrame||!1;if(!l)for(var c in s){var d=s[c];l||(l=window[d+"RequestAnimationFrame"]),a||(a=window[d+"CancelAnimationFrame"]||window[d+"CancelRequestAnimationFrame"])}var u,h=window.MutationObserver||window.WebKitMutationObserver||!1,p={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,railhoffset:!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:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:0<(u=(u=document.getElementsByTagName("script")).length?u[u.length-1].src.split("?")[0]:"").split("/").length?u.split("/").slice(0,-1).join("/")+"/":"",preventmultitouchscrolling:!0},m=!1,g=function(s,c){function d(){var e=v.doc.css(y.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function u(e,o,t){return o=e.css(o),e=parseFloat(o),isNaN(e)?(t=3==(e=T[o]||0)?t?v.win.outerHeight()-v.win.innerHeight():v.win.outerWidth()-v.win.innerWidth():1,v.isie8&&e&&(e+=1),t?e:0):e}function g(e,o,t,i){v._bind(e,o,function(i){var r={original:i=i||window.event,target:i.target||i.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==i.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return i.preventDefault?i.preventDefault():i.returnValue=!1,!1},stopImmediatePropagation:function(){i.stopImmediatePropagation?i.stopImmediatePropagation():i.cancelBubble=!0}};return"mousewheel"==o?(r.deltaY=-.025*i.wheelDelta,i.wheelDeltaX&&(r.deltaX=-.025*i.wheelDeltaX)):r.deltaY=i.detail,t.call(e,r)},i)}function w(e,o,t){var i,r;if(0==e.deltaMode?(i=-Math.floor(v.opt.mousescrollstep/54*e.deltaX),r=-Math.floor(v.opt.mousescrollstep/54*e.deltaY)):1==e.deltaMode&&(i=-Math.floor(e.deltaX*v.opt.mousescrollstep),r=-Math.floor(e.deltaY*v.opt.mousescrollstep)),o&&v.opt.oneaxismousemode&&0==i&&r&&(i=r,r=0,t&&(0>i?v.getScrollLeft()>=v.page.maxw:0>=v.getScrollLeft())&&(r=i,i=0)),i&&(v.scrollmom&&v.scrollmom.stop(),v.lastdeltax+=i,v.debounced("mousewheelx",function(){var e=v.lastdeltax;v.lastdeltax=0,v.rail.drag||v.doScrollLeftBy(e)},15)),r){if(v.opt.nativeparentscrolling&&t&&!v.ispage&&!v.zoomactive)if(0>r){if(v.getScrollTop()>=v.page.maxh)return!0}else if(0>=v.getScrollTop())return!0;v.scrollmom&&v.scrollmom.stop(),v.lastdeltay+=r,v.debounced("mousewheely",function(){var e=v.lastdeltay;v.lastdeltay=0,v.rail.drag||v.doScrollBy(e)},15)}return e.stopImmediatePropagation(),e.preventDefault()}var v=this;if(this.version="3.6.6",this.name="nicescroll",this.me=c,this.opt={doc:e("body"),win:!1},e.extend(this.opt,p),this.opt.snapbackspeed=80,s)for(var b in v.opt)void 0!==s[b]&&(v.opt[b]=s[b]);this.iddoc=(this.doc=v.opt.doc)&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(v.opt.win?v.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==v.opt.win,this.win=v.opt.win||(this.ispage?e(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win,this.body=e("body"),this.iframe=this.isfixed=this.viewport=!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"!=v.opt.autohidemode,this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.isrtlmode="auto"==this.opt.rtlmode?"rtl"==(this.win[0]==window?this.body:this.win).css("direction"):!0===this.opt.rtlmode,this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;do{this.id="ascrail"+r++}while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1,this.visibility=!0,this.hidden=this.locked=this.railslocked=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=v.opt.overflowx,this.overflowy=v.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltay=this.lastdeltax=0,this.detected=function(){if(m)return m;var e=document.createElement("DIV"),o=e.style,t=navigator.userAgent,i=navigator.platform,r={haspointerlock:"pointerLockElement"in document||"webkitPointerLockElement"in document||"mozPointerLockElement"in document};r.isopera="opera"in window,r.isopera12=r.isopera&&"getUserMedia"in navigator,r.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),r.isie="all"in document&&"attachEvent"in e&&!r.isopera,r.isieold=r.isie&&!("msInterpolationMode"in o),r.isie7=r.isie&&!r.isieold&&(!("documentMode"in document)||7==document.documentMode),r.isie8=r.isie&&"documentMode"in document&&8==document.documentMode,r.isie9=r.isie&&"performance"in window&&9<=document.documentMode,r.isie10=r.isie&&"performance"in window&&10==document.documentMode,r.isie11="msRequestFullscreen"in e&&11<=document.documentMode,r.isieedge=navigator.userAgent.match(/Edge\/12\./),r.isie9mobile=/iemobile.9/i.test(t),r.isie9mobile&&(r.isie9=!1),r.isie7mobile=!r.isie9mobile&&r.isie7&&/iemobile/i.test(t),r.ismozilla="MozAppearance"in o,r.iswebkit="WebkitAppearance"in o,r.ischrome="chrome"in window,r.ischrome22=r.ischrome&&r.haspointerlock,r.ischrome26=r.ischrome&&"transition"in o,r.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,r.hasmstouch=window.MSPointerEvent||!1,r.hasw3ctouch=!!window.PointerEvent&&(0e?this.ed:this.st+Math.round(this.df*o)},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,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"},y.hastranslate3d&&y.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){if(e=d())return 16==e.length?-e[13]:-e[5];if(v.timerscroll&&v.timerscroll.bz)return v.timerscroll.bz.getNow()}return v.doc.translate.y},this.getScrollLeft=function(e){if(!e){if(e=d())return 16==e.length?-e[12]:-e[4];if(v.timerscroll&&v.timerscroll.bh)return v.timerscroll.bh.getNow()}return v.doc.translate.x},this.notifyScrollEvent=function(e){var o=document.createEvent("UIEvents");o.initUIEvent("scroll",!1,!0,window,1),o.niceevent=!0,e.dispatchEvent(o)};var z=this.isrtlmode?1:-1;y.hastranslate3d&&v.opt.enabletranslate3d?(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0px)"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*z+"px",v.doc.css(y.trstyle,"translate3d("+v.doc.translate.tx+","+v.doc.translate.ty+",0px)"),o||v.notifyScrollEvent(v.win[0])}):(this.setScrollTop=function(e,o){v.doc.translate.y=e,v.doc.translate.ty=-1*e+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])},this.setScrollLeft=function(e,o){v.doc.translate.x=e,v.doc.translate.tx=e*z+"px",v.doc.css(y.trstyle,"translate("+v.doc.translate.tx+","+v.doc.translate.ty+")"),o||v.notifyScrollEvent(v.win[0])})}else this.getScrollTop=function(){return v.docscroll.scrollTop()},this.setScrollTop=function(e){return setTimeout(function(){v.docscroll.scrollTop(e)},1)},this.getScrollLeft=function(){return v.detected.ismozilla&&v.isrtlmode?Math.abs(v.docscroll.scrollLeft()):v.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){v.docscroll.scrollLeft(v.detected.ismozilla&&v.isrtlmode?-e:e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var T={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}},this.getOffset=function(){if(v.isfixed){var e=v.win.offset(),o=v.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}return e=v.win.offset(),v.viewport?(o=v.viewport.offset(),{top:e.top-o.top,left:e.left-o.left}):e},this.updateScrollBar=function(e){if(v.ishwscroll)v.rail.css({height:v.win.innerHeight()-(v.opt.railpadding.top+v.opt.railpadding.bottom)}),v.railh&&v.railh.css({width:v.win.innerWidth()-(v.opt.railpadding.left+v.opt.railpadding.right)});else{var o=v.getOffset(),t=o.top,i=o.left-(v.opt.railpadding.left+v.opt.railpadding.right),r=(t=t+u(v.win,"border-top-width",!0),i=i+(v.rail.align?v.win.outerWidth()-u(v.win,"border-right-width")-v.rail.width:u(v.win,"border-left-width")),v.opt.railoffset);r&&(r.top&&(t+=r.top),r.left&&(i+=r.left)),v.railslocked||v.rail.css({top:t,left:i,height:(e?e.h:v.win.innerHeight())-(v.opt.railpadding.top+v.opt.railpadding.bottom)}),v.zoom&&v.zoom.css({top:t+1,left:1==v.rail.align?i-20:i+v.rail.width+4}),v.railh&&!v.railslocked&&(t=o.top,i=o.left,(r=v.opt.railhoffset)&&(r.top&&(t+=r.top),r.left&&(i+=r.left)),e=v.railh.align?t+u(v.win,"border-top-width",!0)+v.win.innerHeight()-v.railh.height:t+u(v.win,"border-top-width",!0),i+=u(v.win,"border-left-width"),v.railh.css({top:e-(v.opt.railpadding.top+v.opt.railpadding.bottom),left:i,width:v.railh.width}))}},this.doRailClick=function(e,o,t){var i;v.railslocked||(v.cancelEvent(e),o?(o=t?v.doScrollLeft:v.doScrollTop)(i=t?(e.pageX-v.railh.offset().left-v.cursorwidth/2)*v.scrollratio.x:(e.pageY-v.rail.offset().top-v.cursorheight/2)*v.scrollratio.y):(o=t?v.doScrollLeftBy:v.doScrollBy,i=t?v.scroll.x:v.scroll.y,e=t?e.pageX-v.railh.offset().left:e.pageY-v.rail.offset().top,t=t?v.view.w:v.view.h,o(i>=e?t:-t)))},v.hasanimationframe=l,v.hascancelanimationframe=a,v.hasanimationframe?v.hascancelanimationframe||(a=function(){v.cancelAnimationFrame=!0}):(l=function(e){return setTimeout(e,15-Math.floor(+new Date/1e3)%16)},a=clearInterval),this.init=function(){if(v.saved.css=[],y.isie7mobile||y.isoperamini)return!0;if(y.hasmstouch&&v.css(v.ispage?e("html"):v.win,{"-ms-touch-action":"none"}),v.zindex="auto",v.zindex=v.ispage||"auto"!=v.opt.zindex?v.opt.zindex:function(){var e=v.win;if("zIndex"in e)return e.zIndex();for(;0n&&(n=v.zindex),v.isie&&0==v.zindex&&"auto"==v.opt.zindex&&(v.zindex="auto"),!v.ispage||!y.cantouch&&!y.isieold&&!y.isie9mobile){var r=v.docscroll;v.ispage&&(r=v.haswrapper?v.win:v.doc),y.isie9mobile||v.css(r,{"overflow-y":"hidden"}),v.ispage&&y.isie7&&("BODY"==v.doc[0].nodeName?v.css(e("html"),{"overflow-y":"hidden"}):"HTML"==v.doc[0].nodeName&&v.css(e("body"),{"overflow-y":"hidden"})),!y.isios||v.ispage||v.haswrapper||v.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var s=e(document.createElement("div"));s.css({position:"relative",top:0,float:"right",width:v.opt.cursorwidth,height:"0px","background-color":v.opt.cursorcolor,border:v.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":v.opt.cursorborderradius,"-moz-border-radius":v.opt.cursorborderradius,"border-radius":v.opt.cursorborderradius}),s.hborder=parseFloat(s.outerHeight()-s.innerHeight()),s.addClass("nicescroll-cursors"),v.cursor=s,(w=e(document.createElement("div"))).attr("id",v.id),w.addClass("nicescroll-rails nicescroll-rails-vr");var l,a,c,d,u=["left","right","top","bottom"];for(c in u)a=u[c],(l=v.opt.railpadding[a])?w.css("padding-"+a,l+"px"):v.opt.railpadding[a]=0;if(w.append(s),w.width=Math.max(parseFloat(v.opt.cursorwidth),s.outerWidth()),w.css({width:w.width+"px",zIndex:v.zindex,background:v.opt.background,cursor:"default"}),w.visibility=!0,w.scrollable=!0,w.align="left"==v.opt.railalign?0:1,v.rail=w,s=v.rail.drag=!1,!v.opt.boxzoom||v.ispage||y.isieold||(s=document.createElement("div"),v.bind(s,"click",v.doZoom),v.bind(s,"mouseenter",function(){v.zoom.css("opacity",v.opt.cursoropacitymax)}),v.bind(s,"mouseleave",function(){v.zoom.css("opacity",v.opt.cursoropacitymin)}),v.zoom=e(s),v.zoom.css({cursor:"pointer","z-index":v.zindex,backgroundImage:"url("+v.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),v.opt.dblclickzoom&&v.bind(v.win,"dblclick",v.doZoom),y.cantouch&&v.opt.gesturezoom&&(v.ongesturezoom=function(e){return 1.5e.scale&&v.doZoomOut(e),v.cancelEvent(e)},v.bind(v.win,"gestureend",v.ongesturezoom))),v.railh=!1,v.opt.horizrailenabled&&(v.css(r,{"overflow-x":"hidden"}),(s=e(document.createElement("div"))).css({position:"absolute",top:0,height:v.opt.cursorwidth,width:"0px","background-color":v.opt.cursorcolor,border:v.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":v.opt.cursorborderradius,"-moz-border-radius":v.opt.cursorborderradius,"border-radius":v.opt.cursorborderradius}),y.isieold&&s.css({overflow:"hidden"}),s.wborder=parseFloat(s.outerWidth()-s.innerWidth()),s.addClass("nicescroll-cursors"),v.cursorh=s,(d=e(document.createElement("div"))).attr("id",v.id+"-hr"),d.addClass("nicescroll-rails nicescroll-rails-hr"),d.height=Math.max(parseFloat(v.opt.cursorwidth),s.outerHeight()),d.css({height:d.height+"px",zIndex:v.zindex,background:v.opt.background}),d.append(s),d.visibility=!0,d.scrollable=!0,d.align="top"==v.opt.railvalign?0:1,v.railh=d,v.railh.drag=!1),v.ispage?(w.css({position:"fixed",top:"0px",height:"100%"}),w.align?w.css({right:"0px"}):w.css({left:"0px"}),v.body.append(w),v.railh&&(d.css({position:"fixed",left:"0px",width:"100%"}),d.align?d.css({bottom:"0px"}):d.css({top:"0px"}),v.body.append(d))):(v.ishwscroll?("static"==v.win.css("position")&&v.css(v.win,{position:"relative"}),r="HTML"==v.win[0].nodeName?v.body:v.win,e(r).scrollTop(0).scrollLeft(0),v.zoom&&(v.zoom.css({position:"absolute",top:1,right:0,"margin-right":w.width+4}),r.append(v.zoom)),w.css({position:"absolute",top:0}),w.align?w.css({right:0}):w.css({left:0}),r.append(w),d&&(d.css({position:"absolute",left:0,bottom:0}),d.align?d.css({bottom:0}):d.css({top:0}),r.append(d))):(v.isfixed="fixed"==v.win.css("position"),r=v.isfixed?"fixed":"absolute",v.isfixed||(v.viewport=v.getViewport(v.win[0])),v.viewport&&(v.body=v.viewport,0==/fixed|absolute/.test(v.viewport.css("position"))&&v.css(v.viewport,{position:"relative"})),w.css({position:r}),v.zoom&&v.zoom.css({position:r}),v.updateScrollBar(),v.body.append(w),v.zoom&&v.body.append(v.zoom),v.railh&&(d.css({position:r}),v.body.append(d))),y.isios&&v.css(v.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),y.isie&&v.opt.disableoutline&&v.win.attr("hideFocus","true"),y.iswebkit&&v.opt.disableoutline&&v.win.css({outline:"none"})),!1===v.opt.autohidemode?(v.autohidedom=!1,v.rail.css({opacity:v.opt.cursoropacitymax}),v.railh&&v.railh.css({opacity:v.opt.cursoropacitymax})):!0===v.opt.autohidemode||"leave"===v.opt.autohidemode?(v.autohidedom=e().add(v.rail),y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursor)),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh)),v.railh&&y.isie8&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"scroll"==v.opt.autohidemode?(v.autohidedom=e().add(v.rail),v.railh&&(v.autohidedom=v.autohidedom.add(v.railh))):"cursor"==v.opt.autohidemode?(v.autohidedom=e().add(v.cursor),v.railh&&(v.autohidedom=v.autohidedom.add(v.cursorh))):"hidden"==v.opt.autohidemode&&(v.autohidedom=!1,v.hide(),v.railslocked=!1),y.isie9mobile)v.scrollmom=new f(v),v.onmangotouch=function(){var e=v.getScrollTop(),o=v.getScrollLeft();if(e==v.scrollmom.lastscrolly&&o==v.scrollmom.lastscrollx)return!0;var t=e-v.mangotouch.sy,i=o-v.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(i,2)+Math.pow(t,2)))){var r=0>t?-1:1,n=0>i?-1:1,s=+new Date;v.mangotouch.lazy&&clearTimeout(v.mangotouch.lazy),80c?c=Math.round(c/2):c>v.page.maxh&&(c=v.page.maxh+Math.round((c-v.page.maxh)/2)):(0>c&&(n=c=0),c>v.page.maxh&&(c=v.page.maxh,n=0)),v.railh&&v.railh.scrollable&&(s=v.isrtlmode?a-v.rail.drag.sl:v.rail.drag.sl-a,v.ishwscroll&&v.opt.bouncescroll?0>s?s=Math.round(s/2):s>v.page.maxw&&(s=v.page.maxw+Math.round((s-v.page.maxw)/2)):(0>s&&(l=s=0),s>v.page.maxw&&(s=v.page.maxw,l=0))),i=!1,v.rail.drag.dl)i=!0,"v"==v.rail.drag.dl?s=v.rail.drag.sl:"h"==v.rail.drag.dl&&(c=v.rail.drag.st);else{r=Math.abs(r);a=Math.abs(a);var d=v.opt.directionlockdeadzone;if("v"==v.rail.drag.ck){if(r>d&&a<=.3*r)return v.rail.drag=!1,!0;a>d&&(v.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==v.rail.drag.ck){if(a>d&&r<=.3*a)return v.rail.drag=!1,!0;r>d&&(v.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}if(v.synched("touchmove",function(){v.rail.drag&&2==v.rail.drag.pt&&(v.prepareTransition&&v.prepareTransition(0),v.rail.scrollable&&v.setScrollTop(c),v.scrollmom.update(l,n),v.railh&&v.railh.scrollable?(v.setScrollLeft(s),v.showCursor(c,s)):v.showCursor(c),y.isie10&&document.selection.clear())}),y.ischrome&&v.istouchcapable&&(i=!1),i)return v.cancelEvent(o)}else if(1==v.rail.drag.pt)return v.onmousemove(o)}}if(v.onmousedown=function(e,o){if(!v.rail.drag||1==v.rail.drag.pt){if(v.railslocked)return v.cancelEvent(e);v.cancelScroll(),v.rail.drag={x:e.clientX,y:e.clientY,sx:v.scroll.x,sy:v.scroll.y,pt:1,hr:!!o};var t=v.getTarget(e);return!v.ispage&&y.hasmousecapture&&t.setCapture(),v.isiframe&&!y.hasmousecapture&&(v.saved.csspointerevents=v.doc.css("pointer-events"),v.css(v.doc,{"pointer-events":"none"})),v.hasmoving=!1,v.cancelEvent(e)}},v.onmouseup=function(e){if(v.rail.drag)return 1!=v.rail.drag.pt||(y.hasmousecapture&&document.releaseCapture(),v.isiframe&&!y.hasmousecapture&&v.doc.css("pointer-events",v.saved.csspointerevents),v.rail.drag=!1,v.hasmoving&&v.triggerScrollEnd(),v.cancelEvent(e))},v.onmousemove=function(e){if(v.rail.drag){if(1==v.rail.drag.pt){if(y.ischrome&&0==e.which)return v.onmouseup(e);if(v.cursorfreezed=!0,v.hasmoving=!0,v.rail.drag.hr){v.scroll.x=v.rail.drag.sx+(e.clientX-v.rail.drag.x),0>v.scroll.x&&(v.scroll.x=0);var o=v.scrollvaluemaxw;v.scroll.x>o&&(v.scroll.x=o)}else v.scroll.y=v.rail.drag.sy+(e.clientY-v.rail.drag.y),0>v.scroll.y&&(v.scroll.y=0),o=v.scrollvaluemax,v.scroll.y>o&&(v.scroll.y=o);return v.synched("mousemove",function(){v.rail.drag&&1==v.rail.drag.pt&&(v.showCursor(),v.rail.drag.hr?v.hasreversehr?v.doScrollLeft(v.scrollvaluemaxw-Math.round(v.scroll.x*v.scrollratio.x),v.opt.cursordragspeed):v.doScrollLeft(Math.round(v.scroll.x*v.scrollratio.x),v.opt.cursordragspeed):v.doScrollTop(Math.round(v.scroll.y*v.scrollratio.y),v.opt.cursordragspeed))}),v.cancelEvent(e)}}else v.checkarea=0},y.cantouch||v.opt.touchbehavior)v.onpreventclick=function(e){if(v.preventclick)return v.preventclick.tg.onclick=v.preventclick.click,v.preventclick=!1,v.cancelEvent(e)},v.bind(v.win,"mousedown",v.ontouchstart),v.onclick=!y.isios&&function(e){return!v.lastmouseup||(v.lastmouseup=!1,v.cancelEvent(e))},v.opt.grabcursorenabled&&y.cursorgrabvalue&&(v.css(v.ispage?v.doc:v.win,{cursor:y.cursorgrabvalue}),v.css(v.rail,{cursor:y.cursorgrabvalue}));else{var m=function(e){if(v.selectiondrag){if(e){var o=v.win.outerHeight();0<(e=e.pageY-v.selectiondrag.top)&&e=o&&(e-=o),v.selectiondrag.df=e}0!=v.selectiondrag.df&&(v.doScrollBy(2*-Math.floor(v.selectiondrag.df/6)),v.debounced("doselectionscroll",function(){m()},50))}};v.hasTextSelected="getSelection"in document?function(){return 0v.page.maxh?v.doScrollTop(v.page.maxh):(v.scroll.y=Math.round(v.getScrollTop()*(1/v.scrollratio.y)),v.scroll.x=Math.round(v.getScrollLeft()*(1/v.scrollratio.x)),v.cursoractive&&v.noticeCursor()),v.scroll.y&&0==v.getScrollTop()&&v.doScrollTo(Math.floor(v.scroll.y*v.scrollratio.y)),v)},this.resize=v.onResize,this.lazyResize=function(e){return e=isNaN(e)?30:e,v.debounced("resize",v.resize,e),v},this.jqbind=function(o,t,i){v.events.push({e:o,n:t,f:i,q:!0}),e(o).bind(t,i)},this.bind=function(e,o,t,i){var r="jquery"in e?e[0]:e;"mousewheel"==o?"onwheel"in v.win?v._bind(r,"wheel",t,i||!1):(e=void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",g(r,e,t,i||!1),"DOMMouseScroll"==e&&g(r,"MozMousePixelScroll",t,i||!1)):r.addEventListener?(y.cantouch&&/mouseup|mousedown|mousemove/.test(o)&&v._bind(r,"mousedown"==o?"touchstart":"mouseup"==o?"touchend":"touchmove",function(e){if(e.touches){if(2>e.touches.length){var o=e.touches.length?e.touches[0]:e;o.original=e,t.call(this,o)}}else e.changedTouches&&(o=e.changedTouches[0],o.original=e,t.call(this,o))},i||!1),v._bind(r,o,t,i||!1),y.cantouch&&"mouseup"==o&&v._bind(r,"touchcancel",t,i||!1)):v._bind(r,o,function(e){return(e=e||window.event||!1)&&e.srcElement&&(e.target=e.srcElement),"pageY"in e||(e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop),!1!==t.call(r,e)&&!1!==i||v.cancelEvent(e)})},y.haseventlistener?(this._bind=function(e,o,t,i){v.events.push({e:e,n:o,f:t,b:i,q:!1}),e.addEventListener(o,t,i||!1)},this.cancelEvent=function(e){return!!e&&((e=e.original?e.original:e).preventDefault(),e.stopPropagation(),e.preventManipulation&&e.preventManipulation(),!1)},this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)},this._unbind=function(e,o,t,i){e.removeEventListener(o,t,i)}):(this._bind=function(e,o,t,i){v.events.push({e:e,n:o,f:t,b:i,q:!1}),e.attachEvent?e.attachEvent("on"+o,t):e["on"+o]=t},this.cancelEvent=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1)},this.stopPropagation=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,!1)},this._unbind=function(e,o,t,i){e.detachEvent?e.detachEvent("on"+o,t):e["on"+o]=!1}),this.unbindAll=function(){for(var e=0;e(v.newscrolly-i)*(o-i)||0>(v.newscrollx-r)*(e-r))&&v.cancelScroll(),0==v.opt.bouncescroll&&(0>o?o=0:o>v.page.maxh&&(o=v.page.maxh),0>e?e=0:e>v.page.maxw&&(e=v.page.maxw)),(!v.scrollrunning||e!=v.newscrollx||o!=v.newscrolly)&&(v.newscrolly=o,v.newscrollx=e,v.newscrollspeed=t||!1,!v.timer&&void(v.timer=setTimeout(function(){var t=v.getScrollTop(),i=v.getScrollLeft(),r=Math.round(Math.sqrt(Math.pow(e-i,2)+Math.pow(o-t,2)));r=v.newscrollspeed&&1=v.newscrollspeed&&(r*=v.newscrollspeed),v.prepareTransition(r,!0),v.timerscroll&&v.timerscroll.tm&&clearInterval(v.timerscroll.tm),0e?e=0:e>v.page.maxh&&(e=v.page.maxh),0>o?o=0:o>v.page.maxw&&(o=v.page.maxw),e!=v.newscrolly||o!=v.newscrollx)return v.doScrollPos(o,e,v.opt.snapbackspeed);v.onscrollend&&v.scrollrunning&&v.triggerScrollEnd(),v.scrollrunning=!1}):(this.doScrollLeft=function(e,o){var t=v.scrollrunning?v.newscrolly:v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.scrollrunning?v.newscrollx:v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){if(o=void 0===o||!1===o?v.getScrollTop(!0):o,v.timer&&v.newscrolly==o&&v.newscrollx==e)return!0;v.timer&&a(v.timer),v.timer=0;var i=v.getScrollTop(),r=v.getScrollLeft();(0>(v.newscrolly-i)*(o-i)||0>(v.newscrollx-r)*(e-r))&&v.cancelScroll(),v.newscrolly=o,v.newscrollx=e,v.bouncescroll&&v.rail.visibility||(0>v.newscrolly?v.newscrolly=0:v.newscrolly>v.page.maxh&&(v.newscrolly=v.page.maxh)),v.bouncescroll&&v.railh.visibility||(0>v.newscrollx?v.newscrollx=0:v.newscrollx>v.page.maxw&&(v.newscrollx=v.page.maxw)),v.dst={},v.dst.x=e-r,v.dst.y=o-i,v.dst.px=r,v.dst.py=i;var n=Math.round(Math.sqrt(Math.pow(v.dst.x,2)+Math.pow(v.dst.y,2)));v.dst.ax=v.dst.x/n,v.dst.ay=v.dst.y/n;var s=0,c=n;if(0==v.dst.x?(s=i,c=o,v.dst.ay=1,v.dst.py=0):0==v.dst.y&&(s=r,c=e,v.dst.ax=1,v.dst.px=0),n=v.getTransitionSpeed(n),t&&1>=t&&(n*=t),v.bzscroll=0=v.page.maxh||r==v.page.maxw&&e>=v.page.maxw)&&v.checkContentSize();var d=1;v.cancelAnimationFrame=!1,v.timer=1,v.onscrollstart&&!v.scrollrunning&&v.onscrollstart.call(v,{type:"scrollstart",current:{x:r,y:i},request:{x:e,y:o},end:{x:v.newscrollx,y:v.newscrolly},speed:n}),function e(){if(v.cancelAnimationFrame)return!0;if(v.scrollrunning=!0,d=1-d)return v.timer=l(e)||1;var o,t,i=0,r=t=v.getScrollTop();v.dst.ay?((0>(o=(r=v.bzscroll?v.dst.py+v.bzscroll.getNow()*v.dst.ay:v.newscrolly)-t)&&rv.newscrolly)&&(r=v.newscrolly),v.setScrollTop(r),r==v.newscrolly&&(i=1)):i=1,t=o=v.getScrollLeft(),v.dst.ax?((0>(o=(t=v.bzscroll?v.dst.px+v.bzscroll.getNow()*v.dst.ax:v.newscrollx)-o)&&tv.newscrollx)&&(t=v.newscrollx),v.setScrollLeft(t),t==v.newscrollx&&(i+=1)):i+=1,2==i?(v.timer=0,v.cursorfreezed=!1,v.bzscroll=!1,v.scrollrunning=!1,0>r?r=0:r>v.page.maxh&&(r=v.page.maxh),0>t?t=0:t>v.page.maxw&&(t=v.page.maxw),t!=v.newscrollx||r!=v.newscrolly?v.doScrollPos(t,r):v.onscrollend&&v.triggerScrollEnd()):v.timer=l(e)||1}(),(i==v.page.maxh&&o>=i||r==v.page.maxw&&e>=r)&&v.checkContentSize(),v.noticeCursor()}},this.cancelScroll=function(){return v.timer&&a(v.timer),v.timer=0,v.bzscroll=!1,v.scrollrunning=!1,v}):(this.doScrollLeft=function(e,o){var t=v.getScrollTop();v.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=v.getScrollLeft();v.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var i=e>v.page.maxw?v.page.maxw:e;0>i&&(i=0);var r=o>v.page.maxh?v.page.maxh:o;0>r&&(r=0),v.synched("scroll",function(){v.setScrollTop(r),v.setScrollLeft(i)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,o){var t=0;t=o?Math.floor((v.scroll.y-e)*v.scrollratio.y):(v.timer?v.newscrolly:v.getScrollTop(!0))-e;if(v.bouncescroll){var i=Math.round(v.view.h/2);t<-i?t=-i:t>v.page.maxh+i&&(t=v.page.maxh+i)}return v.cursorfreezed=!1,i=v.getScrollTop(!0),0>t&&0>=i?v.noticeCursor():t>v.page.maxh&&i>=v.page.maxh?(v.checkContentSize(),v.noticeCursor()):void v.doScrollTop(t)},this.doScrollLeftBy=function(e,o){var t=0;t=o?Math.floor((v.scroll.x-e)*v.scrollratio.x):(v.timer?v.newscrollx:v.getScrollLeft(!0))-e;if(v.bouncescroll){var i=Math.round(v.view.w/2);t<-i?t=-i:t>v.page.maxw+i&&(t=v.page.maxw+i)}if(v.cursorfreezed=!1,i=v.getScrollLeft(!0),0>t&&0>=i||t>v.page.maxw&&i>=v.page.maxw)return v.noticeCursor();v.doScrollLeft(t)},this.doScrollTo=function(e,o){v.cursorfreezed=!1,v.doScrollTop(e)},this.checkContentSize=function(){var e=v.getContentSize();e.h==v.page.h&&e.w==v.page.w||v.resize(!1,e)},v.onscroll=function(e){v.rail.drag||v.cursorfreezed||v.synched("scroll",function(){v.scroll.y=Math.round(v.getScrollTop()*(1/v.scrollratio.y)),v.railh&&(v.scroll.x=Math.round(v.getScrollLeft()*(1/v.scrollratio.x))),v.noticeCursor()})},v.bind(v.docscroll,"scroll",v.onscroll),this.doZoomIn=function(o){if(!v.zoomactive){v.zoomactive=!0,v.zoomrestore={style:{}};var t,i="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),r=v.win[0].style;for(t in i){var s=i[t];v.zoomrestore.style[s]=void 0!==r[s]?r[s]:""}return v.zoomrestore.style.width=v.win.css("width"),v.zoomrestore.style.height=v.win.css("height"),v.zoomrestore.padding={w:v.win.outerWidth()-v.win.width(),h:v.win.outerHeight()-v.win.height()},y.isios4&&(v.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0)),v.win.css({position:y.isios4?"absolute":"fixed",top:0,left:0,"z-index":n+100,margin:"0px"}),(""==(i=v.win.css("backgroundColor"))||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(i))&&v.win.css("backgroundColor","#fff"),v.rail.css({"z-index":n+101}),v.zoom.css({"z-index":n+102}),v.zoom.css("backgroundPosition","0px -18px"),v.resizeZoom(),v.onzoomin&&v.onzoomin.call(v),v.cancelEvent(o)}},this.doZoomOut=function(o){if(v.zoomactive)return v.zoomactive=!1,v.win.css("margin",""),v.win.css(v.zoomrestore.style),y.isios4&&e(window).scrollTop(v.zoomrestore.scrollTop),v.rail.css({"z-index":v.zindex}),v.zoom.css({"z-index":v.zindex}),v.zoomrestore=!1,v.zoom.css("backgroundPosition","0px 0px"),v.onResize(),v.onzoomout&&v.onzoomout.call(v),v.cancelEvent(o)},this.doZoom=function(e){return v.zoomactive?v.doZoomOut(e):v.doZoomIn(e)},this.resizeZoom=function(){if(v.zoomactive){var o=v.getScrollTop();v.win.css({width:e(window).width()-v.zoomrestore.padding.w+"px",height:e(window).height()-v.zoomrestore.padding.h+"px"}),v.onResize(),v.setScrollTop(Math.min(v.page.maxh,o))}},this.init(),e.nicescroll.push(this)},f=function(e){var o=this;this.nc=e,this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0,this.snapy=this.snapx=!1,this.demuly=this.demulx=0,this.lastscrolly=this.lastscrollx=-1,this.timer=this.chky=this.chkx=0,this.time=function(){return+new Date},this.reset=function(e,t){o.stop();var i=o.time();o.steptime=0,o.lasttime=i,o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var i=o.time();o.steptime=i-o.lasttime,o.lasttime=i;i=t-o.lasty;var r=e-o.lastx,n=(n=o.nc.getScrollTop())+i,s=(s=o.nc.getScrollLeft())+r;o.snapx=0>s||s>o.nc.page.maxw,o.snapy=0>n||n>o.nc.page.maxh,o.speedx=r,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var i=!1;0>t?(t=0,i=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,i=!0),0>e?(e=0,i=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,i=!0),i?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=o.time(),i=e?t+e:o.lasttime;e=o.nc.getScrollLeft();var r=o.nc.getScrollTop(),n=o.nc.page.maxh,s=o.nc.page.maxw;if(o.speedx=0=t-i,(0>r||r>n||0>e||e>s)&&(i=!1),e=!(!o.speedx||!i)&&o.speedx,o.speedy&&i&&o.speedy||e){var l=Math.max(16,o.steptime);50a||a>s)&&(e=.1),o.speedy&&(c=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=c,0>c||c>n)&&(e=.1),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){o.speedx&&(o.nc.getScrollLeft()!=o.chkx&&o.stop(),o.chkx=a,o.nc.setScrollLeft(a)),o.speedy&&(o.nc.getScrollTop()!=o.chky&&o.stop(),o.chky=c,o.nc.setScrollTop(c)),o.timer||(o.nc.hideCursor(),o.doSnapy(a,c))}),1>o.demulxy?o.timer=setTimeout(d,l):(o.stop(),o.nc.hideCursor(),o.doSnapy(a,c))};d()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},w=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(o,t,i){return(t=e.data(o,"__nicescroll")||!1)&&t.ishwscroll?t.getScrollTop():w.call(o)},set:function(o,t){var i=e.data(o,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollTop(parseInt(t)):w.call(o,t),this}},e.fn.scrollTop=function(o){if(void 0===o){var t=this[0]&&e.data(this[0],"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollTop():w.call(this)}return this.each(function(){var t=e.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollTop(parseInt(o)):w.call(e(this),o)})};var v=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(o,t,i){return(t=e.data(o,"__nicescroll")||!1)&&t.ishwscroll?t.getScrollLeft():v.call(o)},set:function(o,t){var i=e.data(o,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollLeft(parseInt(t)):v.call(o,t),this}},e.fn.scrollLeft=function(o){if(void 0===o){var t=this[0]&&e.data(this[0],"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollLeft():v.call(this)}return this.each(function(){var t=e.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):v.call(e(this),o)})};var b=function(o){var t=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){for(var o=0,i=0;o