(function(jquery){var domfocus=false;var mousefocus=false;var zoomactive=false;var tabindexcounter=5000;var ascrailcounter=2000;var globalmaxzindex=0;var $=jquery;function getscriptpath(){var scripts=document.getelementsbytagname('script');var path=scripts[scripts.length-1].src.split('?')[0];return(path.split('/').length>0)?path.split('/').slice(0,-1).join('/')+'/':'';} var scriptpath=getscriptpath();var vendors=['ms','moz','webkit','o'];var setanimationframe=window.requestanimationframe||false;var clearanimationframe=window.cancelanimationframe||false;if(!setanimationframe){for(var vx in vendors){var v=vendors[vx];if(!setanimationframe)setanimationframe=window[v+'requestanimationframe'];if(!clearanimationframe)clearanimationframe=window[v+'cancelanimationframe']||window[v+'cancelrequestanimationframe'];}} var clsmutationobserver=window.mutationobserver||window.webkitmutationobserver||false;var _globaloptions={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:8*3,touchbehavior:false,hwacceleration:true,usetransition:true,boxzoom:false,dblclickzoom:true,gesturezoom:true,grabcursorenabled:true,autohidemode:true,background:"",iframeautoresize:true,cursorminheight:32,preservenativescrolling:true,railoffset:false,bouncescroll:true,spacebarenabled:true,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:true,horizrailenabled:true,railalign:"right",railvalign:"bottom",enabletranslate3d:true,enablemousewheel:true,enablekeyboard:true,smoothscroll:true,sensitiverail:true,enablemouselockapi:true,cursorfixedheight:false,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:true,enablescrollonselection:true,overflowx:true,overflowy:true,cursordragspeed:0.3,rtlmode:false,cursordragontouch:false,oneaxismousemode:"auto"} var browserdetected=false;var getbrowserdetection=function(){if(browserdetected)return browserdetected;var domtest=document.createelement('div');var d={};d.haspointerlock="pointerlockelement"in document||"mozpointerlockelement"in document||"webkitpointerlockelement"in document;d.isopera=("opera"in window);d.isopera12=(d.isopera&&("getusermedia"in navigator));d.isoperamini=(object.prototype.tostring.call(window.operamini)==="[object operamini]");d.isie=(("all"in document)&&("attachevent"in domtest)&&!d.isopera);d.isieold=(d.isie&&!("msinterpolationmode"in domtest.style));d.isie7=d.isie&&!d.isieold&&(!("documentmode"in document)||(document.documentmode==7));d.isie8=d.isie&&("documentmode"in document)&&(document.documentmode==8);d.isie9=d.isie&&("performance"in window)&&(document.documentmode>=9);d.isie10=d.isie&&("performance"in window)&&(document.documentmode>=10);d.isie9mobile=/iemobile.9/i.test(navigator.useragent);if(d.isie9mobile)d.isie9=false;d.isie7mobile=(!d.isie9mobile&&d.isie7)&&/iemobile/i.test(navigator.useragent);d.ismozilla=("mozappearance"in domtest.style);d.iswebkit=("webkitappearance"in domtest.style);d.ischrome=("chrome"in window);d.ischrome22=(d.ischrome&&d.haspointerlock);d.ischrome26=(d.ischrome&&("transition"in domtest.style));d.cantouch=("ontouchstart"in document.documentelement)||("ontouchstart"in window);d.hasmstouch=(window.navigator.mspointerenabled||false);d.ismac=/^mac$/i.test(navigator.platform);d.isios=(d.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform));d.isios4=((d.isios)&&!("seal"in object));d.isandroid=(/android/i.test(navigator.useragent));d.trstyle=false;d.hastransform=false;d.hastranslate3d=false;d.transitionstyle=false;d.hastransition=false;d.transitionend=false;var check=['transform','mstransform','webkittransform','moztransform','otransform'];for(var a=0;anw&&!dd.tt){self.delaylist[name]={last:nw+tm,tt:settimeout(function(){self.delaylist[name].tt=0;fn.call();},tm)}} else if(!dd||!dd.tt){self.delaylist[name]={last:nw,tt:0} settimeout(function(){fn.call();},0);}};this.debounced=function(name,fn,tm){var dd=self.delaylist[name];var nw=(new date()).gettime();self.delaylist[name]=fn;if(!dd){settimeout(function(){var fn=self.delaylist[name];self.delaylist[name]=false;fn.call();},tm);}} this.synched=function(name,fn){function requestsync(){if(self.onsync)return;setanimationframe(function(){self.onsync=false;for(name in self.synclist){var fn=self.synclist[name];if(fn)fn.call(self);self.synclist[name]=false;}});self.onsync=true;};self.synclist[name]=fn;requestsync();return name;};this.unsynched=function(name){if(self.synclist[name])self.synclist[name]=false;} this.css=function(el,pars){for(var n in pars){self.saved.css.push([el,n,el.css(n)]);el.css(n,pars[n]);}};this.scrolltop=function(val){return(typeof val=="undefined")?self.getscrolltop():self.setscrolltop(val);};this.scrollleft=function(val){return(typeof val=="undefined")?self.getscrollleft():self.setscrollleft(val);};bezierclass=function(st,ed,spd,p1,p2,p3,p4){this.st=st;this.ed=ed;this.spd=spd;this.p1=p1||0;this.p2=p2||1;this.p3=p3||0;this.p4=p4||1;this.ts=(new date()).gettime();this.df=this.ed-this.st;};bezierclass.prototype={b2:function(t){return 3*t*t*(1-t)},b3:function(t){return 3*t*(1-t)*(1-t)},b4:function(t){return(1-t)*(1-t)*(1-t)},getnow:function(){var nw=(new date()).gettime();var pc=1-((nw-this.ts)/this.spd);var bz=this.b2(pc)+this.b3(pc)+this.b4(pc);return(pc<0)?this.ed:this.st+math.round(this.df*bz);},update:function(ed,spd){this.st=this.getnow();this.ed=ed;this.spd=spd;this.ts=(new date()).gettime();this.df=this.ed-this.st;return this;}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};if(cap.hastranslate3d&&cap.isios)this.doc.css("-webkit-backface-visibility","hidden");function getmatrixvalues(){var tr=self.doc.css(cap.trstyle);if(tr&&(tr.substr(0,6)=="matrix")){return tr.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,'').split(/, +/);} return false;} this.getscrolltop=function(last){if(!last){var mtx=getmatrixvalues();if(mtx)return(mtx.length==16)?-mtx[13]:-mtx[5];if(self.timerscroll&&self.timerscroll.bz)return self.timerscroll.bz.getnow();} return self.doc.translate.y;};this.getscrollleft=function(last){if(!last){var mtx=getmatrixvalues();if(mtx)return(mtx.length==16)?-mtx[12]:-mtx[4];if(self.timerscroll&&self.timerscroll.bh)return self.timerscroll.bh.getnow();} return self.doc.translate.x;};if(document.createevent){this.notifyscrollevent=function(el){var e=document.createevent("uievents");e.inituievent("scroll",false,true,window,1);el.dispatchevent(e);};} else if(document.fireevent){this.notifyscrollevent=function(el){var e=document.createeventobject();el.fireevent("onscroll");e.cancelbubble=true;};} else{this.notifyscrollevent=function(el,add){};} if(cap.hastranslate3d&&self.opt.enabletranslate3d){this.setscrolltop=function(val,silent){self.doc.translate.y=val;self.doc.translate.ty=(val*-1)+"px";self.doc.css(cap.trstyle,"translate3d("+self.doc.translate.tx+","+self.doc.translate.ty+",0px)");if(!silent)self.notifyscrollevent(self.win[0]);};this.setscrollleft=function(val,silent){self.doc.translate.x=val;self.doc.translate.tx=(val*-1)+"px";self.doc.css(cap.trstyle,"translate3d("+self.doc.translate.tx+","+self.doc.translate.ty+",0px)");if(!silent)self.notifyscrollevent(self.win[0]);};}else{this.setscrolltop=function(val,silent){self.doc.translate.y=val;self.doc.translate.ty=(val*-1)+"px";self.doc.css(cap.trstyle,"translate("+self.doc.translate.tx+","+self.doc.translate.ty+")");if(!silent)self.notifyscrollevent(self.win[0]);};this.setscrollleft=function(val,silent){self.doc.translate.x=val;self.doc.translate.tx=(val*-1)+"px";self.doc.css(cap.trstyle,"translate("+self.doc.translate.tx+","+self.doc.translate.ty+")");if(!silent)self.notifyscrollevent(self.win[0]);};}}else{this.getscrolltop=function(){return self.docscroll.scrolltop();};this.setscrolltop=function(val){return self.docscroll.scrolltop(val);};this.getscrollleft=function(){return self.docscroll.scrollleft();};this.setscrollleft=function(val){return self.docscroll.scrollleft(val);};} this.gettarget=function(e){if(!e)return false;if(e.target)return e.target;if(e.srcelement)return e.srcelement;return false;};this.hasparent=function(e,id){if(!e)return false;var el=e.target||e.srcelement||e||false;while(el&&el.id!=id){el=el.parentnode||false;} return(el!==false);};function getzindex(){var dom=self.win;if("zindex"in dom)return dom.zindex();while(dom.length>0){if(dom[0].nodetype==9)return false;var zi=dom.css('zindex');if(!isnan(zi)&&zi!=0)return parseint(zi);dom=dom.parent();} return false;};var _convertborderwidth={"thin":1,"medium":3,"thick":5};function getwidthtopixel(dom,prop,chkheight){var wd=dom.css(prop);var px=parsefloat(wd);if(isnan(px)){px=_convertborderwidth[wd]||0;var brd=(px==3)?((chkheight)?(self.win.outerheight()-self.win.innerheight()):(self.win.outerwidth()-self.win.innerwidth())):1;if(self.isie8&&px)px+=1;return(brd)?px:0;} return px;};this.getoffset=function(){if(self.isfixed)return{top:parsefloat(self.win.css('top')),left:parsefloat(self.win.css('left'))};if(!self.viewport)return self.win.offset();var ww=self.win.offset();var vp=self.viewport.offset();return{top:ww.top-vp.top+self.viewport.scrolltop(),left:ww.left-vp.left+self.viewport.scrollleft()};};this.updatescrollbar=function(len){if(self.ishwscroll){self.rail.css({height:self.win.innerheight()});if(self.railh)self.railh.css({width:self.win.innerwidth()});}else{var wpos=self.getoffset();var pos={top:wpos.top,left:wpos.left};pos.top+=getwidthtopixel(self.win,'border-top-width',true);var brd=(self.win.outerwidth()-self.win.innerwidth())/2;pos.left+=(self.rail.align)?self.win.outerwidth()-getwidthtopixel(self.win,'border-right-width')-self.rail.width:getwidthtopixel(self.win,'border-left-width');var off=self.opt.railoffset;if(off){if(off.top)pos.top+=off.top;if(self.rail.align&&off.left)pos.left+=off.left;} if(!self.locked)self.rail.css({top:pos.top,left:pos.left,height:(len)?len.h:self.win.innerheight()});if(self.zoom){self.zoom.css({top:pos.top+1,left:(self.rail.align==1)?pos.left-20:pos.left+self.rail.width+4});} if(self.railh&&!self.locked){var pos={top:wpos.top,left:wpos.left};var y=(self.railh.align)?pos.top+getwidthtopixel(self.win,'border-top-width',true)+self.win.innerheight()-self.railh.height:pos.top+getwidthtopixel(self.win,'border-top-width',true);var x=pos.left+getwidthtopixel(self.win,'border-left-width');self.railh.css({top:y,left:x,width:self.railh.width});}}};this.dorailclick=function(e,dbl,hr){var fn,pg,cur,pos;if(self.locked)return;self.cancelevent(e);if(dbl){fn=(hr)?self.doscrollleft:self.doscrolltop;cur=(hr)?((e.pagex-self.railh.offset().left-(self.cursorwidth/2))*self.scrollratio.x):((e.pagey-self.rail.offset().top-(self.cursorheight/2))*self.scrollratio.y);fn(cur);}else{fn=(hr)?self.doscrollleftby:self.doscrollby;cur=(hr)?self.scroll.x:self.scroll.y;pos=(hr)?e.pagex-self.railh.offset().left:e.pagey-self.rail.offset().top;pg=(hr)?self.view.w:self.view.h;(cur>=pos)?fn(pg):fn(-pg);}} self.hasanimationframe=(setanimationframe);self.hascancelanimationframe=(clearanimationframe);if(!self.hasanimationframe){setanimationframe=function(fn){return settimeout(fn,15-math.floor((+new date)/1000)%16)};clearanimationframe=clearinterval;} else if(!self.hascancelanimationframe)clearanimationframe=function(){self.cancelanimationframe=true};this.init=function(){self.saved.css=[];if(cap.isie7mobile)return true;if(cap.isoperamini)return true;if(cap.hasmstouch)self.css((self.ispage)?$("html"):self.win,{'-ms-touch-action':'none'});self.zindex="auto";if(!self.ispage&&self.opt.zindex=="auto"){self.zindex=getzindex()||"auto";}else{self.zindex=self.opt.zindex;} if(!self.ispage&&self.zindex!="auto"){if(self.zindex>globalmaxzindex)globalmaxzindex=self.zindex;} if(self.isie&&self.zindex==0&&self.opt.zindex=="auto"){self.zindex="auto";} if(!self.ispage||(!cap.cantouch&&!cap.isieold&&!cap.isie9mobile)){var cont=self.docscroll;if(self.ispage)cont=(self.haswrapper)?self.win:self.doc;if(!cap.isie9mobile)self.css(cont,{'overflow-y':'hidden'});if(self.ispage&&cap.isie7){if(self.doc[0].nodename=='body')self.css($("html"),{'overflow-y':'hidden'});else if(self.doc[0].nodename=='html')self.css($("body"),{'overflow-y':'hidden'});} if(cap.isios&&!self.ispage&&!self.haswrapper)self.css($("body"),{"-webkit-overflow-scrolling":"touch"});var cursor=$(document.createelement('div'));cursor.css({position:"relative",top:0,"float":"right",width:self.opt.cursorwidth,height:"0px",'background-color':self.opt.cursorcolor,border:self.opt.cursorborder,'background-clip':'padding-box','-webkit-border-radius':self.opt.cursorborderradius,'-moz-border-radius':self.opt.cursorborderradius,'border-radius':self.opt.cursorborderradius});cursor.hborder=parsefloat(cursor.outerheight()-cursor.innerheight());self.cursor=cursor;var rail=$(document.createelement('div'));rail.attr('id',self.id);rail.addclass('nicescroll-rails');var v,a,kp=["left","right"];for(var n in kp){a=kp[n];v=self.opt.railpadding[a];(v)?rail.css("padding-"+a,v+"px"):self.opt.railpadding[a]=0;} rail.append(cursor);rail.width=math.max(parsefloat(self.opt.cursorwidth),cursor.outerwidth())+self.opt.railpadding['left']+self.opt.railpadding['right'];rail.css({width:rail.width+"px",'zindex':self.zindex,"background":self.opt.background,cursor:"default"});rail.visibility=true;rail.scrollable=true;rail.align=(self.opt.railalign=="left")?0:1;self.rail=rail;self.rail.drag=false;var zoom=false;if(self.opt.boxzoom&&!self.ispage&&!cap.isieold){zoom=document.createelement('div');self.bind(zoom,"click",self.dozoom);self.zoom=$(zoom);self.zoom.css({"cursor":"pointer",'z-index':self.zindex,'backgroundimage':'url('+scriptpath+'zoomico.png)','height':18,'width':18,'backgroundposition':'0px 0px'});if(self.opt.dblclickzoom)self.bind(self.win,"dblclick",self.dozoom);if(cap.cantouch&&self.opt.gesturezoom){self.ongesturezoom=function(e){if(e.scale>1.5)self.dozoomin(e);if(e.scale<0.8)self.dozoomout(e);return self.cancelevent(e);};self.bind(self.win,"gestureend",self.ongesturezoom);}} self.railh=false;if(self.opt.horizrailenabled){self.css(cont,{'overflow-x':'hidden'});var cursor=$(document.createelement('div'));cursor.css({position:"relative",top:0,height:self.opt.cursorwidth,width:"0px",'background-color':self.opt.cursorcolor,border:self.opt.cursorborder,'background-clip':'padding-box','-webkit-border-radius':self.opt.cursorborderradius,'-moz-border-radius':self.opt.cursorborderradius,'border-radius':self.opt.cursorborderradius});cursor.wborder=parsefloat(cursor.outerwidth()-cursor.innerwidth());self.cursorh=cursor;var railh=$(document.createelement('div'));railh.attr('id',self.id+'-hr');railh.addclass('nicescroll-rails');railh.height=math.max(parsefloat(self.opt.cursorwidth),cursor.outerheight());railh.css({height:railh.height+"px",'zindex':self.zindex,"background":self.opt.background});railh.append(cursor);railh.visibility=true;railh.scrollable=true;railh.align=(self.opt.railvalign=="top")?0:1;self.railh=railh;self.railh.drag=false;} if(self.ispage){rail.css({position:"fixed",top:"0px",height:"100%"});(rail.align)?rail.css({right:"0px"}):rail.css({left:"0px"});self.body.append(rail);if(self.railh){railh.css({position:"fixed",left:"0px",width:"100%"});(railh.align)?railh.css({bottom:"0px"}):railh.css({top:"0px"});self.body.append(railh);}}else{if(self.ishwscroll){if(self.win.css('position')=='static')self.css(self.win,{'position':'relative'});var bd=(self.win[0].nodename=='html')?self.body:self.win;if(self.zoom){self.zoom.css({position:"absolute",top:1,right:0,"margin-right":rail.width+4});bd.append(self.zoom);} rail.css({position:"absolute",top:0});(rail.align)?rail.css({right:0}):rail.css({left:0});bd.append(rail);if(railh){railh.css({position:"absolute",left:0,bottom:0});(railh.align)?railh.css({bottom:0}):railh.css({top:0});bd.append(railh);}}else{self.isfixed=(self.win.css("position")=="fixed");var rlpos=(self.isfixed)?"fixed":"absolute";if(!self.isfixed)self.viewport=self.getviewport(self.win[0]);if(self.viewport){self.body=self.viewport;if((/relative|absolute/.test(self.viewport.css("position")))==false)self.css(self.viewport,{"position":"relative"});} rail.css({position:rlpos});if(self.zoom)self.zoom.css({position:rlpos});self.updatescrollbar();self.body.append(rail);if(self.zoom)self.body.append(self.zoom);if(self.railh){railh.css({position:rlpos});self.body.append(railh);}} if(cap.isios)self.css(self.win,{'-webkit-tap-highlight-color':'rgba(0,0,0,0)','-webkit-touch-callout':'none'});if(cap.isie&&self.opt.disableoutline)self.win.attr("hidefocus","true");if(cap.iswebkit&&self.opt.disableoutline)self.win.css({"outline":"none"});} if(self.opt.autohidemode===false){self.autohidedom=false;self.rail.css({opacity:self.opt.cursoropacitymax});if(self.railh)self.railh.css({opacity:self.opt.cursoropacitymax});} else if(self.opt.autohidemode===true){self.autohidedom=$().add(self.rail);if(cap.isie8)self.autohidedom=self.autohidedom.add(self.cursor);if(self.railh)self.autohidedom=self.autohidedom.add(self.railh);if(self.railh&&cap.isie8)self.autohidedom=self.autohidedom.add(self.cursorh);} else if(self.opt.autohidemode=="scroll"){self.autohidedom=$().add(self.rail);if(self.railh)self.autohidedom=self.autohidedom.add(self.railh);} else if(self.opt.autohidemode=="cursor"){self.autohidedom=$().add(self.cursor);if(self.railh)self.autohidedom=self.autohidedom.add(self.cursorh);} else if(self.opt.autohidemode=="hidden"){self.autohidedom=false;self.hide();self.locked=false;} if(cap.isie9mobile){self.scrollmom=new scrollmomentumclass2d(self);self.onmangotouch=function(e){var py=self.getscrolltop();var px=self.getscrollleft();if((py==self.scrollmom.lastscrolly)&&(px==self.scrollmom.lastscrollx))return true;var dfy=py-self.mangotouch.sy;var dfx=px-self.mangotouch.sx;var df=math.round(math.sqrt(math.pow(dfx,2)+math.pow(dfy,2)));if(df==0)return;var dry=(dfy<0)?-1:1;var drx=(dfx<0)?-1:1;var tm=+new date();if(self.mangotouch.lazy)cleartimeout(self.mangotouch.lazy);if(((tm-self.mangotouch.tm)>80)||(self.mangotouch.dry!=dry)||(self.mangotouch.drx!=drx)){self.scrollmom.stop();self.scrollmom.reset(px,py);self.mangotouch.sy=py;self.mangotouch.ly=py;self.mangotouch.sx=px;self.mangotouch.lx=px;self.mangotouch.dry=dry;self.mangotouch.drx=drx;self.mangotouch.tm=tm;}else{self.scrollmom.stop();self.scrollmom.update(self.mangotouch.sx-dfx,self.mangotouch.sy-dfy);var gap=tm-self.mangotouch.tm;self.mangotouch.tm=tm;var ds=math.max(math.abs(self.mangotouch.ly-py),math.abs(self.mangotouch.lx-px));self.mangotouch.ly=py;self.mangotouch.lx=px;if(ds>2){self.mangotouch.lazy=settimeout(function(){self.mangotouch.lazy=false;self.mangotouch.dry=0;self.mangotouch.drx=0;self.mangotouch.tm=0;self.scrollmom.domomentum(30);},100);}}} var top=self.getscrolltop();var lef=self.getscrollleft();self.mangotouch={sy:top,ly:top,dry:0,sx:lef,lx:lef,drx:0,lazy:false,tm:0};self.bind(self.docscroll,"scroll",self.onmangotouch);}else{if(cap.cantouch||self.istouchcapable||self.opt.touchbehavior||cap.hasmstouch){self.scrollmom=new scrollmomentumclass2d(self);self.ontouchstart=function(e){if(e.pointertype&&e.pointertype!=2)return false;if(!self.locked){if(cap.hasmstouch){var tg=(e.target)?e.target:false;while(tg){var nc=$(tg).getnicescroll();if((nc.length>0)&&(nc[0].me==self.me))break;if(nc.length>0)return false;if((tg.nodename=='div')&&(tg.id==self.id))break;tg=(tg.parentnode)?tg.parentnode:false;}} self.cancelscroll();var tg=self.gettarget(e);if(tg){var skp=(/input/i.test(tg.nodename))&&(/range/i.test(tg.type));if(skp)return self.stoppropagation(e);} if(!("clientx"in e)&&("changedtouches"in e)){e.clientx=e.changedtouches[0].clientx;e.clienty=e.changedtouches[0].clienty;} if(self.forcescreen){var le=e;var e={"original":(e.original)?e.original:e};e.clientx=le.screenx;e.clienty=le.screeny;} self.rail.drag={x:e.clientx,y:e.clienty,sx:self.scroll.x,sy:self.scroll.y,st:self.getscrolltop(),sl:self.getscrollleft(),pt:2,dl:false};if(self.ispage||!self.opt.directionlockdeadzone){self.rail.drag.dl="f";}else{var view={w:$(window).width(),h:$(window).height()};var page={w:math.max(document.body.scrollwidth,document.documentelement.scrollwidth),h:math.max(document.body.scrollheight,document.documentelement.scrollheight)} var maxh=math.max(0,page.h-view.h);var maxw=math.max(0,page.w-view.w);if(!self.rail.scrollable&&self.railh.scrollable)self.rail.drag.ck=(maxh>0)?"v":false;else if(self.rail.scrollable&&!self.railh.scrollable)self.rail.drag.ck=(maxw>0)?"h":false;else self.rail.drag.ck=false;if(!self.rail.drag.ck)self.rail.drag.dl="f";} if(self.opt.touchbehavior&&self.isiframe&&cap.isie){var wp=self.win.position();self.rail.drag.x+=wp.left;self.rail.drag.y+=wp.top;} self.hasmoving=false;self.lastmouseup=false;self.scrollmom.reset(e.clientx,e.clienty);if(!cap.cantouch&&!this.istouchcapable&&!cap.hasmstouch){var ip=(tg)?/input|select|textarea/i.test(tg.nodename):false;if(!ip){if(!self.ispage&&cap.hasmousecapture)tg.setcapture();return(self.opt.touchbehavior)?self.cancelevent(e):self.stoppropagation(e);} if(/submit|cancel|button/i.test($(tg).attr('type'))){pc={"tg":tg,"click":false};self.preventclick=pc;}}}};self.ontouchend=function(e){if(e.pointertype&&e.pointertype!=2)return false;if(self.rail.drag&&(self.rail.drag.pt==2)){self.scrollmom.domomentum();self.rail.drag=false;if(self.hasmoving){self.hasmoving=false;self.lastmouseup=true;self.hidecursor();if(cap.hasmousecapture)document.releasecapture();if(!cap.cantouch)return self.cancelevent(e);}}};var moveneedoffset=(self.opt.touchbehavior&&self.isiframe&&!cap.hasmousecapture);self.ontouchmove=function(e,byiframe){if(e.pointertype&&e.pointertype!=2)return false;if(self.rail.drag&&(self.rail.drag.pt==2)){if(cap.cantouch&&(typeof e.original=="undefined"))return true;self.hasmoving=true;if(self.preventclick&&!self.preventclick.click){self.preventclick.click=self.preventclick.tg.onclick||false;self.preventclick.tg.onclick=self.onpreventclick;} var ev=$.extend({"original":e},e);e=ev;if(("changedtouches"in e)){e.clientx=e.changedtouches[0].clientx;e.clienty=e.changedtouches[0].clienty;} if(self.forcescreen){var le=e;var e={"original":(e.original)?e.original:e};e.clientx=le.screenx;e.clienty=le.screeny;} var ofx=ofy=0;if(moveneedoffset&&!byiframe){var wp=self.win.position();ofx=-wp.left;ofy=-wp.top;} var fy=e.clienty+ofy;var my=(fy-self.rail.drag.y);var fx=e.clientx+ofx;var mx=(fx-self.rail.drag.x);var ny=self.rail.drag.st-my;if(self.ishwscroll&&self.opt.bouncescroll){if(ny<0){ny=math.round(ny/2);} else if(ny>self.page.maxh){ny=self.page.maxh+math.round((ny-self.page.maxh)/2);}}else{if(ny<0){ny=0;fy=0} if(ny>self.page.maxh){ny=self.page.maxh;fy=0}} if(self.railh&&self.railh.scrollable){var nx=self.rail.drag.sl-mx;if(self.ishwscroll&&self.opt.bouncescroll){if(nx<0){nx=math.round(nx/2);} else if(nx>self.page.maxw){nx=self.page.maxw+math.round((nx-self.page.maxw)/2);}}else{if(nx<0){nx=0;fx=0} if(nx>self.page.maxw){nx=self.page.maxw;fx=0}}} var grabbed=false;if(self.rail.drag.dl){grabbed=true;if(self.rail.drag.dl=="v")nx=self.rail.drag.sl;else if(self.rail.drag.dl=="h")ny=self.rail.drag.st;}else{var ay=math.abs(my);var ax=math.abs(mx);var dz=self.opt.directionlockdeadzone;if(self.rail.drag.ck=="v"){if(ay>dz&&(ax<=(ay*0.3))){self.rail.drag=false;return true;} else if(ax>dz){self.rail.drag.dl="f";$("body").scrolltop($("body").scrolltop());}} else if(self.rail.drag.ck=="h"){if(ax>dz&&(ay<=(ax*0.3))){self.rail.drag=false;return true;} else if(ay>dz){self.rail.drag.dl="f";$("body").scrollleft($("body").scrollleft());}}} self.synched("touchmove",function(){if(self.rail.drag&&(self.rail.drag.pt==2)){if(self.preparetransition)self.preparetransition(0);if(self.rail.scrollable)self.setscrolltop(ny);self.scrollmom.update(fx,fy);if(self.railh&&self.railh.scrollable){self.setscrollleft(nx);self.showcursor(ny,nx);}else{self.showcursor(ny);} if(cap.isie10)document.selection.clear();}});if(cap.ischrome&&self.istouchcapable)grabbed=false;if(grabbed)return self.cancelevent(e);}};} self.onmousedown=function(e,hronly){if(self.rail.drag&&self.rail.drag.pt!=1)return;if(self.locked)return self.cancelevent(e);self.cancelscroll();self.rail.drag={x:e.clientx,y:e.clienty,sx:self.scroll.x,sy:self.scroll.y,pt:1,hr:(!!hronly)};var tg=self.gettarget(e);if(!self.ispage&&cap.hasmousecapture)tg.setcapture();if(self.isiframe&&!cap.hasmousecapture){self.saved["csspointerevents"]=self.doc.css("pointer-events");self.css(self.doc,{"pointer-events":"none"});} return self.cancelevent(e);};self.onmouseup=function(e){if(self.rail.drag){if(cap.hasmousecapture)document.releasecapture();if(self.isiframe&&!cap.hasmousecapture)self.doc.css("pointer-events",self.saved["csspointerevents"]);if(self.rail.drag.pt!=1)return;self.rail.drag=false;return self.cancelevent(e);}};self.onmousemove=function(e){if(self.rail.drag){if(self.rail.drag.pt!=1)return;if(cap.ischrome&&e.which==0)return self.onmouseup(e);self.cursorfreezed=true;if(self.rail.drag.hr){self.scroll.x=self.rail.drag.sx+(e.clientx-self.rail.drag.x);if(self.scroll.x<0)self.scroll.x=0;var mw=self.scrollvaluemaxw;if(self.scroll.x>mw)self.scroll.x=mw;}else{self.scroll.y=self.rail.drag.sy+(e.clienty-self.rail.drag.y);if(self.scroll.y<0)self.scroll.y=0;var my=self.scrollvaluemax;if(self.scroll.y>my)self.scroll.y=my;} self.synched('mousemove',function(){if(self.rail.drag&&(self.rail.drag.pt==1)){self.showcursor();if(self.rail.drag.hr)self.doscrollleft(math.round(self.scroll.x*self.scrollratio.x),self.opt.cursordragspeed);else self.doscrolltop(math.round(self.scroll.y*self.scrollratio.y),self.opt.cursordragspeed);}});return self.cancelevent(e);}};if(cap.cantouch||self.opt.touchbehavior){self.onpreventclick=function(e){if(self.preventclick){self.preventclick.tg.onclick=self.preventclick.click;self.preventclick=false;return self.cancelevent(e);}} self.bind(self.win,"mousedown",self.ontouchstart);self.onclick=(cap.isios)?false:function(e){if(self.lastmouseup){self.lastmouseup=false;return self.cancelevent(e);}else{return true;}};if(self.opt.grabcursorenabled&&cap.cursorgrabvalue){self.css((self.ispage)?self.doc:self.win,{'cursor':cap.cursorgrabvalue});self.css(self.rail,{'cursor':cap.cursorgrabvalue});}}else{function checkselectionscroll(e){if(!self.selectiondrag)return;if(e){var ww=self.win.outerheight();var df=(e.pagey-self.selectiondrag.top);if(df>0&&df=ww)df-=ww;self.selectiondrag.df=df;} if(self.selectiondrag.df==0)return;var rt=-math.floor(self.selectiondrag.df/6)*2;self.doscrollby(rt);self.debounced("doselectionscroll",function(){checkselectionscroll()},50);} if("getselection"in document){self.hastextselected=function(){return(document.getselection().rangecount>0);}} else if("selection"in document){self.hastextselected=function(){return(document.selection.type!="none");}} else{self.hastextselected=function(){return false;}} self.onselectionstart=function(e){if(self.ispage)return;self.selectiondrag=self.win.offset();} self.onselectionend=function(e){self.selectiondrag=false;} self.onselectiondrag=function(e){if(!self.selectiondrag)return;if(self.hastextselected())self.debounced("selectionscroll",function(){checkselectionscroll(e)},250);}} if(cap.hasmstouch){self.css(self.rail,{'-ms-touch-action':'none'});self.css(self.cursor,{'-ms-touch-action':'none'});self.bind(self.win,"mspointerdown",self.ontouchstart);self.bind(document,"mspointerup",self.ontouchend);self.bind(document,"mspointermove",self.ontouchmove);self.bind(self.cursor,"msgesturehold",function(e){e.preventdefault()});self.bind(self.cursor,"contextmenu",function(e){e.preventdefault()});} if(this.istouchcapable){self.bind(self.win,"touchstart",self.ontouchstart);self.bind(document,"touchend",self.ontouchend);self.bind(document,"touchcancel",self.ontouchend);self.bind(document,"touchmove",self.ontouchmove);} self.bind(self.cursor,"mousedown",self.onmousedown);self.bind(self.cursor,"mouseup",self.onmouseup);if(self.railh){self.bind(self.cursorh,"mousedown",function(e){self.onmousedown(e,true)});self.bind(self.cursorh,"mouseup",function(e){if(self.rail.drag&&self.rail.drag.pt==2)return;self.rail.drag=false;self.hasmoving=false;self.hidecursor();if(cap.hasmousecapture)document.releasecapture();return self.cancelevent(e);});} if(self.opt.cursordragontouch||!cap.cantouch&&!self.opt.touchbehavior){self.rail.css({"cursor":"default"});self.railh&&self.railh.css({"cursor":"default"});self.jqbind(self.rail,"mouseenter",function(){if(self.canshowonmouseevent)self.showcursor();self.rail.active=true;});self.jqbind(self.rail,"mouseleave",function(){self.rail.active=false;if(!self.rail.drag)self.hidecursor();});if(self.opt.sensitiverail){self.bind(self.rail,"click",function(e){self.dorailclick(e,false,false)});self.bind(self.rail,"dblclick",function(e){self.dorailclick(e,true,false)});self.bind(self.cursor,"click",function(e){self.cancelevent(e)});self.bind(self.cursor,"dblclick",function(e){self.cancelevent(e)});} if(self.railh){self.jqbind(self.railh,"mouseenter",function(){if(self.canshowonmouseevent)self.showcursor();self.rail.active=true;});self.jqbind(self.railh,"mouseleave",function(){self.rail.active=false;if(!self.rail.drag)self.hidecursor();});if(self.opt.sensitiverail){self.bind(self.railh,"click",function(e){self.dorailclick(e,false,true)});self.bind(self.railh,"dblclick",function(e){self.dorailclick(e,true,true)});self.bind(self.cursorh,"click",function(e){self.cancelevent(e)});self.bind(self.cursorh,"dblclick",function(e){self.cancelevent(e)});}}} if(!cap.cantouch&&!self.opt.touchbehavior){self.bind((cap.hasmousecapture)?self.win:document,"mouseup",self.onmouseup);self.bind(document,"mousemove",self.onmousemove);if(self.onclick)self.bind(document,"click",self.onclick);if(!self.ispage&&self.opt.enablescrollonselection){self.bind(self.win[0],"mousedown",self.onselectionstart);self.bind(document,"mouseup",self.onselectionend);self.bind(self.cursor,"mouseup",self.onselectionend);if(self.cursorh)self.bind(self.cursorh,"mouseup",self.onselectionend);self.bind(document,"mousemove",self.onselectiondrag);} if(self.zoom){self.jqbind(self.zoom,"mouseenter",function(){if(self.canshowonmouseevent)self.showcursor();self.rail.active=true;});self.jqbind(self.zoom,"mouseleave",function(){self.rail.active=false;if(!self.rail.drag)self.hidecursor();});}}else{self.bind((cap.hasmousecapture)?self.win:document,"mouseup",self.ontouchend);self.bind(document,"mousemove",self.ontouchmove);if(self.onclick)self.bind(document,"click",self.onclick);if(self.opt.cursordragontouch){self.bind(self.cursor,"mousedown",self.onmousedown);self.bind(self.cursor,"mousemove",self.onmousemove);self.cursorh&&self.bind(self.cursorh,"mousedown",self.onmousedown);self.cursorh&&self.bind(self.cursorh,"mousemove",self.onmousemove);}} if(self.opt.enablemousewheel){if(!self.isiframe)self.bind((cap.isie&&self.ispage)?document:self.win,"mousewheel",self.onmousewheel);self.bind(self.rail,"mousewheel",self.onmousewheel);if(self.railh)self.bind(self.railh,"mousewheel",self.onmousewheelhr);} if(!self.ispage&&!cap.cantouch&&!(/html|body/.test(self.win[0].nodename))){if(!self.win.attr("tabindex"))self.win.attr({"tabindex":tabindexcounter++});self.jqbind(self.win,"focus",function(e){domfocus=(self.gettarget(e)).id||true;self.hasfocus=true;if(self.canshowonmouseevent)self.noticecursor();});self.jqbind(self.win,"blur",function(e){domfocus=false;self.hasfocus=false;});self.jqbind(self.win,"mouseenter",function(e){mousefocus=(self.gettarget(e)).id||true;self.hasmousefocus=true;if(self.canshowonmouseevent)self.noticecursor();});self.jqbind(self.win,"mouseleave",function(){mousefocus=false;self.hasmousefocus=false;});};} self.onkeypress=function(e){if(self.locked&&self.page.maxh==0)return true;e=(e)?e:window.e;var tg=self.gettarget(e);if(tg&&/input|textarea|select|option/.test(tg.nodename)){var tp=tg.getattribute('type')||tg.type||false;if((!tp)||!(/submit|button|cancel/i.tp))return true;} if(self.hasfocus||(self.hasmousefocus&&!domfocus)||(self.ispage&&!domfocus&&!mousefocus)){var key=e.keycode;if(self.locked&&key!=27)return self.cancelevent(e);var ctrl=e.ctrlkey||false;var shift=e.shiftkey||false;var ret=false;switch(key){case 38:case 63233:self.doscrollby(24*3);ret=true;break;case 40:case 63235:self.doscrollby(-24*3);ret=true;break;case 37:case 63232:if(self.railh){(ctrl)?self.doscrollleft(0):self.doscrollleftby(24*3);ret=true;} break;case 39:case 63234:if(self.railh){(ctrl)?self.doscrollleft(self.page.maxw):self.doscrollleftby(-24*3);ret=true;} break;case 33:case 63276:self.doscrollby(self.view.h);ret=true;break;case 34:case 63277:self.doscrollby(-self.view.h);ret=true;break;case 36:case 63273:(self.railh&&ctrl)?self.doscrollpos(0,0):self.doscrollto(0);ret=true;break;case 35:case 63275:(self.railh&&ctrl)?self.doscrollpos(self.page.maxw,self.page.maxh):self.doscrollto(self.page.maxh);ret=true;break;case 32:if(self.opt.spacebarenabled){(shift)?self.doscrollby(self.view.h):self.doscrollby(-self.view.h);ret=true;} break;case 27:if(self.zoomactive){self.dozoom();ret=true;} break;} if(ret)return self.cancelevent(e);}};if(self.opt.enablekeyboard)self.bind(document,(cap.isopera&&!cap.isopera12)?"keypress":"keydown",self.onkeypress);self.bind(window,'resize',self.lazyresize);self.bind(window,'orientationchange',self.lazyresize);self.bind(window,"load",self.lazyresize);if(cap.ischrome&&!self.ispage&&!self.haswrapper){var tmp=self.win.attr("style");var ww=parsefloat(self.win.css("width"))+1;self.win.css('width',ww);self.synched("chromefix",function(){self.win.attr("style",tmp)});} self.onattributechange=function(e){self.lazyresize(250);} if(!self.ispage&&!self.haswrapper){if(clsmutationobserver!==false){self.observer=new clsmutationobserver(function(mutations){mutations.foreach(self.onattributechange);});self.observer.observe(self.win[0],{childlist:true,characterdata:false,attributes:true,subtree:false});self.observerremover=new clsmutationobserver(function(mutations){mutations.foreach(function(mo){if(mo.removednodes.length>0){for(var dd in mo.removednodes){if(mo.removednodes[dd]==self.win[0])return self.remove();}}});});self.observerremover.observe(self.win[0].parentnode,{childlist:true,characterdata:false,attributes:false,subtree:false});}else{self.bind(self.win,(cap.isie&&!cap.isie9)?"propertychange":"domattrmodified",self.onattributechange);if(cap.isie9)self.win[0].attachevent("onpropertychange",self.onattributechange);self.bind(self.win,"domnoderemoved",function(e){if(e.target==self.win[0])self.remove();});}} if(!self.ispage&&self.opt.boxzoom)self.bind(window,"resize",self.resizezoom);if(self.istextarea)self.bind(self.win,"mouseup",self.lazyresize);self.checkrtlmode=true;self.lazyresize(30);} if(this.doc[0].nodename=='iframe'){function oniframeload(e){self.iframexd=false;try{var doc='contentdocument'in this?this.contentdocument:this.contentwindow.document;var a=doc.domain;}catch(e){self.iframexd=true;doc=false};if(self.iframexd){if("console"in window)console.log('nicescroll error: policy restriced iframe');return true;} self.forcescreen=true;if(self.isiframe){self.iframe={"doc":$(doc),"html":self.doc.contents().find('html')[0],"body":self.doc.contents().find('body')[0]};self.getcontentsize=function(){return{w:math.max(self.iframe.html.scrollwidth,self.iframe.body.scrollwidth),h:math.max(self.iframe.html.scrollheight,self.iframe.body.scrollheight)}} self.docscroll=$(self.iframe.body);} if(!cap.isios&&self.opt.iframeautoresize&&!self.isiframe){self.win.scrolltop(0);self.doc.height("");var hh=math.max(doc.getelementsbytagname('html')[0].scrollheight,doc.body.scrollheight);self.doc.height(hh);} self.lazyresize(30);if(cap.isie7)self.css($(self.iframe.html),{'overflow-y':'hidden'});self.css($(self.iframe.body),{'overflow-y':'hidden'});if(cap.isios&&self.haswrapper){self.css($(doc.body),{'-webkit-transform':'translate3d(0,0,0)'});console.log(1);} if('contentwindow'in this){self.bind(this.contentwindow,"scroll",self.onscroll);}else{self.bind(doc,"scroll",self.onscroll);} if(self.opt.enablemousewheel){self.bind(doc,"mousewheel",self.onmousewheel);} if(self.opt.enablekeyboard)self.bind(doc,(cap.isopera)?"keypress":"keydown",self.onkeypress);if(cap.cantouch||self.opt.touchbehavior){self.bind(doc,"mousedown",self.ontouchstart);self.bind(doc,"mousemove",function(e){self.ontouchmove(e,true)});if(self.opt.grabcursorenabled&&cap.cursorgrabvalue)self.css($(doc.body),{'cursor':cap.cursorgrabvalue});} self.bind(doc,"mouseup",self.ontouchend);if(self.zoom){if(self.opt.dblclickzoom)self.bind(doc,'dblclick',self.dozoom);if(self.ongesturezoom)self.bind(doc,"gestureend",self.ongesturezoom);}};if(this.doc[0].readystate&&this.doc[0].readystate=="complete"){settimeout(function(){oniframeload.call(self.doc[0],false)},500);} self.bind(this.doc,"load",oniframeload);}};this.showcursor=function(py,px){if(self.cursortimeout){cleartimeout(self.cursortimeout);self.cursortimeout=0;} if(!self.rail)return;if(self.autohidedom){self.autohidedom.stop().css({opacity:self.opt.cursoropacitymax});self.cursoractive=true;} if(!self.rail.drag||self.rail.drag.pt!=1){if((typeof py!="undefined")&&(py!==false)){self.scroll.y=math.round(py*1/self.scrollratio.y);} if(typeof px!="undefined"){self.scroll.x=math.round(px*1/self.scrollratio.x);}} self.cursor.css({height:self.cursorheight,top:self.scroll.y});if(self.cursorh){(!self.rail.align&&self.rail.visibility)?self.cursorh.css({width:self.cursorwidth,left:self.scroll.x+self.rail.width}):self.cursorh.css({width:self.cursorwidth,left:self.scroll.x});self.cursoractive=true;} if(self.zoom)self.zoom.stop().css({opacity:self.opt.cursoropacitymax});};this.hidecursor=function(tm){if(self.cursortimeout)return;if(!self.rail)return;if(!self.autohidedom)return;self.cursortimeout=settimeout(function(){if(!self.rail.active||!self.showonmouseevent){self.autohidedom.stop().animate({opacity:self.opt.cursoropacitymin});if(self.zoom)self.zoom.stop().animate({opacity:self.opt.cursoropacitymin});self.cursoractive=false;} self.cursortimeout=0;},tm||self.opt.hidecursordelay);};this.noticecursor=function(tm,py,px){self.showcursor(py,px);if(!self.rail.active)self.hidecursor(tm);};this.getcontentsize=(self.ispage)?function(){return{w:math.max(document.body.scrollwidth,document.documentelement.scrollwidth),h:math.max(document.body.scrollheight,document.documentelement.scrollheight)}}:(self.haswrapper)?function(){return{w:self.doc.outerwidth()+parseint(self.win.css('paddingleft'))+parseint(self.win.css('paddingright')),h:self.doc.outerheight()+parseint(self.win.css('paddingtop'))+parseint(self.win.css('paddingbottom'))}}:function(){return{w:self.docscroll[0].scrollwidth,h:self.docscroll[0].scrollheight}};this.onresize=function(e,page){if(!self.win)return false;if(!self.haswrapper&&!self.ispage){if(self.win.css('display')=='none'){if(self.visibility)self.hiderail().hiderailhr();return false;}else{if(!self.hidden&&!self.visibility)self.showrail().showrailhr();}} var premaxh=self.page.maxh;var premaxw=self.page.maxw;var preview={h:self.view.h,w:self.view.w};self.view={w:(self.ispage)?self.win.width():parseint(self.win[0].clientwidth),h:(self.ispage)?self.win.height():parseint(self.win[0].clientheight)};self.page=(page)?page:self.getcontentsize();self.page.maxh=math.max(0,self.page.h-self.view.h);self.page.maxw=math.max(0,self.page.w-self.view.w);if((self.page.maxh==premaxh)&&(self.page.maxw==premaxw)&&(self.view.w==preview.w)){if(!self.ispage){var pos=self.win.offset();if(self.lastposition){var lst=self.lastposition;if((lst.top==pos.top)&&(lst.left==pos.left))return self;} self.lastposition=pos;}else{return self;}} if(self.page.maxh==0){self.hiderail();self.scrollvaluemax=0;self.scroll.y=0;self.scrollratio.y=0;self.cursorheight=0;self.setscrolltop(0);self.rail.scrollable=false;}else{self.rail.scrollable=true;} if(self.page.maxw==0){self.hiderailhr();self.scrollvaluemaxw=0;self.scroll.x=0;self.scrollratio.x=0;self.cursorwidth=0;self.setscrollleft(0);self.railh.scrollable=false;}else{self.railh.scrollable=true;} self.locked=(self.page.maxh==0)&&(self.page.maxw==0);if(self.locked){if(!self.ispage)self.updatescrollbar(self.view);return false;} if(!self.hidden&&!self.visibility){self.showrail().showrailhr();} else if(!self.hidden&&!self.railh.visibility)self.showrailhr();if(self.istextarea&&self.win.css('resize')&&self.win.css('resize')!='none')self.view.h-=20;self.cursorheight=math.min(self.view.h,math.round(self.view.h*(self.view.h/self.page.h)));self.cursorheight=(self.opt.cursorfixedheight)?self.opt.cursorfixedheight:math.max(self.opt.cursorminheight,self.cursorheight);self.cursorwidth=math.min(self.view.w,math.round(self.view.w*(self.view.w/self.page.w)));self.cursorwidth=(self.opt.cursorfixedheight)?self.opt.cursorfixedheight:math.max(self.opt.cursorminheight,self.cursorwidth);self.scrollvaluemax=self.view.h-self.cursorheight-self.cursor.hborder;if(self.railh){self.railh.width=(self.page.maxh>0)?(self.view.w-self.rail.width):self.view.w;self.scrollvaluemaxw=self.railh.width-self.cursorwidth-self.cursorh.wborder;} if(self.checkrtlmode&&self.railh){self.checkrtlmode=false;if(self.opt.rtlmode&&self.scroll.x==0)self.setscrollleft(self.page.maxw);} if(!self.ispage)self.updatescrollbar(self.view);self.scrollratio={x:(self.page.maxw/self.scrollvaluemaxw),y:(self.page.maxh/self.scrollvaluemax)};var sy=self.getscrolltop();if(sy>self.page.maxh){self.doscrolltop(self.page.maxh);}else{self.scroll.y=math.round(self.getscrolltop()*(1/self.scrollratio.y));self.scroll.x=math.round(self.getscrollleft()*(1/self.scrollratio.x));if(self.cursoractive)self.noticecursor();} if(self.scroll.y&&(self.getscrolltop()==0))self.doscrollto(math.floor(self.scroll.y*self.scrollratio.y));return self;};this.resize=self.onresize;this.lazyresize=function(tm){tm=(isnan(tm))?30:tm;self.delayed('resize',self.resize,tm);return self;} function _modernwheelevent(dom,name,fn,bubble){self._bind(dom,name,function(e){var e=(e)?e:window.event;var event={original:e,target:e.target||e.srcelement,type:"wheel",deltamode:e.type=="mozmousepixelscroll"?0:1,deltax:0,deltaz:0,preventdefault:function(){e.preventdefault?e.preventdefault():e.returnvalue=false;return false;},stopimmediatepropagation:function(){(e.stopimmediatepropagation)?e.stopimmediatepropagation():e.cancelbubble=true;}};if(name=="mousewheel"){event.deltay=-1/40*e.wheeldelta;e.wheeldeltax&&(event.deltax=-1/40*e.wheeldeltax);}else{event.deltay=e.detail;} return fn.call(dom,event);},bubble);};this._bind=function(el,name,fn,bubble){self.events.push({e:el,n:name,f:fn,b:bubble,q:false});if(el.addeventlistener){el.addeventlistener(name,fn,bubble||false);} else if(el.attachevent){el.attachevent("on"+name,fn);} else{el["on"+name]=fn;}};this.jqbind=function(dom,name,fn){self.events.push({e:dom,n:name,f:fn,q:true});$(dom).bind(name,fn);} this.bind=function(dom,name,fn,bubble){var el=("jquery"in dom)?dom[0]:dom;if(name=='mousewheel'){if("onwheel"in self.win){self._bind(el,"wheel",fn,bubble||false);}else{var wname=(typeof document.onmousewheel!="undefined")?"mousewheel":"dommousescroll";_modernwheelevent(el,wname,fn,bubble||false);if(wname=="dommousescroll")_modernwheelevent(el,"mozmousepixelscroll",fn,bubble||false);}} else if(el.addeventlistener){if(cap.cantouch&&/mouseup|mousedown|mousemove/.test(name)){var tt=(name=='mousedown')?'touchstart':(name=='mouseup')?'touchend':'touchmove';self._bind(el,tt,function(e){if(e.touches){if(e.touches.length<2){var ev=(e.touches.length)?e.touches[0]:e;ev.original=e;fn.call(this,ev);}} else if(e.changedtouches){var ev=e.changedtouches[0];ev.original=e;fn.call(this,ev);}},bubble||false);} self._bind(el,name,fn,bubble||false);if(cap.cantouch&&name=="mouseup")self._bind(el,"touchcancel",fn,bubble||false);} else{self._bind(el,name,function(e){e=e||window.event||false;if(e){if(e.srcelement)e.target=e.srcelement;} if(!("pagey"in e)){e.pagex=e.clientx+document.documentelement.scrollleft;e.pagey=e.clienty+document.documentelement.scrolltop;} return((fn.call(el,e)===false)||bubble===false)?self.cancelevent(e):true;});}};this._unbind=function(el,name,fn,bub){if(el.removeeventlistener){el.removeeventlistener(name,fn,bub);} else if(el.detachevent){el.detachevent('on'+name,fn);}else{el['on'+name]=false;}};this.unbindall=function(){for(var a=0;a0)return dd;dom=(dom.parentnode)?dom.parentnode:false;} return false;};function execscrollwheel(e,hr,chkscroll){var px,py;var rt=1;if(e.deltamode==0){px=-math.floor(e.deltax*(self.opt.mousescrollstep/(18*3)));py=-math.floor(e.deltay*(self.opt.mousescrollstep/(18*3)));} else if(e.deltamode==1){px=-math.floor(e.deltax*self.opt.mousescrollstep);py=-math.floor(e.deltay*self.opt.mousescrollstep);} if(hr&&self.opt.oneaxismousemode&&(px==0)&&py){px=py;py=0;} if(px){if(self.scrollmom){self.scrollmom.stop()} self.lastdeltax+=px;self.debounced("mousewheelx",function(){var dt=self.lastdeltax;self.lastdeltax=0;if(!self.rail.drag){self.doscrollleftby(dt)}},120);} if(py){if(self.opt.nativeparentscrolling&&chkscroll&&!self.ispage&&!self.zoomactive){if(py<0){if(self.getscrolltop()>=self.page.maxh)return true;}else{if(self.getscrolltop()<=0)return true;}} if(self.scrollmom){self.scrollmom.stop()} self.lastdeltay+=py;self.debounced("mousewheely",function(){var dt=self.lastdeltay;self.lastdeltay=0;if(!self.rail.drag){self.doscrollby(dt)}},120);} e.stopimmediatepropagation();return e.preventdefault();};this.onmousewheel=function(e){if(self.locked){self.debounced("checkunlock",self.resize,250);return true;} if(self.rail.drag)return self.cancelevent(e);if(self.opt.oneaxismousemode=="auto"&&e.deltax!=0)self.opt.oneaxismousemode=false;if(self.opt.oneaxismousemode&&e.deltax==0){if(!self.rail.scrollable){if(self.railh&&self.railh.scrollable){return self.onmousewheelhr(e);}else{return true;}}} var nw=+(new date());var chk=false;if(self.opt.preservenativescrolling&&((self.checkarea+600)20)?ex:0;} if(!self.opt.smoothscroll){this.doscrollleft=function(x,spd){var y=self.getscrolltop();self.doscrollpos(x,y,spd);} this.doscrolltop=function(y,spd){var x=self.getscrollleft();self.doscrollpos(x,y,spd);} this.doscrollpos=function(x,y,spd){var nx=(x>self.page.maxw)?self.page.maxw:x;if(nx<0)nx=0;var ny=(y>self.page.maxh)?self.page.maxh:y;if(ny<0)ny=0;self.synched('scroll',function(){self.setscrolltop(ny);self.setscrollleft(nx);});} this.cancelscroll=function(){};} else if(self.ishwscroll&&cap.hastransition&&self.opt.usetransition){this.preparetransition=function(dif,istime){var ex=(istime)?((dif>20)?dif:0):self.gettransitionspeed(dif);var trans=(ex)?cap.prefixstyle+'transform '+ex+'ms ease-out':'';if(!self.lasttransitionstyle||self.lasttransitionstyle!=trans){self.lasttransitionstyle=trans;self.doc.css(cap.transitionstyle,trans);} return ex;};this.doscrollleft=function(x,spd){var y=(self.scrollrunning)?self.newscrolly:self.getscrolltop();self.doscrollpos(x,y,spd);} this.doscrolltop=function(y,spd){var x=(self.scrollrunning)?self.newscrollx:self.getscrollleft();self.doscrollpos(x,y,spd);} this.doscrollpos=function(x,y,spd){var py=self.getscrolltop();var px=self.getscrollleft();if(((self.newscrolly-py)*(y-py)<0)||((self.newscrollx-px)*(x-px)<0))self.cancelscroll();if(self.opt.bouncescroll==false){if(y<0)y=0;else if(y>self.page.maxh)y=self.page.maxh;if(x<0)x=0;else if(x>self.page.maxw)x=self.page.maxw;} if(self.scrollrunning&&x==self.newscrollx&&y==self.newscrolly)return false;self.newscrolly=y;self.newscrollx=x;self.newscrollspeed=spd||false;if(self.timer)return false;self.timer=settimeout(function(){var top=self.getscrolltop();var lft=self.getscrollleft();var dst={};dst.x=x-lft;dst.y=y-top;dst.px=lft;dst.py=top;var dd=math.round(math.sqrt(math.pow(dst.x,2)+math.pow(dst.y,2)));var ms=(self.newscrollspeed&&self.newscrollspeed>1)?self.newscrollspeed:self.gettransitionspeed(dd);if(self.newscrollspeed&&self.newscrollspeed<=1)ms*=self.newscrollspeed;self.preparetransition(ms,true);if(self.timerscroll&&self.timerscroll.tm)clearinterval(self.timerscroll.tm);if(ms>0){if(!self.scrollrunning&&self.onscrollstart){var info={"type":"scrollstart","current":{"x":lft,"y":top},"request":{"x":x,"y":y},"end":{"x":self.newscrollx,"y":self.newscrolly},"speed":ms};self.onscrollstart.call(self,info);} if(cap.transitionend){if(!self.scrollendtrapped){self.scrollendtrapped=true;self.bind(self.doc,cap.transitionend,self.onscrollend,false);}}else{if(self.scrollendtrapped)cleartimeout(self.scrollendtrapped);self.scrollendtrapped=settimeout(self.onscrollend,ms);} var py=top;var px=lft;self.timerscroll={bz:new bezierclass(py,self.newscrolly,ms,0,0,0.58,1),bh:new bezierclass(px,self.newscrollx,ms,0,0,0.58,1)};if(!self.cursorfreezed)self.timerscroll.tm=setinterval(function(){self.showcursor(self.getscrolltop(),self.getscrollleft())},60);} self.synched("doscroll-set",function(){self.timer=0;if(self.scrollendtrapped)self.scrollrunning=true;self.setscrolltop(self.newscrolly);self.setscrollleft(self.newscrollx);if(!self.scrollendtrapped)self.onscrollend();});},50);};this.cancelscroll=function(){if(!self.scrollendtrapped)return true;var py=self.getscrolltop();var px=self.getscrollleft();self.scrollrunning=false;if(!cap.transitionend)cleartimeout(cap.transitionend);self.scrollendtrapped=false;self._unbind(self.doc,cap.transitionend,self.onscrollend);self.preparetransition(0);self.setscrolltop(py);if(self.railh)self.setscrollleft(px);if(self.timerscroll&&self.timerscroll.tm)clearinterval(self.timerscroll.tm);self.timerscroll=false;self.cursorfreezed=false;self.showcursor(py,px);return self;};this.onscrollend=function(){if(self.scrollendtrapped)self._unbind(self.doc,cap.transitionend,self.onscrollend);self.scrollendtrapped=false;self.preparetransition(0);if(self.timerscroll&&self.timerscroll.tm)clearinterval(self.timerscroll.tm);self.timerscroll=false;var py=self.getscrolltop();var px=self.getscrollleft();self.setscrolltop(py);if(self.railh)self.setscrollleft(px);self.noticecursor(false,py,px);self.cursorfreezed=false;if(py<0)py=0 else if(py>self.page.maxh)py=self.page.maxh;if(px<0)px=0 else if(px>self.page.maxw)px=self.page.maxw;if((py!=self.newscrolly)||(px!=self.newscrollx))return self.doscrollpos(px,py,self.opt.snapbackspeed);if(self.onscrollend&&self.scrollrunning){var info={"type":"scrollend","current":{"x":px,"y":py},"end":{"x":self.newscrollx,"y":self.newscrolly}};self.onscrollend.call(self,info);} self.scrollrunning=false;};}else{this.doscrollleft=function(x,spd){var y=(self.scrollrunning)?self.newscrolly:self.getscrolltop();self.doscrollpos(x,y,spd);} this.doscrolltop=function(y,spd){var x=(self.scrollrunning)?self.newscrollx:self.getscrollleft();self.doscrollpos(x,y,spd);} this.doscrollpos=function(x,y,spd){var y=((typeof y=="undefined")||(y===false))?self.getscrolltop(true):y;if((self.timer)&&(self.newscrolly==y)&&(self.newscrollx==x))return true;if(self.timer)clearanimationframe(self.timer);self.timer=0;var py=self.getscrolltop();var px=self.getscrollleft();if(((self.newscrolly-py)*(y-py)<0)||((self.newscrollx-px)*(x-px)<0))self.cancelscroll();self.newscrolly=y;self.newscrollx=x;if(!self.bouncescroll||!self.rail.visibility){if(self.newscrolly<0){self.newscrolly=0;} else if(self.newscrolly>self.page.maxh){self.newscrolly=self.page.maxh;}} if(!self.bouncescroll||!self.railh.visibility){if(self.newscrollx<0){self.newscrollx=0;} else if(self.newscrollx>self.page.maxw){self.newscrollx=self.page.maxw;}} self.dst={};self.dst.x=x-px;self.dst.y=y-py;self.dst.px=px;self.dst.py=py;var dst=math.round(math.sqrt(math.pow(self.dst.x,2)+math.pow(self.dst.y,2)));self.dst.ax=self.dst.x/dst;self.dst.ay=self.dst.y/dst;var pa=0;var pe=dst;if(self.dst.x==0){pa=py;pe=y;self.dst.ay=1;self.dst.py=0;}else if(self.dst.y==0){pa=px;pe=x;self.dst.ax=1;self.dst.px=0;} var ms=self.gettransitionspeed(dst);if(spd&&spd<=1)ms*=spd;if(ms>0){self.bzscroll=(self.bzscroll)?self.bzscroll.update(pe,ms):new bezierclass(pa,pe,ms,0,1,0,1);}else{self.bzscroll=false;} if(self.timer)return;if((py==self.page.maxh&&y>=self.page.maxh)||(px==self.page.maxw&&x>=self.page.maxw))self.checkcontentsize();var sync=1;function scrolling(){if(self.cancelanimationframe)return true;self.scrollrunning=true;sync=1-sync;if(sync)return(self.timer=setanimationframe(scrolling)||1);var done=0;var sc=sy=self.getscrolltop();if(self.dst.ay){sc=(self.bzscroll)?self.dst.py+(self.bzscroll.getnow()*self.dst.ay):self.newscrolly;var dr=sc-sy;if((dr<0&&sc0&&sc>self.newscrolly))sc=self.newscrolly;self.setscrolltop(sc);if(sc==self.newscrolly)done=1;}else{done=1;} var scx=sx=self.getscrollleft();if(self.dst.ax){scx=(self.bzscroll)?self.dst.px+(self.bzscroll.getnow()*self.dst.ax):self.newscrollx;var dr=scx-sx;if((dr<0&&scx0&&scx>self.newscrollx))scx=self.newscrollx;self.setscrollleft(scx);if(scx==self.newscrollx)done+=1;}else{done+=1;} if(done==2){self.timer=0;self.cursorfreezed=false;self.bzscroll=false;self.scrollrunning=false;if(sc<0)sc=0;else if(sc>self.page.maxh)sc=self.page.maxh;if(scx<0)scx=0;else if(scx>self.page.maxw)scx=self.page.maxw;if((scx!=self.newscrollx)||(sc!=self.newscrolly))self.doscrollpos(scx,sc);else{if(self.onscrollend){var info={"type":"scrollend","current":{"x":sx,"y":sy},"end":{"x":self.newscrollx,"y":self.newscrolly}};self.onscrollend.call(self,info);}}}else{self.timer=setanimationframe(scrolling)||1;}};self.cancelanimationframe=false;self.timer=1;if(self.onscrollstart&&!self.scrollrunning){var info={"type":"scrollstart","current":{"x":px,"y":py},"request":{"x":x,"y":y},"end":{"x":self.newscrollx,"y":self.newscrolly},"speed":ms};self.onscrollstart.call(self,info);} scrolling();if((py==self.page.maxh&&y>=py)||(px==self.page.maxw&&x>=px))self.checkcontentsize();self.noticecursor();};this.cancelscroll=function(){if(self.timer)clearanimationframe(self.timer);self.timer=0;self.bzscroll=false;self.scrollrunning=false;return self;};} this.doscrollby=function(stp,relative){var ny=0;if(relative){ny=math.floor((self.scroll.y-stp)*self.scrollratio.y)}else{var sy=(self.timer)?self.newscrolly:self.getscrolltop(true);ny=sy-stp;} if(self.bouncescroll){var haf=math.round(self.view.h/2);if(ny<-haf)ny=-haf else if(ny>(self.page.maxh+haf))ny=(self.page.maxh+haf);} self.cursorfreezed=false;py=self.getscrolltop(true);if(ny<0&&py<=0)return self.noticecursor();else if(ny>self.page.maxh&&py>=self.page.maxh){self.checkcontentsize();return self.noticecursor();} self.doscrolltop(ny);};this.doscrollleftby=function(stp,relative){var nx=0;if(relative){nx=math.floor((self.scroll.x-stp)*self.scrollratio.x)}else{var sx=(self.timer)?self.newscrollx:self.getscrollleft(true);nx=sx-stp;} if(self.bouncescroll){var haf=math.round(self.view.w/2);if(nx<-haf)nx=-haf else if(nx>(self.page.maxw+haf))nx=(self.page.maxw+haf);} self.cursorfreezed=false;px=self.getscrollleft(true);if(nx<0&&px<=0)return self.noticecursor();else if(nx>self.page.maxw&&px>=self.page.maxw)return self.noticecursor();self.doscrollleft(nx);};this.doscrollto=function(pos,relative){var ny=(relative)?math.round(pos*self.scrollratio.y):pos;if(ny<0)ny=0 else if(ny>self.page.maxh)ny=self.page.maxh;self.cursorfreezed=false;self.doscrolltop(pos);};this.checkcontentsize=function(){var pg=self.getcontentsize();if((pg.h!=self.page.h)||(pg.w!=self.page.w))self.resize(false,pg);};self.onscroll=function(e){if(self.rail.drag)return;if(!self.cursorfreezed){self.synched('scroll',function(){self.scroll.y=math.round(self.getscrolltop()*(1/self.scrollratio.y));if(self.railh)self.scroll.x=math.round(self.getscrollleft()*(1/self.scrollratio.x));self.noticecursor();});}};self.bind(self.docscroll,"scroll",self.onscroll);this.dozoomin=function(e){if(self.zoomactive)return;self.zoomactive=true;self.zoomrestore={style:{}};var lst=['position','top','left','zindex','backgroundcolor','margintop','marginbottom','marginleft','marginright'];var win=self.win[0].style;for(var a in lst){var pp=lst[a];self.zoomrestore.style[pp]=(typeof win[pp]!="undefined")?win[pp]:'';} self.zoomrestore.style.width=self.win.css('width');self.zoomrestore.style.height=self.win.css('height');self.zoomrestore.padding={w:self.win.outerwidth()-self.win.width(),h:self.win.outerheight()-self.win.height()};if(cap.isios4){self.zoomrestore.scrolltop=$(window).scrolltop();$(window).scrolltop(0);} self.win.css({"position":(cap.isios4)?"absolute":"fixed","top":0,"left":0,"z-index":globalmaxzindex+100,"margin":"0px"});var bkg=self.win.css("backgroundcolor");if(bkg==""||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(bkg))self.win.css("backgroundcolor","#fff");self.rail.css({"z-index":globalmaxzindex+101});self.zoom.css({"z-index":globalmaxzindex+102});self.zoom.css('backgroundposition','0px -18px');self.resizezoom();if(self.onzoomin)self.onzoomin.call(self);return self.cancelevent(e);};this.dozoomout=function(e){if(!self.zoomactive)return;self.zoomactive=false;self.win.css("margin","");self.win.css(self.zoomrestore.style);if(cap.isios4){$(window).scrolltop(self.zoomrestore.scrolltop);} self.rail.css({"z-index":self.zindex});self.zoom.css({"z-index":self.zindex});self.zoomrestore=false;self.zoom.css('backgroundposition','0px 0px');self.onresize();if(self.onzoomout)self.onzoomout.call(self);return self.cancelevent(e);};this.dozoom=function(e){return(self.zoomactive)?self.dozoomout(e):self.dozoomin(e);};this.resizezoom=function(){if(!self.zoomactive)return;var py=self.getscrolltop();self.win.css({width:$(window).width()-self.zoomrestore.padding.w+"px",height:$(window).height()-self.zoomrestore.padding.h+"px"});self.onresize();self.setscrolltop(math.min(self.page.maxh,py));};this.init();$.nicescroll.push(this);};var scrollmomentumclass2d=function(nc){var self=this;this.nc=nc;this.lastx=0;this.lasty=0;this.speedx=0;this.speedy=0;this.lasttime=0;this.steptime=0;this.snapx=false;this.snapy=false;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(px,py){self.stop();var now=self.time();self.steptime=0;self.lasttime=now;self.speedx=0;self.speedy=0;self.lastx=px;self.lasty=py;self.lastscrollx=-1;self.lastscrolly=-1;};this.update=function(px,py){var now=self.time();self.steptime=now-self.lasttime;self.lasttime=now;var dy=py-self.lasty;var dx=px-self.lastx;var sy=self.nc.getscrolltop();var sx=self.nc.getscrollleft();var newy=sy+dy;var newx=sx+dx;self.snapx=(newx<0)||(newx>self.nc.page.maxw);self.snapy=(newy<0)||(newy>self.nc.page.maxh);self.speedx=dx;self.speedy=dy;self.lastx=px;self.lasty=py;};this.stop=function(){self.nc.unsynched("domomentum2d");if(self.timer)cleartimeout(self.timer);self.timer=0;self.lastscrollx=-1;self.lastscrolly=-1;};this.dosnapy=function(nx,ny){var snap=false;if(ny<0){ny=0;snap=true;} else if(ny>self.nc.page.maxh){ny=self.nc.page.maxh;snap=true;} if(nx<0){nx=0;snap=true;} else if(nx>self.nc.page.maxw){nx=self.nc.page.maxw;snap=true;} if(snap)self.nc.doscrollpos(nx,ny,self.nc.opt.snapbackspeed);};this.domomentum=function(gp){var t=self.time();var l=(gp)?t+gp:self.lasttime;var sl=self.nc.getscrollleft();var st=self.nc.getscrolltop();var pageh=self.nc.page.maxh;var pagew=self.nc.page.maxw;self.speedx=(pagew>0)?math.min(60,self.speedx):0;self.speedy=(pageh>0)?math.min(60,self.speedy):0;var chk=l&&(t-l)<=60;if((st<0)||(st>pageh)||(sl<0)||(sl>pagew))chk=false;var sy=(self.speedy&&chk)?self.speedy:false;var sx=(self.speedx&&chk)?self.speedx:false;if(sy||sx){var tm=math.max(16,self.steptime);if(tm>50){var xm=tm/50;self.speedx*=xm;self.speedy*=xm;tm=50;} self.demulxy=0;self.lastscrollx=self.nc.getscrollleft();self.chkx=self.lastscrollx;self.lastscrolly=self.nc.getscrolltop();self.chky=self.lastscrolly;var nx=self.lastscrollx;var ny=self.lastscrolly;var onscroll=function(){var df=((self.time()-t)>600)?0.04:0.02;if(self.speedx){nx=math.floor(self.lastscrollx-(self.speedx*(1-self.demulxy)));self.lastscrollx=nx;if((nx<0)||(nx>pagew))df=0.10;} if(self.speedy){ny=math.floor(self.lastscrolly-(self.speedy*(1-self.demulxy)));self.lastscrolly=ny;if((ny<0)||(ny>pageh))df=0.10;} self.demulxy=math.min(1,self.demulxy+df);self.nc.synched("domomentum2d",function(){if(self.speedx){var scx=self.nc.getscrollleft();if(scx!=self.chkx)self.stop();self.chkx=nx;self.nc.setscrollleft(nx);} if(self.speedy){var scy=self.nc.getscrolltop();if(scy!=self.chky)self.stop();self.chky=ny;self.nc.setscrolltop(ny);} if(!self.timer){self.nc.hidecursor();self.dosnapy(nx,ny);}});if(self.demulxy<1){self.timer=settimeout(onscroll,tm);}else{self.stop();self.nc.hidecursor();self.dosnapy(nx,ny);}};onscroll();}else{self.dosnapy(self.nc.getscrollleft(),self.nc.getscrolltop());}}};var _scrolltop=jquery.fn.scrolltop;jquery.csshooks["pageyoffset"]={get:function(elem,computed,extra){var nice=$.data(elem,'__nicescroll')||false;return(nice&&nice.ishwscroll)?nice.getscrolltop():_scrolltop.call(elem);},set:function(elem,value){var nice=$.data(elem,'__nicescroll')||false;(nice&&nice.ishwscroll)?nice.setscrolltop(parseint(value)):_scrolltop.call(elem,value);return this;}};jquery.fn.scrolltop=function(value){if(typeof value=="undefined"){var nice=(this[0])?$.data(this[0],'__nicescroll')||false:false;return(nice&&nice.ishwscroll)?nice.getscrolltop():_scrolltop.call(this);}else{return this.each(function(){var nice=$.data(this,'__nicescroll')||false;(nice&&nice.ishwscroll)?nice.setscrolltop(parseint(value)):_scrolltop.call($(this),value);});}} var _scrollleft=jquery.fn.scrollleft;$.csshooks.pagexoffset={get:function(elem,computed,extra){var nice=$.data(elem,'__nicescroll')||false;return(nice&&nice.ishwscroll)?nice.getscrollleft():_scrollleft.call(elem);},set:function(elem,value){var nice=$.data(elem,'__nicescroll')||false;(nice&&nice.ishwscroll)?nice.setscrollleft(parseint(value)):_scrollleft.call(elem,value);return this;}};jquery.fn.scrollleft=function(value){if(typeof value=="undefined"){var nice=(this[0])?$.data(this[0],'__nicescroll')||false:false;return(nice&&nice.ishwscroll)?nice.getscrollleft():_scrollleft.call(this);}else{return this.each(function(){var nice=$.data(this,'__nicescroll')||false;(nice&&nice.ishwscroll)?nice.setscrollleft(parseint(value)):_scrollleft.call($(this),value);});}} var nicescrollarray=function(doms){var self=this;this.length=0;this.name="nicescrollarray";this.each=function(fn){for(var a=0,i=0;a