/*!
 * iScroll v4.1.5 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
 * Released under MIT license, http://cubiq.org/license
 */
(function(){var f=Math,e=/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":"opera"in window?"O":"",r="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,k="ontouchstart"in window,t=e+"Transform"in document.documentElement.style,u=/android/gi.test(navigator.appVersion),s=/iphone|ipad/gi.test(navigator.appVersion),q=/playbook/gi.test(navigator.appVersion),x=s||q,y=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||
window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return setTimeout(a,17)}}(),v=window.cancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout,o="translate"+(r?"3d(":"("),p=r?",0)":")",q=function(a,b){var c=this,h;c.wrapper=typeof a=="object"?a:document.getElementById(a);c.wrapper.style.overflow="hidden";c.scroller=c.wrapper.children[0];
c.options={hScroll:!0,vScroll:!0,bounce:!0,bounceLock:!1,momentum:!0,lockDirection:!0,useTransform:!0,useTransition:!1,checkDOMChanges:!1,hScrollbar:!0,vScrollbar:!0,fixedScrollbar:u,hideScrollbar:s,fadeScrollbar:s&&r,scrollbarClass:"",zoom:!1,zoomMin:1,zoomMax:4,doubleTapZoom:2,snap:!1,snapThreshold:1,onRefresh:null,onBeforeScrollStart:function(a){a.preventDefault()},onScrollStart:null,onBeforeScrollMove:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:null,onTouchEnd:null,onDestroy:null,
onZoomStart:null,onZoom:null,onZoomEnd:null};for(h in b)c.options[h]=b[h];c.options.useTransform=t?c.options.useTransform:!1;c.options.hScrollbar=c.options.hScroll&&c.options.hScrollbar;c.options.vScrollbar=c.options.vScroll&&c.options.vScrollbar;c.options.zoom=c.options.useTransform&&c.options.zoom;c.options.useTransition=x&&c.options.useTransition;c.scroller.style[e+"TransitionProperty"]=c.options.useTransform?"-"+e.toLowerCase()+"-transform":"top left";c.scroller.style[e+"TransitionDuration"]=
"0";c.scroller.style[e+"TransformOrigin"]="0 0";c.options.useTransition&&(c.scroller.style[e+"TransitionTimingFunction"]="cubic-bezier(0.33,0.66,0.66,1)");c.options.useTransform?c.scroller.style[e+"Transform"]=o+"0,0"+p:c.scroller.style.cssText+=";position:absolute;top:0;left:0";if(c.options.useTransition)c.options.fixedScrollbar=!0;c.refresh();c._bind("orientationchange",window);c._bind("touchstart");k||(c._bind("mouseout",c.wrapper),c._bind("mousewheel"));if(c.options.checkDOMChanges)c.checkDOMTime=
setInterval(function(){c._checkDOMChanges()},500)};q.prototype={enabled:!0,x:0,y:0,steps:[],scale:1,currPageX:0,currPageY:0,pagesX:[],pagesY:[],aniTime:null,handleEvent:function(a){var b=a.getType?a.getType():a.type;a.getNativeEvent&&(a=a.getNativeEvent());switch(b){case "touchstart":this._start(a);break;case "touchmove":this._move(a);break;case "touchend":case "touchcancel":this._end(a);break;case "orientationchange":this._resize();break;case "mousewheel":this._wheel(a);break;case "mouseout":this._mouseout(a);
break;case "webkitTransitionEnd":this._transitionEnd(a)}},_checkDOMChanges:function(){!this.moved&&!this.zoomed&&!(this.animating||this.scrollerW==this.scroller.offsetWidth*this.scale&&this.scrollerH==this.scroller.offsetHeight*this.scale)&&this.refresh()},_scrollbar:function(a){var b=document,c;if(this[a+"Scrollbar"]){if(!this[a+"ScrollbarWrapper"]){c=b.createElement("div");this.options.scrollbarClass?c.className=this.options.scrollbarClass+a.toUpperCase():c.style.cssText="position:absolute;z-index:100;"+
(a=="h"?"height:7px;bottom:1px;left:2px;right:"+(this.vScrollbar?"7":"2")+"px":"width:7px;bottom:"+(this.hScrollbar?"7":"2")+"px;top:2px;right:1px");c.style.cssText+=";pointer-events:none;-"+e+"-transition-property:opacity;-"+e+"-transition-duration:"+(this.options.fadeScrollbar?"350ms":"0")+";overflow:hidden;opacity:"+(this.options.hideScrollbar?"0":"1");this.wrapper.appendChild(c);this[a+"ScrollbarWrapper"]=c;c=b.createElement("div");if(!this.options.scrollbarClass)c.style.cssText="position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);-"+
e+"-background-clip:padding-box;-"+e+"-box-sizing:border-box;"+(a=="h"?"height:100%":"width:100%")+";-"+e+"-border-radius:3px;border-radius:3px";c.style.cssText+=";pointer-events:none;-"+e+"-transition-property:-"+e+"-transform;-"+e+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);-"+e+"-transition-duration:0;-"+e+"-transform:"+o+"0,0"+p;this.options.useTransition&&(c.style.cssText+=";-"+e+"-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)");this[a+"ScrollbarWrapper"].appendChild(c);
this[a+"ScrollbarIndicator"]=c}a=="h"?(this.hScrollbarSize=this.hScrollbarWrapper.clientWidth,this.hScrollbarIndicatorSize=f.max(f.round(this.hScrollbarSize*this.hScrollbarSize/this.scrollerW),8),this.hScrollbarIndicator.style.width=this.hScrollbarIndicatorSize+"px",this.hScrollbarMaxScroll=this.hScrollbarSize-this.hScrollbarIndicatorSize,this.hScrollbarProp=this.hScrollbarMaxScroll/this.maxScrollX):(this.vScrollbarSize=this.vScrollbarWrapper.clientHeight,this.vScrollbarIndicatorSize=f.max(f.round(this.vScrollbarSize*
this.vScrollbarSize/this.scrollerH),8),this.vScrollbarIndicator.style.height=this.vScrollbarIndicatorSize+"px",this.vScrollbarMaxScroll=this.vScrollbarSize-this.vScrollbarIndicatorSize,this.vScrollbarProp=this.vScrollbarMaxScroll/this.maxScrollY);this._scrollbarPos(a,!0)}else this[a+"ScrollbarWrapper"]&&(t&&(this[a+"ScrollbarIndicator"].style[e+"Transform"]=""),this[a+"ScrollbarWrapper"].parentNode.removeChild(this[a+"ScrollbarWrapper"]),this[a+"ScrollbarWrapper"]=null,this[a+"ScrollbarIndicator"]=
null)},_resize:function(){var a=this;setTimeout(function(){a.refresh()},u?200:0)},_pos:function(a,b){a=this.hScroll?a:0;b=this.vScroll?b:0;this.options.useTransform?this.scroller.style[e+"Transform"]=o+a+"px,"+b+"px"+p+" scale("+this.scale+")":(a=f.round(a),b=f.round(b),this.scroller.style.left=a+"px",this.scroller.style.top=b+"px");this.x=a;this.y=b;this._scrollbarPos("h");this._scrollbarPos("v")},_scrollbarPos:function(a,b){var c=a=="h"?this.x:this.y;if(this[a+"Scrollbar"])c*=this[a+"ScrollbarProp"],
c<0?(this.options.fixedScrollbar||(c=this[a+"ScrollbarIndicatorSize"]+f.round(c*3),c<8&&(c=8),this[a+"ScrollbarIndicator"].style[a=="h"?"width":"height"]=c+"px"),c=0):c>this[a+"ScrollbarMaxScroll"]&&(this.options.fixedScrollbar?c=this[a+"ScrollbarMaxScroll"]:(c=this[a+"ScrollbarIndicatorSize"]-f.round((c-this[a+"ScrollbarMaxScroll"])*3),c<8&&(c=8),this[a+"ScrollbarIndicator"].style[a=="h"?"width":"height"]=c+"px",c=this[a+"ScrollbarMaxScroll"]+(this[a+"ScrollbarIndicatorSize"]-c))),this[a+"ScrollbarWrapper"].style[e+
"TransitionDelay"]="0",this[a+"ScrollbarWrapper"].style.opacity=b&&this.options.hideScrollbar?"0":"1",this[a+"ScrollbarIndicator"].style[e+"Transform"]=o+(a=="h"?c+"px,0":"0,"+c+"px")+p},_start:function(a){var b=k?a.touches[0]:a,c,h;if(this.enabled){this.options.onBeforeScrollStart&&this.options.onBeforeScrollStart.call(this,a);this.options.useTransition&&this._transitionTime(0);this.zoomed=this.animating=this.moved=!1;this.dirY=this.dirX=this.absDistY=this.absDistX=this.distY=this.distX=0;if(this.options.zoom&&
k&&a.touches.length>1)h=f.abs(a.touches[0].pageX-a.touches[1].pageX),c=f.abs(a.touches[0].pageY-a.touches[1].pageY),this.touchesDistStart=f.sqrt(h*h+c*c),this.originX=f.abs(a.touches[0].pageX+a.touches[1].pageX-this.wrapperOffsetLeft*2)/2-this.x,this.originY=f.abs(a.touches[0].pageY+a.touches[1].pageY-this.wrapperOffsetTop*2)/2-this.y,this.options.onZoomStart&&this.options.onZoomStart.call(this,a);if(this.options.momentum&&(this.options.useTransform?(c=getComputedStyle(this.scroller,null)[e+"Transform"].replace(/[^0-9-.,]/g,
"").split(","),h=c[4]*1,c=c[5]*1):(h=getComputedStyle(this.scroller,null).left.replace(/[^0-9-]/g,"")*1,c=getComputedStyle(this.scroller,null).top.replace(/[^0-9-]/g,"")*1),h!=this.x||c!=this.y))this.options.useTransition?this._unbind("webkitTransitionEnd"):v(this.aniTime),this.steps=[],this._pos(h,c);this.absStartX=this.x;this.absStartY=this.y;this.startX=this.x;this.startY=this.y;this.pointX=b.pageX;this.pointY=b.pageY;this.startTime=a.timeStamp||(new Date).getTime();this.options.onScrollStart&&
this.options.onScrollStart.call(this,a);this._bind("touchmove");this._bind("touchend");this._bind("touchcancel")}},_move:function(a){var b=k?a.touches[0]:a,c=b.pageX-this.pointX,h=b.pageY-this.pointY,d=this.x+c,g=this.y+h,w=a.timeStamp||(new Date).getTime();this.options.onBeforeScrollMove&&this.options.onBeforeScrollMove.call(this,a);if(this.options.zoom&&k&&a.touches.length>1){d=f.abs(a.touches[0].pageX-a.touches[1].pageX);g=f.abs(a.touches[0].pageY-a.touches[1].pageY);this.touchesDist=f.sqrt(d*
d+g*g);this.zoomed=!0;b=1/this.touchesDistStart*this.touchesDist*this.scale;if(b<0.5)b=0.5;else if(b>this.options.zoomMax)b=this.options.zoomMax;this.lastScale=b/this.scale;d=this.originX-this.originX*this.lastScale+this.x;g=this.originY-this.originY*this.lastScale+this.y;this.scroller.style[e+"Transform"]=o+d+"px,"+g+"px"+p+" scale("+b+")";this.options.onZoom&&this.options.onZoom.call(this,a)}else{this.pointX=b.pageX;this.pointY=b.pageY;if(d>0||d<this.maxScrollX)d=this.options.bounce?this.x+c/2:
d>=0||this.maxScrollX>=0?0:this.maxScrollX;if(g>0||g<this.maxScrollY)g=this.options.bounce?this.y+h/2:g>=0||this.maxScrollY>=0?0:this.maxScrollY;if(this.absDistX<6&&this.absDistY<6)this.distX+=c,this.distY+=h,this.absDistX=f.abs(this.distX),this.absDistY=f.abs(this.distY);else{if(this.options.lockDirection)if(this.absDistX>this.absDistY+5)g=this.y,h=0;else if(this.absDistY>this.absDistX+5)d=this.x,c=0;this.moved=!0;this._pos(d,g);this.dirX=c>0?-1:c<0?1:0;this.dirY=h>0?-1:h<0?1:0;if(w-this.startTime>
300)this.startTime=w,this.startX=this.x,this.startY=this.y;this.options.onScrollMove&&this.options.onScrollMove.call(this,a)}}},_end:function(a){if(!(k&&a.touches.length!=0)){var b=this,c=k?a.changedTouches[0]:a,h,d,g={dist:0,time:0},e={dist:0,time:0},n=(a.timeStamp||(new Date).getTime())-b.startTime,j=b.x,m=b.y;b._unbind("touchmove");b._unbind("touchend");b._unbind("touchcancel");b.options.onBeforeScrollEnd&&b.options.onBeforeScrollEnd.call(b,a);if(b.zoomed)b.scale*=b.lastScale,b.x=b.originX-b.originX*
b.lastScale+b.x,b.y=b.originY-b.originY*b.lastScale+b.y,b.scroller.style.webkitTransform=o+b.x+"px,"+b.y+"px"+p+" scale("+b.scale+")",b.refresh(),b.options.onZoomEnd&&b.options.onZoomEnd.call(b,a);else{if(b.moved){if(n<300&&b.options.momentum){g=j?b._momentum(j-b.startX,n,-b.x,b.scrollerW-b.wrapperW+b.x,b.options.bounce?b.wrapperW:0):g;e=m?b._momentum(m-b.startY,n,-b.y,b.maxScrollY<0?b.scrollerH-b.wrapperH+b.y:0,b.options.bounce?b.wrapperH:0):e;j=b.x+g.dist;m=b.y+e.dist;if(b.x>0&&j>0||b.x<b.maxScrollX&&
j<b.maxScrollX)g={dist:0,time:0};if(b.y>0&&m>0||b.y<b.maxScrollY&&m<b.maxScrollY)e={dist:0,time:0}}if(g.dist||e.dist){n=f.max(f.max(g.time,e.time),10);if(b.options.snap)g=j-b.absStartX,e=m-b.absStartY,f.abs(g)<b.options.snapThreshold&&f.abs(e)<b.options.snapThreshold?b.scrollTo(b.absStartX,b.absStartY,200):(snap=b._snap(j,m),j=snap.x,m=snap.y,n=f.max(snap.time,n));b.scrollTo(j,m,n)}else b.options.snap?(g=j-b.absStartX,e=m-b.absStartY,f.abs(g)<b.options.snapThreshold&&f.abs(e)<b.options.snapThreshold?
b.scrollTo(b.absStartX,b.absStartY,200):(snap=b._snap(b.x,b.y),(snap.x!=b.x||snap.y!=b.y)&&b.scrollTo(snap.x,snap.y,snap.time))):b._resetPos(200)}else{if(k)b.doubleTapTimer&&b.options.zoom?(clearTimeout(b.doubleTapTimer),b.doubleTapTimer=null,b.zoom(b.pointX,b.pointY,b.scale==1?b.options.doubleTapZoom:1)):b.doubleTapTimer=setTimeout(function(){b.doubleTapTimer=null;for(h=c.target;h.nodeType!=1;)h=h.parentNode;if(h.tagName!="SELECT"&&h.tagName!="INPUT"&&h.tagName!="TEXTAREA")d=document.createEvent("MouseEvents"),
d.initMouseEvent("click",!0,!0,a.view,1,c.screenX,c.screenY,c.clientX,c.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null),d._fake=!0,h.dispatchEvent(d)},b.options.zoom?250:0);b._resetPos(200)}b.options.onTouchEnd&&b.options.onTouchEnd.call(b,a)}}},_resetPos:function(a){var b=this.x>=0?0:this.x<this.maxScrollX?this.maxScrollX:this.x,c=this.y>=0||this.maxScrollY>0?0:this.y<this.maxScrollY?this.maxScrollY:this.y;if(b==this.x&&c==this.y){if(this.moved)this.moved=!1,this.options.onScrollEnd&&this.options.onScrollEnd.call(this);
if(this.hScrollbar&&this.options.hideScrollbar)e=="webkit"&&(this.hScrollbarWrapper.style[e+"TransitionDelay"]="300ms"),this.hScrollbarWrapper.style.opacity="0";if(this.vScrollbar&&this.options.hideScrollbar)e=="webkit"&&(this.vScrollbarWrapper.style[e+"TransitionDelay"]="300ms"),this.vScrollbarWrapper.style.opacity="0"}else this.scrollTo(b,c,a||0)},_wheel:function(a){var b;"wheelDeltaX"in a?(b=this.x+a.wheelDeltaX/12,a=this.y+a.wheelDeltaY/12):"detail"in a?(b=this.x-a.detail*3,a=this.y-a.detail*
3):(b=this.x-a.wheelDelta,a=this.y-a.wheelDelta);if(b>0)b=0;else if(b<this.maxScrollX)b=this.maxScrollX;if(a>0)a=0;else if(a<this.maxScrollY)a=this.maxScrollY;this.scrollTo(b,a,0)},_mouseout:function(a){var b=a.relatedTarget;if(b)for(;b=b.parentNode;)if(b==this.wrapper)return;this._end(a)},_transitionEnd:function(a){a.target==this.scroller&&(this._unbind("webkitTransitionEnd"),this._startAni())},_startAni:function(){var a=this,b=a.x,c=a.y,e=(new Date).getTime(),d,g;if(!a.animating)if(a.steps.length){d=
a.steps.shift();if(d.x==b&&d.y==c)d.time=0;a.animating=!0;a.moved=!0;a.options.useTransition?(a._transitionTime(d.time),a._pos(d.x,d.y),a.animating=!1,d.time?a._bind("webkitTransitionEnd"):a._resetPos(0)):function n(){var j=(new Date).getTime();if(j>=e+d.time)a._pos(d.x,d.y),a.animating=!1,a.options.onAnimationEnd&&a.options.onAnimationEnd.call(a),a._startAni();else if(j=(j-e)/d.time-1,g=f.sqrt(1-j*j),j=(d.x-b)*g+b,a._pos(j,(d.y-c)*g+c),a.animating)a.aniTime=y(n)}()}else a._resetPos(400)},_transitionTime:function(a){a+=
"ms";this.scroller.style[e+"TransitionDuration"]=a;this.hScrollbar&&(this.hScrollbarIndicator.style[e+"TransitionDuration"]=a);this.vScrollbar&&(this.vScrollbarIndicator.style[e+"TransitionDuration"]=a)},_momentum:function(a,b,c,e,d){var b=f.abs(a)/b,g=b*b/0.0012,k=0,k=0;a>0&&g>c?(c+=d/(6/(g/b*6.0E-4)),b=b*c/g,g=c):a<0&&g>e&&(e+=d/(6/(g/b*6.0E-4)),b=b*e/g,g=e);g*=a<0?-1:1;return{dist:g,time:f.round(b/6.0E-4)}},_offset:function(a){for(var b=-a.offsetLeft,c=-a.offsetTop;a=a.offsetParent;)b-=a.offsetLeft,
c-=a.offsetTop;a!=this.wrapper&&(b*=this.scale,c*=this.scale);return{left:b,top:c}},_snap:function(a,b){var c,e,d;d=this.pagesX.length-1;c=0;for(e=this.pagesX.length;c<e;c++)if(a>=this.pagesX[c]){d=c;break}d==this.currPageX&&d>0&&this.dirX<0&&d--;a=this.pagesX[d];e=(e=f.abs(a-this.pagesX[this.currPageX]))?f.abs(this.x-a)/e*500:0;this.currPageX=d;d=this.pagesY.length-1;for(c=0;c<d;c++)if(b>=this.pagesY[c]){d=c;break}d==this.currPageY&&d>0&&this.dirY<0&&d--;b=this.pagesY[d];c=(c=f.abs(b-this.pagesY[this.currPageY]))?
f.abs(this.y-b)/c*500:0;this.currPageY=d;d=f.round(f.max(e,c))||200;return{x:a,y:b,time:d}},_bind:function(a,b){qx.event.Registration.addListener(b||this.scroller,a!="webkitTransitionEnd"?a:"transitionEnd",this.handleEvent,this)},_unbind:function(a,b){qx.event.Registration.removeListener(b||this.scroller,a!="webkitTransitionEnd"?a:"transitionEnd",this.handleEvent,this)},destroy:function(){this.scroller.style[e+"Transform"]="";this.vScrollbar=this.hScrollbar=!1;this._scrollbar("h");this._scrollbar("v");
this._unbind("orientationchange",window);this._unbind("touchstart");this._unbind("touchmove");this._unbind("touchend");this._unbind("touchcancel");this.options.hasTouch&&(this._unbind("mouseout",this.wrapper),this._unbind("mousewheel"));this.options.useTransition&&this._unbind("webkitTransitionEnd");this.options.checkDOMChanges&&clearInterval(this.checkDOMTime);this.options.onDestroy&&this.options.onDestroy.call(this)},refresh:function(){var a,b=0,c=0;if(this.scale<this.options.zoomMin)this.scale=
this.options.zoomMin;this.wrapperW=this.wrapper.clientWidth||1;this.wrapperH=this.wrapper.clientHeight||1;this.scrollerW=f.round(this.scroller.offsetWidth*this.scale);this.scrollerH=f.round(this.scroller.offsetHeight*this.scale);this.maxScrollX=this.wrapperW-this.scrollerW;this.maxScrollY=this.wrapperH-this.scrollerH;this.dirY=this.dirX=0;this.hScroll=this.options.hScroll&&this.maxScrollX<0;this.vScroll=this.options.vScroll&&(!this.options.bounceLock&&!this.hScroll||this.scrollerH>this.wrapperH);
this.hScrollbar=this.hScroll&&this.options.hScrollbar;this.vScrollbar=this.vScroll&&this.options.vScrollbar&&this.scrollerH>this.wrapperH;a=this._offset(this.wrapper);this.wrapperOffsetLeft=-a.left;this.wrapperOffsetTop=-a.top;if(typeof this.options.snap=="string"){this.pagesX=[];this.pagesY=[];els=this.scroller.querySelectorAll(this.options.snap);i=0;for(l=els.length;i<l;i++)b=this._offset(els[i]),b.left+=this.wrapperOffsetLeft,b.top+=this.wrapperOffsetTop,this.pagesX[i]=b.left<this.maxScrollX?this.maxScrollX:
b.left*this.scale,this.pagesY[i]=b.top<this.maxScrollY?this.maxScrollY:b.top*this.scale}else if(this.options.snap){for(this.pagesX=[];b>=this.maxScrollX;)this.pagesX[c]=b,b-=this.wrapperW,c++;this.maxScrollX%this.wrapperW&&(this.pagesX[this.pagesX.length]=this.maxScrollX-this.pagesX[this.pagesX.length-1]+this.pagesX[this.pagesX.length-1]);c=b=0;for(this.pagesY=[];b>=this.maxScrollY;)this.pagesY[c]=b,b-=this.wrapperH,c++;this.maxScrollY%this.wrapperH&&(this.pagesY[this.pagesY.length]=this.maxScrollY-
this.pagesY[this.pagesY.length-1]+this.pagesY[this.pagesY.length-1])}this._scrollbar("h");this._scrollbar("v");this.scroller.style[e+"TransitionDuration"]="0";this._resetPos(200)},scrollTo:function(a,b,c,e){var d=a;this.stop();d.length||(d=[{x:a,y:b,time:c,relative:e}]);a=0;for(b=d.length;a<b;a++){if(d[a].relative)d[a].x=this.x-d[a].x,d[a].y=this.y-d[a].y;this.steps.push({x:d[a].x,y:d[a].y,time:d[a].time||0})}this._startAni()},scrollToElement:function(a,b){var c;if(a=a.nodeType?a:this.scroller.querySelector(a))c=
this._offset(a),c.left+=this.wrapperOffsetLeft,c.top+=this.wrapperOffsetTop,c.left=c.left>0?0:c.left<this.maxScrollX?this.maxScrollX:c.left,c.top=c.top>0?0:c.top<this.maxScrollY?this.maxScrollY:c.top,b=b===void 0?f.max(f.abs(c.left)*2,f.abs(c.top)*2):b,this.scrollTo(c.left,c.top,b)},scrollToPage:function(a,b,c){if(this.options.snap)a=a=="next"?this.currPageX+1:a=="prev"?this.currPageX-1:a,b=b=="next"?this.currPageY+1:b=="prev"?this.currPageY-1:b,a=a<0?0:a>this.pagesX.length-1?this.pagesX.length-1:
a,b=b<0?0:b>this.pagesY.length-1?this.pagesY.length-1:b,this.currPageX=a,this.currPageY=b,a=this.pagesX[a],b=this.pagesY[b];else{a*=-this.wrapperW;b*=-this.wrapperH;if(a<this.maxScrollX)a=this.maxScrollX;if(b<this.maxScrollY)b=this.maxScrollY}this.scrollTo(a,b,c||400)},disable:function(){this.stop();this._resetPos(0);this.enabled=!1;this._unbind("touchmove");this._unbind("touchend");this._unbind("touchcancel")},enable:function(){this.enabled=!0},stop:function(){this.options.useTransition?this._unbind("webkitTransitionEnd"):
v(this.aniTime);this.steps=[];this.animating=this.moved=!1},zoom:function(a,b,c,f){var d=c/this.scale;if(this.options.useTransform)a=a-this.wrapperOffsetLeft-this.x,b=b-this.wrapperOffsetTop-this.y,this.x=a-a*d+this.x,this.y=b-b*d+this.y,this.scale=c,this.scroller.style[e+"TransitionDuration"]=(f||200)+"ms",this.scroller.style[e+"Transform"]=o+this.x+"px,"+this.y+"px"+p+" scale("+c+")",this.refresh()},isReady:function(){return!this.moved&&!this.zoomed&&!this.animating}};typeof exports!=="undefined"?
exports.iScroll=q:window.iScroll=q})();