PATH:
home
/
letacommog
/
lesfinessaveurs
/
wp-content
/
themes
/
Avada
/
assets
/
min
/
js
/
library
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=!1,c=!1,d=0,e=2e3,f=0,g=a,h=document,i=window,j=g(i),k=[],l=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||!1,m=i.cancelAnimationFrame||i.webkitCancelAnimationFrame||i.mozCancelAnimationFrame||!1;if(l)i.cancelAnimationFrame||(m=function(a){});else{var n=0;l=function(a,b){var c=(new Date).getTime(),d=Math.max(0,16-(c-n)),e=i.setTimeout(function(){a(c+d)},d);return n=c+d,e},m=function(a){i.clearTimeout(a)}}var o=i.MutationObserver||i.WebKitMutationObserver||!1,p=Date.now||function(){return(new Date).getTime()},q={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!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:function(){var a=h.currentScript||function(){var a=h.getElementsByTagName("script");return!!a.length&&a[a.length-1]}(),b=a?a.src.split("?")[0]:"";return b.split("/").length>0?b.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},r=!1,s=function(){if(r)return r;var a=h.createElement("DIV"),b=a.style,c=navigator.userAgent,d=navigator.platform,e={};return e.haspointerlock="pointerLockElement"in h||"webkitPointerLockElement"in h||"mozPointerLockElement"in h,e.isopera="opera"in i,e.isopera12=e.isopera&&"getUserMedia"in navigator,e.isoperamini="[object OperaMini]"===Object.prototype.toString.call(i.operamini),e.isie="all"in h&&"attachEvent"in a&&!e.isopera,e.isieold=e.isie&&!("msInterpolationMode"in b),e.isie7=e.isie&&!e.isieold&&(!("documentMode"in h)||7===h.documentMode),e.isie8=e.isie&&"documentMode"in h&&8===h.documentMode,e.isie9=e.isie&&"performance"in i&&9===h.documentMode,e.isie10=e.isie&&"performance"in i&&10===h.documentMode,e.isie11="msRequestFullscreen"in a&&h.documentMode>=11,e.ismsedge="msCredentials"in i,e.ismozilla="MozAppearance"in b,e.iswebkit=!e.ismsedge&&"WebkitAppearance"in b,e.ischrome=e.iswebkit&&"chrome"in i,e.ischrome38=e.ischrome&&"touchAction"in b,e.ischrome22=!e.ischrome38&&e.ischrome&&e.haspointerlock,e.ischrome26=!e.ischrome38&&e.ischrome&&"transition"in b,e.cantouch="ontouchstart"in h.documentElement||"ontouchstart"in i,e.hasw3ctouch=(i.PointerEvent||!1)&&(navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0),e.hasmstouch=!e.hasw3ctouch&&(i.MSPointerEvent||!1),e.ismac=/^mac$/i.test(d),e.isios=e.cantouch&&/iphone|ipad|ipod/i.test(d),e.isios4=e.isios&&!("seal"in Object),e.isios7=e.isios&&"webkitHidden"in h,e.isios8=e.isios&&"hidden"in h,e.isios10=e.isios&&i.Proxy,e.isandroid=/android/i.test(c),e.haseventlistener="addEventListener"in a,e.trstyle=!1,e.hastransform=!1,e.hastranslate3d=!1,e.transitionstyle=!1,e.hastransition=!1,e.transitionend=!1,e.trstyle="transform",e.hastransform="transform"in b||function(){for(var a=["msTransform","webkitTransform","MozTransform","OTransform"],c=0,d=a.length;c<d;c++)if(void 0!==b[a[c]]){e.trstyle=a[c];break}e.hastransform=!!e.trstyle}(),e.hastransform&&(b[e.trstyle]="translate3d(1px,2px,3px)",e.hastranslate3d=/translate3d/.test(b[e.trstyle])),e.transitionstyle="transition",e.prefixstyle="",e.transitionend="transitionend",e.hastransition="transition"in b||function(){e.transitionend=!1;for(var a=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],c=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],d=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],f=0,g=a.length;f<g;f++)if(a[f]in b){e.transitionstyle=a[f],e.prefixstyle=c[f],e.transitionend=d[f];break}e.ischrome26&&(e.prefixstyle=c[1]),e.hastransition=e.transitionstyle}(),e.cursorgrabvalue=function(){var a=["grab","-webkit-grab","-moz-grab"];(e.ischrome&&!e.ischrome38||e.isie)&&(a=[]);for(var c=0,d=a.length;c<d;c++){var f=a[c];if(b.cursor=f,b.cursor==f)return f}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),e.hasmousecapture="setCapture"in a,e.hasMutationObserver=!1!==o,a=null,r=e,e},t=function(a,n){function r(){var a=z.doc.css(F.trstyle);return!(!a||"matrix"!=a.substr(0,6))&&a.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function t(){var a=z.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 v(a,b,c){var d=a.css(b),e=parseFloat(d);if(isNaN(e)){e=I[d]||0;var f=3==e?c?z.win.outerHeight()-z.win.innerHeight():z.win.outerWidth()-z.win.innerWidth():1;return z.isie8&&e&&(e+=1),f?e:0}return e}function w(a,b,c,d){z._bind(a,b,function(d){d=d||i.event;var 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?(d.wheelDeltaX&&(e.deltaX=-.025*d.wheelDeltaX),d.wheelDeltaY&&(e.deltaY=-.025*d.wheelDeltaY),!e.deltaY&&!e.deltaX&&(e.deltaY=-.025*d.wheelDelta)):e.deltaY=d.detail,c.call(a,e)},d)}function x(a,b,c,d){z.scrollrunning||(z.newscrolly=z.getScrollTop(),z.newscrollx=z.getScrollLeft(),O=p());var e=p()-O;if(O=p(),e>350?P=1:P+=(2-P)/10,a=a*P|0,b=b*P|0,a){if(d)if(a<0){if(z.getScrollLeft()>=z.page.maxw)return!0}else if(z.getScrollLeft()<=0)return!0;var f=a>0?1:-1;N!==f&&(z.scrollmom&&z.scrollmom.stop(),z.newscrollx=z.getScrollLeft(),N=f),z.lastdeltax-=a}if(b){if(function(){var a=z.getScrollTop();if(b<0){if(a>=z.page.maxh)return!0}else if(a<=0)return!0}()){if(B.nativeparentscrolling&&c&&!z.ispage&&!z.zoomactive)return!0;var g=z.view.h>>1;z.newscrolly<-g?(z.newscrolly=-g,b=-1):z.newscrolly>z.page.maxh+g?(z.newscrolly=z.page.maxh+g,b=1):b=0}var h=b>0?1:-1;M!==h&&(z.scrollmom&&z.scrollmom.stop(),z.newscrolly=z.getScrollTop(),M=h),z.lastdeltay-=b}(b||a)&&z.synched("relativexy",function(){var a=z.lastdeltay+z.newscrolly;z.lastdeltay=0;var b=z.lastdeltax+z.newscrollx;z.lastdeltax=0,z.rail.drag||z.doScrollPos(b,a)})}function y(a,b,c){var d,e;if(!c&&Q)return!0;if(0===a.deltaMode?(d=-a.deltaX*(B.mousescrollstep/54)|0,e=-a.deltaY*(B.mousescrollstep/54)|0):1===a.deltaMode&&(d=-a.deltaX*B.mousescrollstep*50/80|0,e=-a.deltaY*B.mousescrollstep*50/80|0),b&&B.oneaxismousemode&&0===d&&e&&(d=e,e=0,c)){(d<0?z.getScrollLeft()>=z.page.maxw:z.getScrollLeft()<=0)&&(e=d,d=0)}if(z.isrtlmode&&(d=-d),!x(d,e,c,!0))return Q=!1,a.stopImmediatePropagation(),a.preventDefault();c&&(Q=!0)}var z=this;this.version="3.7.4",this.name="nicescroll",this.me=n;var A=g("body"),B=this.opt={doc:A,win:!1};if(g.extend(B,q),B.snapbackspeed=80,a)for(var C in B)void 0!==a[C]&&(B[C]=a[C]);if(B.disablemutationobserver&&(o=!1),this.doc=B.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(B.win?B.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==B.win,this.win=B.win||(this.ispage?j:this.doc),this.docscroll=this.ispage&&!this.haswrapper?j:this.win,this.body=A,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"!=B.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,"auto"==B.rtlmode){var D=this.win[0]==i?this.body:this.win,E=D.css("writing-mode")||D.css("-webkit-writing-mode")||D.css("-ms-writing-mode")||D.css("-moz-writing-mode");"horizontal-tb"==E||"lr-tb"==E||""===E?(this.isrtlmode="rtl"==D.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==E||"tb"==E||"tb-rl"==E||"rl-tb"==E,this.isvertical="vertical-rl"==E||"tb"==E||"tb-rl"==E)}else this.isrtlmode=!0===B.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==B.scrollbarid)this.id=B.scrollbarid;else do{this.id="ascrail"+e++}while(h.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.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=B.overflowx,this.overflowy=B.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=s();var F=g.extend({},this.detected);this.canhwscroll=F.hastransform&&B.hwacceleration,this.ishwscroll=this.canhwscroll&&z.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(F.iswebkit||F.isie||F.isie11):this.hasreversehr=!(F.iswebkit||F.isie&&!F.isie10&&!F.isie11):this.hasreversehr=!1,this.istouchcapable=!1,F.cantouch||!F.hasw3ctouch&&!F.hasmstouch?!F.cantouch||F.isios||F.isandroid||!F.iswebkit&&!F.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,B.enablemouselockapi||(F.hasmousecapture=!1,F.haspointerlock=!1),this.debounced=function(a,b,c){if(z){z.delaylist[a]||!1||(z.delaylist[a]={h:l(function(){z.delaylist[a].fn.call(z),z.delaylist[a]=!1},c)},b.call(z)),z.delaylist[a].fn=b}},this.synched=function(a,b){z.synclist[a]?z.synclist[a]=b:(z.synclist[a]=b,l(function(){z&&(z.synclist[a]&&z.synclist[a].call(z),z.synclist[a]=null)}))},this.unsynched=function(a){z.synclist[a]&&(z.synclist[a]=!1)},this.css=function(a,b){for(var c in b)z.saved.css.push([a,c,a.css(c)]),a.css(c,b[c])},this.scrollTop=function(a){return void 0===a?z.getScrollTop():z.setScrollTop(a)},this.scrollLeft=function(a){return void 0===a?z.getScrollLeft():z.setScrollLeft(a)};var G=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=p(),this.df=b-a};if(G.prototype={B2:function(a){return 3*(1-a)*(1-a)*a},B3:function(a){return 3*(1-a)*a*a},B4:function(a){return a*a*a},getPos:function(){return(p()-this.ts)/this.spd},getNow:function(){var a=(p()-this.ts)/this.spd,b=this.B2(a)+this.B3(a)+this.B4(a);return a>=1?this.ed:this.st+this.df*b|0},update:function(a,b){return this.st=this.getNow(),this.ed=a,this.spd=b,this.ts=p(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},F.hastranslate3d&&F.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(a){if(!a){var b=r();if(b)return 16==b.length?-b[13]:-b[5];if(z.timerscroll&&z.timerscroll.bz)return z.timerscroll.bz.getNow()}return z.doc.translate.y},this.getScrollLeft=function(a){if(!a){var b=r();if(b)return 16==b.length?-b[12]:-b[4];if(z.timerscroll&&z.timerscroll.bh)return z.timerscroll.bh.getNow()}return z.doc.translate.x},this.notifyScrollEvent=function(a){var b=h.createEvent("UIEvents");b.initUIEvent("scroll",!1,!1,i,1),b.niceevent=!0,a.dispatchEvent(b)};var H=this.isrtlmode?1:-1;F.hastranslate3d&&B.enabletranslate3d?(this.setScrollTop=function(a,b){z.doc.translate.y=a,z.doc.translate.ty=-1*a+"px",z.doc.css(F.trstyle,"translate3d("+z.doc.translate.tx+","+z.doc.translate.ty+",0)"),b||z.notifyScrollEvent(z.win[0])},this.setScrollLeft=function(a,b){z.doc.translate.x=a,z.doc.translate.tx=a*H+"px",z.doc.css(F.trstyle,"translate3d("+z.doc.translate.tx+","+z.doc.translate.ty+",0)"),b||z.notifyScrollEvent(z.win[0])}):(this.setScrollTop=function(a,b){z.doc.translate.y=a,z.doc.translate.ty=-1*a+"px",z.doc.css(F.trstyle,"translate("+z.doc.translate.tx+","+z.doc.translate.ty+")"),b||z.notifyScrollEvent(z.win[0])},this.setScrollLeft=function(a,b){z.doc.translate.x=a,z.doc.translate.tx=a*H+"px",z.doc.css(F.trstyle,"translate("+z.doc.translate.tx+","+z.doc.translate.ty+")"),b||z.notifyScrollEvent(z.win[0])})}else this.getScrollTop=function(){return z.docscroll.scrollTop()},this.setScrollTop=function(a){z.docscroll.scrollTop(a)},this.getScrollLeft=function(){return z.hasreversehr?z.detected.ismozilla?z.page.maxw-Math.abs(z.docscroll.scrollLeft()):z.page.maxw-z.docscroll.scrollLeft():z.docscroll.scrollLeft()},this.setScrollLeft=function(a){return setTimeout(function(){if(z)return z.hasreversehr&&(a=z.detected.ismozilla?-(z.page.maxw-a):z.page.maxw-a),z.docscroll.scrollLeft(a)},1)};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 I={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:i.pageYOffset||h.documentElement.scrollTop,left:i.pageXOffset||h.documentElement.scrollLeft}},this.getOffset=function(){if(z.isfixed){var a=z.win.offset(),b=z.getDocumentScrollOffset();return a.top-=b.top,a.left-=b.left,a}var c=z.win.offset();if(!z.viewport)return c;var d=z.viewport.offset();return{top:c.top-d.top,left:c.left-d.left}},this.updateScrollBar=function(a){var b,c;if(z.ishwscroll)z.rail.css({height:z.win.innerHeight()-(B.railpadding.top+B.railpadding.bottom)}),z.railh&&z.railh.css({width:z.win.innerWidth()-(B.railpadding.left+B.railpadding.right)});else{var d=z.getOffset();if(b={top:d.top,left:d.left-(B.railpadding.left+B.railpadding.right)},b.top+=v(z.win,"border-top-width",!0),b.left+=z.rail.align?z.win.outerWidth()-v(z.win,"border-right-width")-z.rail.width:v(z.win,"border-left-width"),c=B.railoffset,c&&(c.top&&(b.top+=c.top),c.left&&(b.left+=c.left)),z.railslocked||z.rail.css({top:b.top,left:b.left,height:(a?a.h:z.win.innerHeight())-(B.railpadding.top+B.railpadding.bottom)}),z.zoom&&z.zoom.css({top:b.top+1,left:1==z.rail.align?b.left-20:b.left+z.rail.width+4}),z.railh&&!z.railslocked){b={top:d.top,left:d.left},c=B.railhoffset,c&&(c.top&&(b.top+=c.top),c.left&&(b.left+=c.left));var e=z.railh.align?b.top+v(z.win,"border-top-width",!0)+z.win.innerHeight()-z.railh.height:b.top+v(z.win,"border-top-width",!0),f=b.left+v(z.win,"border-left-width");z.railh.css({top:e-(B.railpadding.top+B.railpadding.bottom),left:f,width:z.railh.width})}}},this.doRailClick=function(a,b,c){var d,e,f,g;z.railslocked||(z.cancelEvent(a),"pageY"in a||(a.pageX=a.clientX+h.documentElement.scrollLeft,a.pageY=a.clientY+h.documentElement.scrollTop),b?(d=c?z.doScrollLeft:z.doScrollTop,f=c?(a.pageX-z.railh.offset().left-z.cursorwidth/2)*z.scrollratio.x:(a.pageY-z.rail.offset().top-z.cursorheight/2)*z.scrollratio.y,z.unsynched("relativexy"),d(0|f)):(d=c?z.doScrollLeftBy:z.doScrollBy,f=c?z.scroll.x:z.scroll.y,g=c?a.pageX-z.railh.offset().left:a.pageY-z.rail.offset().top,e=c?z.view.w:z.view.h,d(f>=g?e:-e)))},z.newscrolly=z.newscrollx=0,z.hasanimationframe="requestAnimationFrame"in i,z.hascancelanimationframe="cancelAnimationFrame"in i,z.hasborderbox=!1,this.init=function(){if(z.saved.css=[],F.isoperamini)return!0;if(F.isandroid&&!("hidden"in h))return!0;B.emulatetouch=B.emulatetouch||B.touchbehavior,z.hasborderbox=i.getComputedStyle&&"border-box"===i.getComputedStyle(h.body)["box-sizing"];var a={"overflow-y":"hidden"};if((F.isie11||F.isie10)&&(a["-ms-overflow-style"]="none"),z.ishwscroll&&(this.doc.css(F.transitionstyle,F.prefixstyle+"transform 0ms ease-out"),F.transitionend&&z.bind(z.doc,F.transitionend,z.onScrollTransitionEnd,!1)),z.zindex="auto",z.ispage||"auto"!=B.zindex?z.zindex=B.zindex:z.zindex=t()||"auto",!z.ispage&&"auto"!=z.zindex&&z.zindex>f&&(f=z.zindex),z.isie&&0===z.zindex&&"auto"==B.zindex&&(z.zindex="auto"),!z.ispage||!F.isieold){var e=z.docscroll;z.ispage&&(e=z.haswrapper?z.win:z.doc),z.css(e,a),z.ispage&&(F.isie11||F.isie)&&z.css(g("html"),a),!F.isios||z.ispage||z.haswrapper||z.css(A,{"-webkit-overflow-scrolling":"touch"});var k=g(h.createElement("div"));k.css({position:"relative",top:0,float:"right",width:B.cursorwidth,height:0,"background-color":B.cursorcolor,border:B.cursorborder,"background-clip":"padding-box","-webkit-border-radius":B.cursorborderradius,"-moz-border-radius":B.cursorborderradius,"border-radius":B.cursorborderradius}),k.addClass("nicescroll-cursors"),z.cursor=k;var l=g(h.createElement("div"));l.attr("id",z.id),l.addClass("nicescroll-rails nicescroll-rails-vr");var m,n,p=["left","right","top","bottom"];for(var q in p)n=p[q],(m=B.railpadding[n]||0)&&l.css("padding-"+n,m+"px");l.append(k),l.width=Math.max(parseFloat(B.cursorwidth),k.outerWidth()),l.css({width:l.width+"px",zIndex:z.zindex,background:B.background,cursor:"default"}),l.visibility=!0,l.scrollable=!0,l.align="left"==B.railalign?0:1,z.rail=l,z.rail.drag=!1;var r=!1;!B.boxzoom||z.ispage||F.isieold||(r=h.createElement("div"),z.bind(r,"click",z.doZoom),z.bind(r,"mouseenter",function(){z.zoom.css("opacity",B.cursoropacitymax)}),z.bind(r,"mouseleave",function(){z.zoom.css("opacity",B.cursoropacitymin)}),z.zoom=g(r),z.zoom.css({cursor:"pointer",zIndex:z.zindex,backgroundImage:"url("+B.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),B.dblclickzoom&&z.bind(z.win,"dblclick",z.doZoom),F.cantouch&&B.gesturezoom&&(z.ongesturezoom=function(a){return a.scale>1.5&&z.doZoomIn(a),a.scale<.8&&z.doZoomOut(a),z.cancelEvent(a)},z.bind(z.win,"gestureend",z.ongesturezoom))),z.railh=!1;var s;if(B.horizrailenabled&&(z.css(e,{overflowX:"hidden"}),k=g(h.createElement("div")),k.css({position:"absolute",top:0,height:B.cursorwidth,width:0,backgroundColor:B.cursorcolor,border:B.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":B.cursorborderradius,"-moz-border-radius":B.cursorborderradius,"border-radius":B.cursorborderradius}),F.isieold&&k.css("overflow","hidden"),k.addClass("nicescroll-cursors"),z.cursorh=k,s=g(h.createElement("div")),s.attr("id",z.id+"-hr"),s.addClass("nicescroll-rails nicescroll-rails-hr"),s.height=Math.max(parseFloat(B.cursorwidth),k.outerHeight()),s.css({height:s.height+"px",zIndex:z.zindex,background:B.background}),s.append(k),s.visibility=!0,s.scrollable=!0,s.align="top"==B.railvalign?0:1,z.railh=s,z.railh.drag=!1),z.ispage)l.css({position:"fixed",top:0,height:"100%"}),l.css(l.align?{right:0}:{left:0}),z.body.append(l),z.railh&&(s.css({position:"fixed",left:0,width:"100%"}),s.css(s.align?{bottom:0}:{top:0}),z.body.append(s));else{if(z.ishwscroll){"static"==z.win.css("position")&&z.css(z.win,{position:"relative"});var v="HTML"==z.win[0].nodeName?z.body:z.win;g(v).scrollTop(0).scrollLeft(0),z.zoom&&(z.zoom.css({position:"absolute",top:1,right:0,"margin-right":l.width+4}),v.append(z.zoom)),l.css({position:"absolute",top:0}),l.css(l.align?{right:0}:{left:0}),v.append(l),s&&(s.css({position:"absolute",left:0,bottom:0}),s.css(s.align?{bottom:0}:{top:0}),v.append(s))}else{z.isfixed="fixed"==z.win.css("position");var w=z.isfixed?"fixed":"absolute";z.isfixed||(z.viewport=z.getViewport(z.win[0])),z.viewport&&(z.body=z.viewport,/fixed|absolute/.test(z.viewport.css("position"))||z.css(z.viewport,{position:"relative"})),l.css({position:w}),z.zoom&&z.zoom.css({position:w}),z.updateScrollBar(),z.body.append(l),z.zoom&&z.body.append(z.zoom),z.railh&&(s.css({position:w}),z.body.append(s))}F.isios&&z.css(z.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),B.disableoutline&&(F.isie&&z.win.attr("hideFocus","true"),F.iswebkit&&z.win.css("outline","none"))}if(!1===B.autohidemode?(z.autohidedom=!1,z.rail.css({opacity:B.cursoropacitymax}),z.railh&&z.railh.css({opacity:B.cursoropacitymax})):!0===B.autohidemode||"leave"===B.autohidemode?(z.autohidedom=g().add(z.rail),F.isie8&&(z.autohidedom=z.autohidedom.add(z.cursor)),z.railh&&(z.autohidedom=z.autohidedom.add(z.railh)),z.railh&&F.isie8&&(z.autohidedom=z.autohidedom.add(z.cursorh))):"scroll"==B.autohidemode?(z.autohidedom=g().add(z.rail),z.railh&&(z.autohidedom=z.autohidedom.add(z.railh))):"cursor"==B.autohidemode?(z.autohidedom=g().add(z.cursor),z.railh&&(z.autohidedom=z.autohidedom.add(z.cursorh))):"hidden"==B.autohidemode&&(z.autohidedom=!1,z.hide(),z.railslocked=!1),F.cantouch||z.istouchcapable||B.emulatetouch||F.hasmstouch){z.scrollmom=new u(z);z.ontouchstart=function(a){if(z.locked)return!1;if(a.pointerType&&("mouse"===a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE))return!1;if(z.hasmoving=!1,z.scrollmom.timer&&(z.triggerScrollEnd(),z.scrollmom.stop()),!z.railslocked){var b=z.getTarget(a);if(b){if(/INPUT/i.test(b.nodeName)&&/range/i.test(b.type))return z.stopPropagation(a)}var c="mousedown"===a.type;if(!("clientX"in a)&&"changedTouches"in a&&(a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY),z.forcescreen){var d=a;a={original:a.original?a.original:a},a.clientX=d.screenX,a.clientY=d.screenY}if(z.rail.drag={x:a.clientX,y:a.clientY,sx:z.scroll.x,sy:z.scroll.y,st:z.getScrollTop(),sl:z.getScrollLeft(),pt:2,dl:!1,tg:b},z.ispage||!B.directionlockdeadzone)z.rail.drag.dl="f";else{var e={w:j.width(),h:j.height()},f=z.getContentSize(),h=f.h-e.h,i=f.w-e.w;z.rail.scrollable&&!z.railh.scrollable?z.rail.drag.ck=h>0&&"v":!z.rail.scrollable&&z.railh.scrollable?z.rail.drag.ck=i>0&&"h":z.rail.drag.ck=!1}if(B.emulatetouch&&z.isiframe&&F.isie){var k=z.win.position();z.rail.drag.x+=k.left,z.rail.drag.y+=k.top}if(z.hasmoving=!1,z.lastmouseup=!1,z.scrollmom.reset(a.clientX,a.clientY),b&&c){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(b.nodeName))return F.hasmousecapture&&b.setCapture(),B.emulatetouch?(b.onclick&&!b._onclick&&(b._onclick=b.onclick,b.onclick=function(a){if(z.hasmoving)return!1;b._onclick.call(this,a)}),z.cancelEvent(a)):z.stopPropagation(a);/SUBMIT|CANCEL|BUTTON/i.test(g(b).attr("type"))&&(z.preventclick={tg:b,click:!1})}}},z.ontouchend=function(a){if(!z.rail.drag)return!0;if(2==z.rail.drag.pt){if(a.pointerType&&("mouse"===a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE))return!1;z.rail.drag=!1;var b="mouseup"===a.type;if(z.hasmoving&&(z.scrollmom.doMomentum(),z.lastmouseup=!0,z.hideCursor(),F.hasmousecapture&&h.releaseCapture(),b))return z.cancelEvent(a)}else if(1==z.rail.drag.pt)return z.onmouseup(a)};var x=B.emulatetouch&&z.isiframe&&!F.hasmousecapture,y=.3*B.directionlockdeadzone|0;z.ontouchmove=function(a,b){if(!z.rail.drag)return!0;if(a.targetTouches&&B.preventmultitouchscrolling&&a.targetTouches.length>1)return!0;if(a.pointerType&&("mouse"===a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE))return!0;if(2==z.rail.drag.pt){"changedTouches"in a&&(a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY);var c,d;if(d=c=0,x&&!b){var e=z.win.position();d=-e.left,c=-e.top}var f=a.clientY+c,g=f-z.rail.drag.y,i=a.clientX+d,j=i-z.rail.drag.x,k=z.rail.drag.st-g;if(z.ishwscroll&&B.bouncescroll)k<0?k=Math.round(k/2):k>z.page.maxh&&(k=z.page.maxh+Math.round((k-z.page.maxh)/2));else if(k<0?(k=0,f=0):k>z.page.maxh&&(k=z.page.maxh,f=0),0===f&&!z.hasmoving)return z.ispage||(z.rail.drag=!1),!0;var l=z.getScrollLeft();if(z.railh&&z.railh.scrollable&&(l=z.isrtlmode?j-z.rail.drag.sl:z.rail.drag.sl-j,z.ishwscroll&&B.bouncescroll?l<0?l=Math.round(l/2):l>z.page.maxw&&(l=z.page.maxw+Math.round((l-z.page.maxw)/2)):(l<0&&(l=0,i=0),l>z.page.maxw&&(l=z.page.maxw,i=0))),!z.hasmoving){if(z.rail.drag.y===a.clientY&&z.rail.drag.x===a.clientX)return z.cancelEvent(a);var m=Math.abs(g),n=Math.abs(j),o=B.directionlockdeadzone;if(z.rail.drag.ck?"v"==z.rail.drag.ck?n>o&&m<=y?z.rail.drag=!1:m>o&&(z.rail.drag.dl="v"):"h"==z.rail.drag.ck&&(m>o&&n<=y?z.rail.drag=!1:n>o&&(z.rail.drag.dl="h")):m>o&&n>o?z.rail.drag.dl="f":m>o?z.rail.drag.dl=n>y?"f":"v":n>o&&(z.rail.drag.dl=m>y?"f":"h"),!z.rail.drag.dl)return z.cancelEvent(a);z.triggerScrollStart(a.clientX,a.clientY,0,0,0),z.hasmoving=!0}return z.preventclick&&!z.preventclick.click&&(z.preventclick.click=z.preventclick.tg.onclick||!1,z.preventclick.tg.onclick=z.onpreventclick),z.rail.drag.dl&&("v"==z.rail.drag.dl?l=z.rail.drag.sl:"h"==z.rail.drag.dl&&(k=z.rail.drag.st)),z.synched("touchmove",function(){z.rail.drag&&2==z.rail.drag.pt&&(z.prepareTransition&&z.resetTransition(),z.rail.scrollable&&z.setScrollTop(k),z.scrollmom.update(i,f),z.railh&&z.railh.scrollable?(z.setScrollLeft(l),z.showCursor(k,l)):z.showCursor(k),F.isie10&&h.selection.clear())}),z.cancelEvent(a)}return 1==z.rail.drag.pt?z.onmousemove(a):void 0},z.ontouchstartCursor=function(a,b){if(!z.rail.drag||3==z.rail.drag.pt){if(z.locked)return z.cancelEvent(a);z.cancelScroll(),z.rail.drag={x:a.touches[0].clientX,y:a.touches[0].clientY,sx:z.scroll.x,sy:z.scroll.y,pt:3,hr:!!b};var c=z.getTarget(a);return!z.ispage&&F.hasmousecapture&&c.setCapture(),z.isiframe&&!F.hasmousecapture&&(z.saved.csspointerevents=z.doc.css("pointer-events"),z.css(z.doc,{"pointer-events":"none"})),z.cancelEvent(a)}},z.ontouchendCursor=function(a){if(z.rail.drag){if(F.hasmousecapture&&h.releaseCapture(),z.isiframe&&!F.hasmousecapture&&z.doc.css("pointer-events",z.saved.csspointerevents),3!=z.rail.drag.pt)return;return z.rail.drag=!1,z.cancelEvent(a)}},z.ontouchmoveCursor=function(a){if(z.rail.drag){if(3!=z.rail.drag.pt)return;if(z.cursorfreezed=!0,z.rail.drag.hr){z.scroll.x=z.rail.drag.sx+(a.touches[0].clientX-z.rail.drag.x),z.scroll.x<0&&(z.scroll.x=0);var b=z.scrollvaluemaxw;z.scroll.x>b&&(z.scroll.x=b)}else{z.scroll.y=z.rail.drag.sy+(a.touches[0].clientY-z.rail.drag.y),z.scroll.y<0&&(z.scroll.y=0);var c=z.scrollvaluemax;z.scroll.y>c&&(z.scroll.y=c)}return z.synched("touchmove",function(){z.rail.drag&&3==z.rail.drag.pt&&(z.showCursor(),z.rail.drag.hr?z.doScrollLeft(Math.round(z.scroll.x*z.scrollratio.x),B.cursordragspeed):z.doScrollTop(Math.round(z.scroll.y*z.scrollratio.y),B.cursordragspeed))}),z.cancelEvent(a)}}}if(z.onmousedown=function(a,b){if(!z.rail.drag||1==z.rail.drag.pt){if(z.railslocked)return z.cancelEvent(a);z.cancelScroll(),z.rail.drag={x:a.clientX,y:a.clientY,sx:z.scroll.x,sy:z.scroll.y,pt:1,hr:b||!1};var c=z.getTarget(a);return F.hasmousecapture&&c.setCapture(),z.isiframe&&!F.hasmousecapture&&(z.saved.csspointerevents=z.doc.css("pointer-events"),z.css(z.doc,{"pointer-events":"none"})),z.hasmoving=!1,z.cancelEvent(a)}},z.onmouseup=function(a){if(z.rail.drag)return 1!=z.rail.drag.pt||(F.hasmousecapture&&h.releaseCapture(),z.isiframe&&!F.hasmousecapture&&z.doc.css("pointer-events",z.saved.csspointerevents),z.rail.drag=!1,z.cursorfreezed=!1,z.hasmoving&&z.triggerScrollEnd(),z.cancelEvent(a))},z.onmousemove=function(a){if(z.rail.drag){if(1!==z.rail.drag.pt)return;if(F.ischrome&&0===a.which)return z.onmouseup(a);if(z.cursorfreezed=!0,z.hasmoving||z.triggerScrollStart(a.clientX,a.clientY,0,0,0),z.hasmoving=!0,z.rail.drag.hr){z.scroll.x=z.rail.drag.sx+(a.clientX-z.rail.drag.x),z.scroll.x<0&&(z.scroll.x=0);var b=z.scrollvaluemaxw;z.scroll.x>b&&(z.scroll.x=b)}else{z.scroll.y=z.rail.drag.sy+(a.clientY-z.rail.drag.y),z.scroll.y<0&&(z.scroll.y=0);var c=z.scrollvaluemax;z.scroll.y>c&&(z.scroll.y=c)}return z.synched("mousemove",function(){z.cursorfreezed&&(z.showCursor(),z.rail.drag.hr?z.scrollLeft(Math.round(z.scroll.x*z.scrollratio.x)):z.scrollTop(Math.round(z.scroll.y*z.scrollratio.y)))}),z.cancelEvent(a)}z.checkarea=0},F.cantouch||B.emulatetouch)z.onpreventclick=function(a){if(z.preventclick)return z.preventclick.tg.onclick=z.preventclick.click,z.preventclick=!1,z.cancelEvent(a)},z.onclick=!F.isios&&function(a){return!z.lastmouseup||(z.lastmouseup=!1,z.cancelEvent(a))},B.grabcursorenabled&&F.cursorgrabvalue&&(z.css(z.ispage?z.doc:z.win,{cursor:F.cursorgrabvalue}),z.css(z.rail,{cursor:F.cursorgrabvalue}));else{var C=function(a){if(z.selectiondrag){if(a){var b=z.win.outerHeight(),c=a.pageY-z.selectiondrag.top;c>0&&c<b&&(c=0),c>=b&&(c-=b),z.selectiondrag.df=c}if(0!==z.selectiondrag.df){var d=-2*z.selectiondrag.df/6|0;z.doScrollBy(d),z.debounced("doselectionscroll",function(){C()},50)}}};z.hasTextSelected="getSelection"in h?function(){return h.getSelection().rangeCount>0}:"selection"in h?function(){return"None"!=h.selection.type}:function(){return!1},z.onselectionstart=function(a){z.ispage||(z.selectiondrag=z.win.offset())},z.onselectionend=function(a){z.selectiondrag=!1},z.onselectiondrag=function(a){z.selectiondrag&&z.hasTextSelected()&&z.debounced("selectionscroll",function(){C(a)},250)}}if(F.hasw3ctouch?(z.css(z.ispage?g("html"):z.win,{"touch-action":"none"}),z.css(z.rail,{"touch-action":"none"}),z.css(z.cursor,{"touch-action":"none"}),z.bind(z.win,"pointerdown",z.ontouchstart),z.bind(h,"pointerup",z.ontouchend),z.delegate(h,"pointermove",z.ontouchmove)):F.hasmstouch?(z.css(z.ispage?g("html"):z.win,{"-ms-touch-action":"none"}),z.css(z.rail,{"-ms-touch-action":"none"}),z.css(z.cursor,{"-ms-touch-action":"none"}),z.bind(z.win,"MSPointerDown",z.ontouchstart),z.bind(h,"MSPointerUp",z.ontouchend),z.delegate(h,"MSPointerMove",z.ontouchmove),z.bind(z.cursor,"MSGestureHold",function(a){a.preventDefault()}),z.bind(z.cursor,"contextmenu",function(a){a.preventDefault()})):F.cantouch&&(z.bind(z.win,"touchstart",z.ontouchstart,!1,!0),z.bind(h,"touchend",z.ontouchend,!1,!0),z.bind(h,"touchcancel",z.ontouchend,!1,!0),z.delegate(h,"touchmove",z.ontouchmove,!1,!0)),B.emulatetouch&&(z.bind(z.win,"mousedown",z.ontouchstart,!1,!0),z.bind(h,"mouseup",z.ontouchend,!1,!0),z.bind(h,"mousemove",z.ontouchmove,!1,!0)),(B.cursordragontouch||!F.cantouch&&!B.emulatetouch)&&(z.rail.css({cursor:"default"}),z.railh&&z.railh.css({cursor:"default"}),z.jqbind(z.rail,"mouseenter",function(){if(!z.ispage&&!z.win.is(":visible"))return!1;z.canshowonmouseevent&&z.showCursor(),z.rail.active=!0}),z.jqbind(z.rail,"mouseleave",function(){z.rail.active=!1,z.rail.drag||z.hideCursor()}),B.sensitiverail&&(z.bind(z.rail,"click",function(a){z.doRailClick(a,!1,!1)}),z.bind(z.rail,"dblclick",function(a){z.doRailClick(a,!0,!1)}),z.bind(z.cursor,"click",function(a){z.cancelEvent(a)}),z.bind(z.cursor,"dblclick",function(a){z.cancelEvent(a)})),z.railh&&(z.jqbind(z.railh,"mouseenter",function(){if(!z.ispage&&!z.win.is(":visible"))return!1;z.canshowonmouseevent&&z.showCursor(),z.rail.active=!0}),z.jqbind(z.railh,"mouseleave",function(){z.rail.active=!1,z.rail.drag||z.hideCursor()}),B.sensitiverail&&(z.bind(z.railh,"click",function(a){z.doRailClick(a,!1,!0)}),z.bind(z.railh,"dblclick",function(a){z.doRailClick(a,!0,!0)}),z.bind(z.cursorh,"click",function(a){z.cancelEvent(a)}),z.bind(z.cursorh,"dblclick",function(a){z.cancelEvent(a)})))),B.cursordragontouch&&(this.istouchcapable||F.cantouch)&&(z.bind(z.cursor,"touchstart",z.ontouchstartCursor),z.bind(z.cursor,"touchmove",z.ontouchmoveCursor),z.bind(z.cursor,"touchend",z.ontouchendCursor),z.cursorh&&z.bind(z.cursorh,"touchstart",function(a){z.ontouchstartCursor(a,!0)}),z.cursorh&&z.bind(z.cursorh,"touchmove",z.ontouchmoveCursor),z.cursorh&&z.bind(z.cursorh,"touchend",z.ontouchendCursor)),F.cantouch||B.emulatetouch?(z.bind(F.hasmousecapture?z.win:h,"mouseup",z.ontouchend),z.onclick&&z.bind(h,"click",z.onclick),B.cursordragontouch?(z.bind(z.cursor,"mousedown",z.onmousedown),z.bind(z.cursor,"mouseup",z.onmouseup),z.cursorh&&z.bind(z.cursorh,"mousedown",function(a){z.onmousedown(a,!0)}),z.cursorh&&z.bind(z.cursorh,"mouseup",z.onmouseup)):(z.bind(z.rail,"mousedown",function(a){a.preventDefault() }),z.railh&&z.bind(z.railh,"mousedown",function(a){a.preventDefault()}))):(z.bind(F.hasmousecapture?z.win:h,"mouseup",z.onmouseup),z.bind(h,"mousemove",z.onmousemove),z.onclick&&z.bind(h,"click",z.onclick),z.bind(z.cursor,"mousedown",z.onmousedown),z.bind(z.cursor,"mouseup",z.onmouseup),z.railh&&(z.bind(z.cursorh,"mousedown",function(a){z.onmousedown(a,!0)}),z.bind(z.cursorh,"mouseup",z.onmouseup)),!z.ispage&&B.enablescrollonselection&&(z.bind(z.win[0],"mousedown",z.onselectionstart),z.bind(h,"mouseup",z.onselectionend),z.bind(z.cursor,"mouseup",z.onselectionend),z.cursorh&&z.bind(z.cursorh,"mouseup",z.onselectionend),z.bind(h,"mousemove",z.onselectiondrag)),z.zoom&&(z.jqbind(z.zoom,"mouseenter",function(){z.canshowonmouseevent&&z.showCursor(),z.rail.active=!0}),z.jqbind(z.zoom,"mouseleave",function(){z.rail.active=!1,z.rail.drag||z.hideCursor()}))),B.enablemousewheel&&(z.isiframe||z.mousewheel(F.isie&&z.ispage?h:z.win,z.onmousewheel),z.mousewheel(z.rail,z.onmousewheel),z.railh&&z.mousewheel(z.railh,z.onmousewheelhr)),z.ispage||F.cantouch||/HTML|^BODY/.test(z.win[0].nodeName)||(z.win.attr("tabindex")||z.win.attr({tabindex:++d}),z.bind(z.win,"focus",function(a){b=z.getTarget(a).id||z.getTarget(a)||!1,z.hasfocus=!0,z.canshowonmouseevent&&z.noticeCursor()}),z.bind(z.win,"blur",function(a){b=!1,z.hasfocus=!1}),z.bind(z.win,"mouseenter",function(a){c=z.getTarget(a).id||z.getTarget(a)||!1,z.hasmousefocus=!0,z.canshowonmouseevent&&z.noticeCursor()}),z.bind(z.win,"mouseleave",function(a){c=!1,z.hasmousefocus=!1,z.rail.drag||z.hideCursor()})),z.onkeypress=function(a){if(z.railslocked&&0===z.page.maxh)return!0;a=a||i.event;var d=z.getTarget(a);if(d&&/INPUT|TEXTAREA|SELECT|OPTION/.test(d.nodeName)){if(!(d.getAttribute("type")||d.type||!1)||!/submit|button|cancel/i.tp)return!0}if(g(d).attr("contenteditable"))return!0;if(z.hasfocus||z.hasmousefocus&&!b||z.ispage&&!b&&!c){var e=a.keyCode;if(z.railslocked&&27!=e)return z.cancelEvent(a);var f=a.ctrlKey||!1,h=a.shiftKey||!1,j=!1;switch(e){case 38:case 63233:z.doScrollBy(72),j=!0;break;case 40:case 63235:z.doScrollBy(-72),j=!0;break;case 37:case 63232:z.railh&&(f?z.doScrollLeft(0):z.doScrollLeftBy(72),j=!0);break;case 39:case 63234:z.railh&&(f?z.doScrollLeft(z.page.maxw):z.doScrollLeftBy(-72),j=!0);break;case 33:case 63276:z.doScrollBy(z.view.h),j=!0;break;case 34:case 63277:z.doScrollBy(-z.view.h),j=!0;break;case 36:case 63273:z.railh&&f?z.doScrollPos(0,0):z.doScrollTo(0),j=!0;break;case 35:case 63275:z.railh&&f?z.doScrollPos(z.page.maxw,z.page.maxh):z.doScrollTo(z.page.maxh),j=!0;break;case 32:B.spacebarenabled&&(h?z.doScrollBy(z.view.h):z.doScrollBy(-z.view.h),j=!0);break;case 27:z.zoomactive&&(z.doZoom(),j=!0)}if(j)return z.cancelEvent(a)}},B.enablekeyboard&&z.bind(h,F.isopera&&!F.isopera12?"keypress":"keydown",z.onkeypress),z.bind(h,"keydown",function(a){(a.ctrlKey||!1)&&(z.wheelprevented=!0)}),z.bind(h,"keyup",function(a){a.ctrlKey||!1||(z.wheelprevented=!1)}),z.bind(i,"blur",function(a){z.wheelprevented=!1}),z.bind(i,"resize",z.onscreenresize),z.bind(i,"orientationchange",z.onscreenresize),z.bind(i,"load",z.lazyResize),F.ischrome&&!z.ispage&&!z.haswrapper){var D=z.win.attr("style"),E=parseFloat(z.win.css("width"))+1;z.win.css("width",E),z.synched("chromefix",function(){z.win.attr("style",D)})}z.onAttributeChange=function(a){z.lazyResize(z.isieold?250:30)},B.enableobserver&&(z.isie11||!1===o||(z.observerbody=new o(function(a){if(a.forEach(function(a){if("attributes"==a.type)return A.hasClass("modal-open")&&A.hasClass("modal-dialog")&&!g.contains(g(".modal-dialog")[0],z.doc[0])?z.hide():z.show()}),z.me.clientWidth!=z.page.width||z.me.clientHeight!=z.page.height)return z.lazyResize(30)}),z.observerbody.observe(h.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),z.ispage||z.haswrapper||(!1!==o?(z.observer=new o(function(a){a.forEach(z.onAttributeChange)}),z.observer.observe(z.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),z.observerremover=new o(function(a){a.forEach(function(a){if(a.removedNodes.length>0)for(var b in a.removedNodes)if(z&&a.removedNodes[b]==z.win[0])return z.remove()})}),z.observerremover.observe(z.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(z.bind(z.win,F.isie&&!F.isie9?"propertychange":"DOMAttrModified",z.onAttributeChange),F.isie9&&z.win[0].attachEvent("onpropertychange",z.onAttributeChange),z.bind(z.win,"DOMNodeRemoved",function(a){a.target==z.win[0]&&z.remove()})))),!z.ispage&&B.boxzoom&&z.bind(i,"resize",z.resizeZoom),z.istextarea&&(z.bind(z.win,"keydown",z.lazyResize),z.bind(z.win,"mouseup",z.lazyResize)),z.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var G=function(){z.iframexd=!1;var b;try{b="contentDocument"in this?this.contentDocument:this.contentWindow._doc;b.domain}catch(a){z.iframexd=!0,b=!1}if(z.iframexd)return!0;if(z.forcescreen=!0,z.isiframe&&(z.iframe={doc:g(b),html:z.doc.contents().find("html")[0],body:z.doc.contents().find("body")[0]},z.getContentSize=function(){return{w:Math.max(z.iframe.html.scrollWidth,z.iframe.body.scrollWidth),h:Math.max(z.iframe.html.scrollHeight,z.iframe.body.scrollHeight)}},z.docscroll=g(z.iframe.body)),!F.isios&&B.iframeautoresize&&!z.isiframe){z.win.scrollTop(0),z.doc.height("");var c=Math.max(b.getElementsByTagName("html")[0].scrollHeight,b.body.scrollHeight);z.doc.height(c)}z.lazyResize(30),z.css(g(z.iframe.body),a),F.isios&&z.haswrapper&&z.css(g(b.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?z.bind(this.contentWindow,"scroll",z.onscroll):z.bind(b,"scroll",z.onscroll),B.enablemousewheel&&z.mousewheel(b,z.onmousewheel),B.enablekeyboard&&z.bind(b,F.isopera?"keypress":"keydown",z.onkeypress),F.cantouch?(z.bind(b,"touchstart",z.ontouchstart),z.bind(b,"touchmove",z.ontouchmove)):B.emulatetouch&&(z.bind(b,"mousedown",z.ontouchstart),z.bind(b,"mousemove",function(a){return z.ontouchmove(a,!0)}),B.grabcursorenabled&&F.cursorgrabvalue&&z.css(g(b.body),{cursor:F.cursorgrabvalue})),z.bind(b,"mouseup",z.ontouchend),z.zoom&&(B.dblclickzoom&&z.bind(b,"dblclick",z.doZoom),z.ongesturezoom&&z.bind(b,"gestureend",z.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){G.call(z.doc[0],!1)},500),z.bind(this.doc,"load",G)}},this.showCursor=function(a,b){if(z.cursortimeout&&(clearTimeout(z.cursortimeout),z.cursortimeout=0),z.rail){if(z.autohidedom&&(z.autohidedom.stop().css({opacity:B.cursoropacitymax}),z.cursoractive=!0),z.rail.drag&&1==z.rail.drag.pt||(void 0!==a&&!1!==a&&(z.scroll.y=a/z.scrollratio.y|0),void 0!==b&&(z.scroll.x=b/z.scrollratio.x|0)),z.cursor.css({height:z.cursorheight,top:z.scroll.y}),z.cursorh){var c=z.hasreversehr?z.scrollvaluemaxw-z.scroll.x:z.scroll.x;z.cursorh.css({width:z.cursorwidth,left:!z.rail.align&&z.rail.visibility?c+z.rail.width:c}),z.cursoractive=!0}z.zoom&&z.zoom.stop().css({opacity:B.cursoropacitymax})}},this.hideCursor=function(a){z.cursortimeout||z.rail&&z.autohidedom&&(z.hasmousefocus&&"leave"===B.autohidemode||(z.cursortimeout=setTimeout(function(){z.rail.active&&z.showonmouseevent||(z.autohidedom.stop().animate({opacity:B.cursoropacitymin}),z.zoom&&z.zoom.stop().animate({opacity:B.cursoropacitymin}),z.cursoractive=!1),z.cursortimeout=0},a||B.hidecursordelay)))},this.noticeCursor=function(a,b,c){z.showCursor(b,c),z.rail.active||z.hideCursor(a)},this.getContentSize=z.ispage?function(){return{w:Math.max(h.body.scrollWidth,h.documentElement.scrollWidth),h:Math.max(h.body.scrollHeight,h.documentElement.scrollHeight)}}:z.haswrapper?function(){return{w:z.doc[0].offsetWidth,h:z.doc[0].offsetHeight}}:function(){return{w:z.docscroll[0].scrollWidth,h:z.docscroll[0].scrollHeight}},this.onResize=function(a,b){if(!z||!z.win)return!1;var c=z.page.maxh,d=z.page.maxw,e=z.view.h,f=z.view.w;if(z.view={w:z.ispage?z.win.width():z.win[0].clientWidth,h:z.ispage?z.win.height():z.win[0].clientHeight},z.page=b||z.getContentSize(),z.page.maxh=Math.max(0,z.page.h-z.view.h),z.page.maxw=Math.max(0,z.page.w-z.view.w),z.page.maxh==c&&z.page.maxw==d&&z.view.w==f&&z.view.h==e){if(z.ispage)return z;var g=z.win.offset();if(z.lastposition){var h=z.lastposition;if(h.top==g.top&&h.left==g.left)return z}z.lastposition=g}return 0===z.page.maxh?(z.hideRail(),z.scrollvaluemax=0,z.scroll.y=0,z.scrollratio.y=0,z.cursorheight=0,z.setScrollTop(0),z.rail&&(z.rail.scrollable=!1)):(z.page.maxh-=B.railpadding.top+B.railpadding.bottom,z.rail.scrollable=!0),0===z.page.maxw?(z.hideRailHr(),z.scrollvaluemaxw=0,z.scroll.x=0,z.scrollratio.x=0,z.cursorwidth=0,z.setScrollLeft(0),z.railh&&(z.railh.scrollable=!1)):(z.page.maxw-=B.railpadding.left+B.railpadding.right,z.railh&&(z.railh.scrollable=B.horizrailenabled)),z.railslocked=z.locked||0===z.page.maxh&&0===z.page.maxw,z.railslocked?(z.ispage||z.updateScrollBar(z.view),!1):(z.hidden||z.visibility?!z.railh||z.hidden||z.railh.visibility||z.showRailHr():z.showRail().showRailHr(),z.istextarea&&z.win.css("resize")&&"none"!=z.win.css("resize")&&(z.view.h-=20),z.cursorheight=Math.min(z.view.h,Math.round(z.view.h*(z.view.h/z.page.h))),z.cursorheight=B.cursorfixedheight?B.cursorfixedheight:Math.max(B.cursorminheight,z.cursorheight),z.cursorwidth=Math.min(z.view.w,Math.round(z.view.w*(z.view.w/z.page.w))),z.cursorwidth=B.cursorfixedheight?B.cursorfixedheight:Math.max(B.cursorminheight,z.cursorwidth),z.scrollvaluemax=z.view.h-z.cursorheight-(B.railpadding.top+B.railpadding.bottom),z.hasborderbox||(z.scrollvaluemax-=z.cursor[0].offsetHeight-z.cursor[0].clientHeight),z.railh&&(z.railh.width=z.page.maxh>0?z.view.w-z.rail.width:z.view.w,z.scrollvaluemaxw=z.railh.width-z.cursorwidth-(B.railpadding.left+B.railpadding.right)),z.ispage||z.updateScrollBar(z.view),z.scrollratio={x:z.page.maxw/z.scrollvaluemaxw,y:z.page.maxh/z.scrollvaluemax},z.getScrollTop()>z.page.maxh?z.doScrollTop(z.page.maxh):(z.scroll.y=z.getScrollTop()/z.scrollratio.y|0,z.scroll.x=z.getScrollLeft()/z.scrollratio.x|0,z.cursoractive&&z.noticeCursor()),z.scroll.y&&0===z.getScrollTop()&&z.doScrollTo(z.scroll.y*z.scrollratio.y|0),z)},this.resize=z.onResize;var J=0;this.onscreenresize=function(a){clearTimeout(J);var b=!z.ispage&&!z.haswrapper;b&&z.hideRails(),J=setTimeout(function(){z&&(b&&z.showRails(),z.resize()),J=0},120)},this.lazyResize=function(a){return clearTimeout(J),J=setTimeout(function(){z&&z.resize(),J=0},a||240),z},this.jqbind=function(a,b,c){z.events.push({e:a,n:b,f:c,q:!0}),g(a).on(b,c)},this.mousewheel=function(a,b,c){var d="jquery"in a?a[0]:a;if("onwheel"in h.createElement("div"))z._bind(d,"wheel",b,c||!1);else{var e=void 0!==h.onmousewheel?"mousewheel":"DOMMouseScroll";w(d,e,b,c||!1),"DOMMouseScroll"==e&&w(d,"MozMousePixelScroll",b,c||!1)}};var K=!1;if(F.haseventlistener){try{var L=Object.defineProperty({},"passive",{get:function(){K=!0}});i.addEventListener("test",null,L)}catch(a){}this.stopPropagation=function(a){return!!a&&(a=a.original?a.original:a,a.stopPropagation(),!1)},this.cancelEvent=function(a){return a.cancelable&&a.preventDefault(),a.stopImmediatePropagation(),a.preventManipulation&&a.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},i.constructor.prototype.addEventListener=h.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(a,b,c){this.attachEvent("on"+a,b)},i.constructor.prototype.removeEventListener=h.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(a,b,c){this.detachEvent("on"+a,b)},this.cancelEvent=function(a){return a=a||i.event,a&&(a.cancelBubble=!0,a.cancel=!0,a.returnValue=!1),!1},this.stopPropagation=function(a){return a=a||i.event,a&&(a.cancelBubble=!0),!1};this.delegate=function(a,b,c,d,e){var f=k[b]||!1;f||(f={a:[],l:[],f:function(a){for(var b=f.l,c=b.length-1,d=!1,e=c;e>=0;e--)if(!1===(d=b[e].call(a.target,a)))return!1;return d}},z.bind(a,b,f.f,d,e),k[b]=f),z.ispage?(f.a=[z.id].concat(f.a),f.l=[c].concat(f.l)):(f.a.push(z.id),f.l.push(c))},this.undelegate=function(a,b,c,d,e){var f=k[b]||!1;if(f)for(var g=0,h=f.l.length;g<h;g++)f.a[g]===z.id&&(f.a.splice(g),f.l.splice(g),0===f.a.length&&(z._unbind(a,b,del.f),k[b]=null))},this.bind=function(a,b,c,d,e){var f="jquery"in a?a[0]:a;z._bind(f,b,c,d||!1,e||!1)},this._bind=function(a,b,c,d,e){z.events.push({e:a,n:b,f:c,b:d,q:!1}),K&&e?a.addEventListener(b,c,{passive:!1,capture:d}):a.addEventListener(b,c,d||!1)},this._unbind=function(a,b,c,d){k[b]?z.undelegate(a,b,c,d):a.removeEventListener(b,c,d)},this.unbindAll=function(){for(var a=0;a<z.events.length;a++){var b=z.events[a];b.q?b.e.unbind(b.n,b.f):z._unbind(b.e,b.n,b.f,b.b)}},this.showRails=function(){return z.showRail().showRailHr()},this.showRail=function(){return 0===z.page.maxh||!z.ispage&&"none"==z.win.css("display")||(z.visibility=!0,z.rail.visibility=!0,z.rail.css("display","block")),z},this.showRailHr=function(){return z.railh&&(0===z.page.maxw||!z.ispage&&"none"==z.win.css("display")||(z.railh.visibility=!0,z.railh.css("display","block"))),z},this.hideRails=function(){return z.hideRail().hideRailHr()},this.hideRail=function(){return z.visibility=!1,z.rail.visibility=!1,z.rail.css("display","none"),z},this.hideRailHr=function(){return z.railh&&(z.railh.visibility=!1,z.railh.css("display","none")),z},this.show=function(){return z.hidden=!1,z.railslocked=!1,z.showRails()},this.hide=function(){return z.hidden=!0,z.railslocked=!0,z.hideRails()},this.toggle=function(){return z.hidden?z.show():z.hide()},this.remove=function(){z.stop(),z.cursortimeout&&clearTimeout(z.cursortimeout);for(var a in z.delaylist)z.delaylist[a]&&m(z.delaylist[a].h);z.doZoomOut(),z.unbindAll(),F.isie9&&z.win[0].detachEvent("onpropertychange",z.onAttributeChange),!1!==z.observer&&z.observer.disconnect(),!1!==z.observerremover&&z.observerremover.disconnect(),!1!==z.observerbody&&z.observerbody.disconnect(),z.events=null,z.cursor&&z.cursor.remove(),z.cursorh&&z.cursorh.remove(),z.rail&&z.rail.remove(),z.railh&&z.railh.remove(),z.zoom&&z.zoom.remove();for(var b=0;b<z.saved.css.length;b++){var c=z.saved.css[b];c[0].css(c[1],void 0===c[2]?"":c[2])}z.saved=!1,z.me.data("__nicescroll","");var d=g.nicescroll;d.each(function(a){if(this&&this.id===z.id){delete d[a];for(var b=++a;b<d.length;b++,a++)d[a]=d[b];d.length--,d.length&&delete d[d.length]}});for(var e in z)z[e]=null,delete z[e];z=null},this.scrollstart=function(a){return this.onscrollstart=a,z},this.scrollend=function(a){return this.onscrollend=a,z},this.scrollcancel=function(a){return this.onscrollcancel=a,z},this.zoomin=function(a){return this.onzoomin=a,z},this.zoomout=function(a){return this.onzoomout=a,z},this.isScrollable=function(a){var b=a.target?a.target:a;if("OPTION"==b.nodeName)return!0;for(;b&&1==b.nodeType&&b!==this.me[0]&&!/^BODY|HTML/.test(b.nodeName);){var c=g(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=g(b);if(/fixed|absolute/.test(c.css("position")))return c;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.triggerScrollStart=function(a,b,c,d,e){if(z.onscrollstart){var f={type:"scrollstart",current:{x:a,y:b},request:{x:c,y:d},end:{x:z.newscrollx,y:z.newscrolly},speed:e};z.onscrollstart.call(z,f)}},this.triggerScrollEnd=function(){if(z.onscrollend){var a=z.getScrollLeft(),b=z.getScrollTop(),c={type:"scrollend",current:{x:a,y:b},end:{x:a,y:b}};z.onscrollend.call(z,c)}};var M=0,N=0,O=0,P=1,Q=!1;if(this.onmousewheel=function(a){if(z.wheelprevented||z.locked)return!1;if(z.railslocked)return z.debounced("checkunlock",z.resize,250),!1;if(z.rail.drag)return z.cancelEvent(a);if("auto"===B.oneaxismousemode&&0!==a.deltaX&&(B.oneaxismousemode=!1),B.oneaxismousemode&&0===a.deltaX&&!z.rail.scrollable)return!z.railh||!z.railh.scrollable||z.onmousewheelhr(a);var b=p(),c=!1;if(B.preservenativescrolling&&z.checkarea+600<b&&(z.nativescrollingarea=z.isScrollable(a),c=!0),z.checkarea=b,z.nativescrollingarea)return!0;var d=y(a,!1,c);return d&&(z.checkarea=0),d},this.onmousewheelhr=function(a){if(!z.wheelprevented){if(z.railslocked||!z.railh.scrollable)return!0;if(z.rail.drag)return z.cancelEvent(a);var b=p(),c=!1;return B.preservenativescrolling&&z.checkarea+600<b&&(z.nativescrollingarea=z.isScrollable(a),c=!0),z.checkarea=b,!!z.nativescrollingarea||(z.railslocked?z.cancelEvent(a):y(a,!0,c))}},this.stop=function(){return z.cancelScroll(),z.scrollmon&&z.scrollmon.stop(),z.cursorfreezed=!1,z.scroll.y=Math.round(z.getScrollTop()*(1/z.scrollratio.y)),z.noticeCursor(),z},this.getTransitionSpeed=function(a){return 80+a/72*B.scrollspeed|0},B.smoothscroll)if(z.ishwscroll&&F.hastransition&&B.usetransition&&B.smoothscroll){var R="";this.resetTransition=function(){R="",z.doc.css(F.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(a,b){var c=b?a:z.getTransitionSpeed(a),d=c+"ms";return R!==d&&(R=d,z.doc.css(F.prefixstyle+"transition-duration",d)),c},this.doScrollLeft=function(a,b){var c=z.scrollrunning?z.newscrolly:z.getScrollTop();z.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=z.scrollrunning?z.newscrollx:z.getScrollLeft();z.doScrollPos(c,a,b)},this.cursorupdate={running:!1,start:function(){var a=this;if(!a.running){a.running=!0;var b=function(){a.running&&l(b),z.showCursor(z.getScrollTop(),z.getScrollLeft()),z.notifyScrollEvent(z.win[0])};l(b)}},stop:function(){this.running=!1}},this.doScrollPos=function(a,b,c){var d=z.getScrollTop(),e=z.getScrollLeft();if(((z.newscrolly-d)*(b-d)<0||(z.newscrollx-e)*(a-e)<0)&&z.cancelScroll(),B.bouncescroll?(b<0?b=b/2|0:b>z.page.maxh&&(b=z.page.maxh+(b-z.page.maxh)/2|0),a<0?a=a/2|0:a>z.page.maxw&&(a=z.page.maxw+(a-z.page.maxw)/2|0)):(b<0?b=0:b>z.page.maxh&&(b=z.page.maxh),a<0?a=0:a>z.page.maxw&&(a=z.page.maxw)),z.scrollrunning&&a==z.newscrollx&&b==z.newscrolly)return!1;z.newscrolly=b,z.newscrollx=a;var f=z.getScrollTop(),g=z.getScrollLeft(),h={};h.x=a-g,h.y=b-f;var i=0|Math.sqrt(h.x*h.x+h.y*h.y),j=z.prepareTransition(i);z.scrollrunning||(z.scrollrunning=!0,z.triggerScrollStart(g,f,a,b,j),z.cursorupdate.start()),z.scrollendtrapped=!0,F.transitionend||(z.scrollendtrapped&&clearTimeout(z.scrollendtrapped),z.scrollendtrapped=setTimeout(z.onScrollTransitionEnd,j)),z.setScrollTop(z.newscrolly),z.setScrollLeft(z.newscrollx)},this.cancelScroll=function(){if(!z.scrollendtrapped)return!0;var a=z.getScrollTop(),b=z.getScrollLeft();return z.scrollrunning=!1,F.transitionend||clearTimeout(F.transitionend),z.scrollendtrapped=!1,z.resetTransition(),z.setScrollTop(a),z.railh&&z.setScrollLeft(b),z.timerscroll&&z.timerscroll.tm&&clearInterval(z.timerscroll.tm),z.timerscroll=!1,z.cursorfreezed=!1,z.cursorupdate.stop(),z.showCursor(a,b),z},this.onScrollTransitionEnd=function(){if(z.scrollendtrapped){var a=z.getScrollTop(),b=z.getScrollLeft();if(a<0?a=0:a>z.page.maxh&&(a=z.page.maxh),b<0?b=0:b>z.page.maxw&&(b=z.page.maxw),a!=z.newscrolly||b!=z.newscrollx)return z.doScrollPos(b,a,B.snapbackspeed);z.scrollrunning&&z.triggerScrollEnd(),z.scrollrunning=!1,z.scrollendtrapped=!1,z.resetTransition(),z.timerscroll=!1,z.setScrollTop(a),z.railh&&z.setScrollLeft(b),z.cursorupdate.stop(),z.noticeCursor(!1,a,b),z.cursorfreezed=!1}}}else this.doScrollLeft=function(a,b){var c=z.scrollrunning?z.newscrolly:z.getScrollTop();z.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=z.scrollrunning?z.newscrollx:z.getScrollLeft();z.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=z.getScrollTop(),e=z.getScrollLeft();((z.newscrolly-d)*(b-d)<0||(z.newscrollx-e)*(a-e)<0)&&z.cancelScroll();var f=!1;if(z.bouncescroll&&z.rail.visibility||(b<0?(b=0,f=!0):b>z.page.maxh&&(b=z.page.maxh,f=!0)),z.bouncescroll&&z.railh.visibility||(a<0?(a=0,f=!0):a>z.page.maxw&&(a=z.page.maxw,f=!0)),z.scrollrunning&&z.newscrolly===b&&z.newscrollx===a)return!0;z.newscrolly=b,z.newscrollx=a,z.dst={},z.dst.x=a-e,z.dst.y=b-d,z.dst.px=e,z.dst.py=d;var g=0|Math.sqrt(z.dst.x*z.dst.x+z.dst.y*z.dst.y),h=z.getTransitionSpeed(g);z.bzscroll={};var i=f?1:.58;z.bzscroll.x=new G(e,z.newscrollx,h,0,0,i,1),z.bzscroll.y=new G(d,z.newscrolly,h,0,0,i,1);var j=(p(),function(){if(z.scrollrunning){var a=z.bzscroll.y.getPos();z.setScrollLeft(z.bzscroll.x.getNow()),z.setScrollTop(z.bzscroll.y.getNow()),a<=1?z.timer=l(j):(z.scrollrunning=!1,z.timer=0,z.triggerScrollEnd())}});z.scrollrunning||(z.triggerScrollStart(e,d,a,b,h),z.scrollrunning=!0,z.timer=l(j))},this.cancelScroll=function(){return z.timer&&m(z.timer),z.timer=0,z.bzscroll=!1,z.scrollrunning=!1,z};else this.doScrollLeft=function(a,b){var c=z.getScrollTop();z.doScrollPos(a,c,b)},this.doScrollTop=function(a,b){var c=z.getScrollLeft();z.doScrollPos(c,a,b)},this.doScrollPos=function(a,b,c){var d=a>z.page.maxw?z.page.maxw:a;d<0&&(d=0);var e=b>z.page.maxh?z.page.maxh:b;e<0&&(e=0),z.synched("scroll",function(){z.setScrollTop(e),z.setScrollLeft(d)})},this.cancelScroll=function(){};this.doScrollBy=function(a,b){x(0,a)},this.doScrollLeftBy=function(a,b){x(a,0)},this.doScrollTo=function(a,b){var c=b?Math.round(a*z.scrollratio.y):a;c<0?c=0:c>z.page.maxh&&(c=z.page.maxh),z.cursorfreezed=!1,z.doScrollTop(a)},this.checkContentSize=function(){var a=z.getContentSize();a.h==z.page.h&&a.w==z.page.w||z.resize(!1,a)},z.onscroll=function(a){z.rail.drag||z.cursorfreezed||z.synched("scroll",function(){z.scroll.y=Math.round(z.getScrollTop()/z.scrollratio.y),z.railh&&(z.scroll.x=Math.round(z.getScrollLeft()/z.scrollratio.x)),z.noticeCursor()})},z.bind(z.docscroll,"scroll",z.onscroll),this.doZoomIn=function(a){if(!z.zoomactive){z.zoomactive=!0,z.zoomrestore={style:{}};var b=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],c=z.win[0].style;for(var d in b){var e=b[d];z.zoomrestore.style[e]=void 0!==c[e]?c[e]:""}z.zoomrestore.style.width=z.win.css("width"),z.zoomrestore.style.height=z.win.css("height"),z.zoomrestore.padding={w:z.win.outerWidth()-z.win.width(),h:z.win.outerHeight()-z.win.height()},F.isios4&&(z.zoomrestore.scrollTop=j.scrollTop(),j.scrollTop(0)),z.win.css({position:F.isios4?"absolute":"fixed",top:0,left:0,zIndex:f+100,margin:0});var g=z.win.css("backgroundColor");return(""===g||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(g))&&z.win.css("backgroundColor","#fff"),z.rail.css({zIndex:f+101}),z.zoom.css({zIndex:f+102}),z.zoom.css("backgroundPosition","0 -18px"),z.resizeZoom(),z.onzoomin&&z.onzoomin.call(z),z.cancelEvent(a)}},this.doZoomOut=function(a){if(z.zoomactive)return z.zoomactive=!1,z.win.css("margin",""),z.win.css(z.zoomrestore.style),F.isios4&&j.scrollTop(z.zoomrestore.scrollTop),z.rail.css({"z-index":z.zindex}),z.zoom.css({"z-index":z.zindex}),z.zoomrestore=!1,z.zoom.css("backgroundPosition","0 0"),z.onResize(),z.onzoomout&&z.onzoomout.call(z),z.cancelEvent(a)},this.doZoom=function(a){return z.zoomactive?z.doZoomOut(a):z.doZoomIn(a)},this.resizeZoom=function(){if(z.zoomactive){var a=z.getScrollTop();z.win.css({width:j.width()-z.zoomrestore.padding.w+"px",height:j.height()-z.zoomrestore.padding.h+"px"}),z.onResize(),z.setScrollTop(Math.min(z.page.maxh,a))}},this.init(),g.nicescroll.push(this)},u=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.reset=function(a,c){b.stop(),b.steptime=0,b.lasttime=p(),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=p();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):b.nc.triggerScrollEnd()},this.doMomentum=function(a){var c=p(),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.getScrollTop(),b.chky=b.lastscrolly;var n=b.lastscrollx,o=b.lastscrolly,q=function(){var a=p()-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=n,b.nc.setScrollLeft(n)}if(b.speedy){b.nc.getScrollTop();b.chky=o,b.nc.setScrollTop(o)}b.timer||(b.nc.hideCursor(),b.doSnapy(n,o))}),b.demulxy<1?b.timer=setTimeout(q,l):(b.stop(),b.nc.hideCursor(),b.doSnapy(n,o))};q()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},v=a.fn.scrollTop;a.cssHooks.pageYOffset={get:function(a,b,c){var d=g.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.getScrollTop():v.call(a)},set:function(a,b){var c=g.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.setScrollTop(parseInt(b)):v.call(a,b),this}},a.fn.scrollTop=function(a){if(void 0===a){var b=!!this[0]&&(g.data(this[0],"__nicescroll")||!1);return b&&b.ishwscroll?b.getScrollTop():v.call(this)}return this.each(function(){var b=g.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollTop(parseInt(a)):v.call(g(this),a)})};var w=a.fn.scrollLeft;g.cssHooks.pageXOffset={get:function(a,b,c){var d=g.data(a,"__nicescroll")||!1;return d&&d.ishwscroll?d.getScrollLeft():w.call(a)},set:function(a,b){var c=g.data(a,"__nicescroll")||!1;return c&&c.ishwscroll?c.setScrollLeft(parseInt(b)):w.call(a,b),this}},a.fn.scrollLeft=function(a){if(void 0===a){var b=!!this[0]&&(g.data(this[0],"__nicescroll")||!1);return b&&b.ishwscroll?b.getScrollLeft():w.call(this)}return this.each(function(){var b=g.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollLeft(parseInt(a)):w.call(g(this),a)})};var x=function(a){var b=this;if(this.length=0,this.name="nicescrollarray",this.each=function(a){return g.each(b,a),b},this.push=function(a){b[b.length]=a,b.length++},this.eq=function(a){return b[a]},a)for(var c=0;c<a.length;c++){var d=g.data(a[c],"__nicescroll")||!1;d&&(this[this.length]=d,this.length++)}return this};!function(a,b,c){for(var d=0,e=b.length;d<e;d++)c(a,b[d])}(x.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)})}}),a.fn.getNiceScroll=function(a){return void 0===a?new x(this):this[a]&&g.data(this[a],"__nicescroll")||!1},(a.expr.pseudos||a.expr[":"]).nicescroll=function(a){return void 0!==g.data(a,"__nicescroll")},g.fn.niceScroll=function(a,b){void 0!==b||"object"!=typeof a||"jquery"in a||(b=a,a=!1);var c=new x;return this.each(function(){var d=g(this),e=g.extend({},b);if(a){var f=g(a);e.doc=f.length>1?g(a,d):f,e.win=d}!("doc"in e)||"win"in e||(e.win=d);var h=d.data("__nicescroll")||!1;h||(e.doc=e.doc||d,h=new t(e,d),d.data("__nicescroll",h)),c.push(h)}),1===c.length?c[0]:c},i.NiceScroll={getjQuery:function(){return a}},g.nicescroll||(g.nicescroll=new x,g.nicescroll.options=q)});
[+]
..
[-] bootstrap.scrollspy.js
[edit]
[-] jquery.nicescroll.js
[edit]
[-] jquery.sticky-kit.js
[edit]
[-] jquery.elasticslider.js
[edit]
[-] jquery.toTop.js
[edit]