/*滚动页面缓动效果*/ /*!function (a) { a(document).ready(function () { function q() { if (document.url.indexof("google.com/reader/view") > -1 && (g = !0), i) for (var a = i.split(/[,\n] ?/), b = a.length; b--;) if (document.url.indexof(a[b]) > -1) { d("mousewheel", v), g = !0; break } } function r() { if (document.body) { var a = document.body, b = document.documentelement, c = window.innerheight, d = a.scrollheight; if (o = document.compatmode.indexof("css") >= 0 ? b : a, n = a, q(), l = !0, top != self) j = !0; else if (d > c && (a.offsetheight <= c || b.offsetheight <= c) && (o.style.height = "auto", o.offsetheight <= c)) { var e = document.createelement("div"); e.style.clear = "both", a.appendchild(e) } if (document.url.indexof("mail.google.com") > -1) { var f = document.createelement("style"); f.innerhtml = ".iu { visibility: hidden }", (document.getelementsbytagname("head")[0] || b).appendchild(f) } m || (a.style.backgroundattachment = "scroll"), g && d("keydown", w) } } function u(c, e, f, g) { if (g || (g = 1e3), f(e, f), s.push({ x: e, y: f, lastx: 0 > e ? .99 : -.99, lasty: 0 > f ? .99 : -.99, start: +new date }), !t) { var h = function () { for (var i = +new date, j = 0, k = 0, l = 0; l < s.length; l++) { var m = s[l], n = i - m.start, o = n >= b, p = o ? 1 : n / b; d && (p = h(p)); var q = m.x * p - m.lastx >> 0, r = m.y * p - m.lasty >> 0; j += q, k += r, m.lastx += q, m.lasty += r, o && (s.splice(l, 1), l--) } if (e) { var u = c.scrollleft; c.scrollleft += j, j && c.scrollleft === u && (e = 0) } if (f) { var v = c.scrolltop; c.scrolltop += k, k && c.scrolltop === v && (f = 0) } e || f || (s = []), s.length ? settimeout(h, g / a + 1) : t = !1 }; settimeout(h, 0), t = !0 } } function v(a) { l || r(); var b = a.target, d = b(b); if (!d || a.defaultprevented || e(n, "embed") || e(b, "embed") && /\.pdf/i.test(b.src)) return !0; var e = a.wheeldeltax || 0, f = a.wheeldeltay || 0; e || f || (f = a.wheeldelta || 0), math.abs(e) > 1.2 && (e *= c / 120), math.abs(f) > 1.2 && (f *= c / 120), u(d, -e, -f), a.preventdefault() } function w(a) { var b = a.target, c = a.ctrlkey || a.altkey || a.metakey; if (/input|textarea|embed/i.test(b.nodename) || b.iscontenteditable || a.defaultprevented || c) return !0; if (e(b, "button") && a.keycode === p.spacebar) return !0; var d, e = 0, f = 0, g = b(n), i = g.clientheight; switch (g == document.body && (i = window.innerheight), a.keycode) { case p.up: f = -h; break; case p.down: f = h; break; case p.spacebar: d = a.shiftkey ? 1 : -1, f = .9 * -d * i; break; case p.pageup: f = .9 * -i; break; case p.pagedown: f = .9 * i; break; case p.home: f = -g.scrolltop; break; case p.end: var j = g.scrollheight - g.scrolltop - i; f = j > 0 ? j + 10 : 0; break; case p.left: e = -h; break; case p.right: e = h; break; default: return !0 } u(g, e, f), a.preventdefault() } function x(a) { n = a.target } function a(a, b) { for (var c = a.length; c--;) y[z(a[c])] = b; return b } function b(a) { var b = [], c = o.scrollheight; do { var d = y[z(a)]; if (d) return a(b, d); if (b.push(a), c === a.scrollheight) { if (!j || o.clientheight + 10 < c) return a(b, document.body) } else if (a.clientheight + 10 < a.scrollheight && (overflow = getcomputedstyle(a, "").getpropertyvalue("overflow"), "scroll" === overflow || "auto" === overflow)) return a(b, a) } while (a = a.parentnode) } function c(a, b, c) { window.addeventlistener(a, b, c || !1) } function d(a, b, c) { window.removeeventlistener(a, b, c || !1) } function e(a, b) { return a.nodename.tolowercase() === b.tolowercase() } function f(a, b) { a = a > 0 ? 1 : -1, b = b > 0 ? 1 : -1, (k.x !== a || k.y !== b) && (k.x = a, k.y = b, s = []) } function g(a) { var b, c, d; return a *= e, 1 > a ? b = a - (1 - math.exp(-a)) : (c = math.exp(-1), a -= 1, d = 1 - math.exp(-a), b = c + d * (1 - c)), b * f } function h(a) { return a >= 1 ? 1 : 0 >= a ? 0 : (1 == f && (f /= g(1)), g(a)) } var n, o, a = 150, b = 600, c = 150, d = !0, e = 5, f = 1, g = !1, h = 50, i = "", j = !1, k = { x: 0, y: 0 }, l = !1, m = !0, p = { left: 37, up: 38, right: 39, down: 40, spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 }, s = [], t = !1, y = {}; setinterval(function () { y = {} }, 1e4); var z = function () { var a = 0; return function (b) { return b.uniqueid || (b.uniqueid = a++) } }(); /chrome/.test(navigator.useragent.tolowercase()) && (c("mousedown", x), c("mousewheel", v), c("keydown", w), c("load", r)) }) }(jquery);*/ /*! pace 0.4.17 */ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=[].slice,w={}.hasownproperty,x=function(a,b){function c(){this.constructor=a}for(var d in b)w.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},y=[].indexof||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(t={catchuptime:500,initialrate:.03,mintime:500,ghosttime:500,maxprogressperframe:10,easefactor:1.25,startonpageload:!0,restartonpushstate:!0,restartonrequestafter:500,target:"body",elements:{checkinterval:100,selectors:["body"]},eventlag:{minsamples:10,samplecount:3,lagthreshold:3},ajax:{trackmethods:["get"],trackwebsockets:!1}},b=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance?"function"==typeof performance.now?performance.now():void 0:void 0)?a:+new date},d=window.requestanimationframe||window.mozrequestanimationframe||window.webkitrequestanimationframe||window.msrequestanimationframe,s=window.cancelanimationframe||window.mozcancelanimationframe,null==d&&(d=function(a){return settimeout(a,50)},s=function(a){return cleartimeout(a)}),f=function(a){var b,c;return b=b(),(c=function(){var d;return d=b()-b,d>=33?(b=b(),a(d,function(){return d(c)})):settimeout(c,33-d)})()},e=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?v.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},u=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?v.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)w.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?u(b[a],e):b[a]=e);return b},p=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=math.abs(d),b++;return c/b},w=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.queryselector("[data-pace-"+a+"]")){if(c=e.getattribute("data-pace-"+a),!b)return c;try{return json.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];co;o++)i=s[o],c[i]===!0&&(c[i]=t[i]);i=function(a){function b(){return t=b.__super__.constructor.apply(this,arguments)}return x(b,a),b}(error),b=function(){function a(){this.progress=0}return a.prototype.getelement=function(){var a;if(null==this.el){if(a=document.queryselector(c.target),!a)throw new i;this.el=document.createelement("div"),this.el.classname="pace pace-active",document.body.classname=document.body.classname.replace("pace-done",""),document.body.classname+=" pace-running",this.el.innerhtml='
\n
\n
\n
',null!=a.firstchild?a.insertbefore(this.el,a.firstchild):a.appendchild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getelement(),a.classname=a.classname.replace("pace-active",""),a.classname+=" pace-inactive",document.body.classname=document.body.classname.replace("pace-running",""),document.body.classname+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getelement().parentnode.removechild(this.getelement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b;return null==document.queryselector(c.target)?!1:(a=this.getelement(),a.children[0].style.width=""+this.progress+"%",(!this.lastrenderedprogress||this.lastrenderedprogress|0!==this.progress|0)&&(a.children[0].setattribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?b="99":(b=this.progress<10?"0":"",b+=0|this.progress),a.children[0].setattribute("data-progress",""+b)),this.lastrenderedprogress=this.progress)},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),n=window.xmlhttprequest,m=window.xdomainrequest,l=window.websocket,v=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],null==a[d]&&"function"!=typeof e?f.push(a[d]=e):f.push(void 0)}catch(g){c=g}return f},z=[],pace.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?v.call(arguments,1):[],z.unshift("ignore"),c=b.apply(null,a),z.shift(),c},pace.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?v.call(arguments,1):[],z.unshift("track"),c=b.apply(null,a),z.shift(),c},h=function(a){var b;if(null==a&&(a="get"),"track"===z[0])return"force";if(!z.length&&c.ajax){if("socket"===a&&c.ajax.trackwebsockets)return!0;if(b=a.touppercase(),y.call(c.ajax.trackmethods,b)>=0)return!0}return!1},j=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return h(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.xmlhttprequest=function(b){var c;return c=new n(b),a(c),c},v(window.xmlhttprequest,n),null!=m&&(window.xdomainrequest=function(){var b;return b=new m,a(b),b},v(window.xdomainrequest,m)),null!=l&&c.ajax.trackwebsockets&&(window.websocket=function(a,b){var d;return d=new l(a,b),h("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d},v(window.websocket,l))}return x(b,a),b}(h),p=null,x=function(){return null==p&&(p=new j),p},x().on("request",function(b){var c,d,e,f;return f=b.type,e=b.request,pace.running||c.restartonrequestafter===!1&&"force"!==h(f)?void 0:(d=arguments,c=c.restartonrequestafter||0,"boolean"==typeof c&&(c=0),settimeout(function(){var b,c,g,h,i,j;if(b="socket"===f?e.readystate<2:0<(h=e.readystate)&&4>h){for(pace.restart(),i=pace.sources,j=[],c=0,g=i.length;g>c;c++){if(i=i[c],i instanceof a){i.watch.apply(i,d);break}j.push(void 0)}return j}},c))}),a=function(){function a(){var a=this;this.elements=[],x().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d;return d=a.type,b=a.request,c="socket"===d?new m(b):new n(b),this.elements.push(c)},a}(),n=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.progressevent)for(c=null,a.addeventlistener("progress",function(a){return h.progress=a.lengthcomputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2}),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addeventlistener(b,function(){return h.progress=100});else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readystate)||4===b?h.progress=100:3===a.readystate&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),m=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addeventlistener(b,function(){return f.progress=100})}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.queryselector(this.selector)?this.done():settimeout(function(){return a.check()},c.elements.checkinterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readystate])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readystate]&&(c.progress=c.states[document.readystate]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=b(),b=setinterval(function(){var g;return g=b()-c-50,c=b(),e.push(g),e.length>c.eventlag.samplecount&&e.shift(),a=p(e),++d>=c.eventlag.minsamples&&a=100&&(this.done=!0),b===this.last?this.sincelastupdate+=a:(this.sincelastupdate&&(this.rate=(b-this.last)/this.sincelastupdate),this.catchup=(b-this.progress)/c.catchuptime,this.sincelastupdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-math.pow(this.progress/100,c.easefactor),this.progress+=c*this.rate*a,this.progress=math.min(this.lastprogress+c.maxprogressperframe,this.progress),this.progress=math.max(0,this.progress),this.progress=math.min(100,this.progress),this.lastprogress=this.progress,this.progress},a}(),j=null,g=null,q=null,k=null,o=null,r=null,pace.running=!1,y=function(){return c.restartonpushstate?pace.restart():void 0},null!=window.history.pushstate&&(r=window.history.pushstate,window.history.pushstate=function(){return y(),r.apply(window.history,arguments)}),null!=window.history.replacestate&&(u=window.history.replacestate,window.history.replacestate=function(){return y(),u.apply(window.history,arguments)}),k={ajax:a,elements:d,document:c,eventlag:f},(a=function(){var a,c,d,e,f,g,h,i;for(pace.sources=j=[],g=["ajax","elements","document","eventlag"],c=0,e=g.length;e>c;c++)a=g[c],c[a]!==!1&&j.push(new k[a](c[a]));for(i=null!=(h=c.extrasources)?h:[],d=0,f=i.length;f>d;d++)i=i[d],j.push(new i(c));return pace.bar=q=new b,g=[],k=new l})(),pace.stop=function(){return pace.trigger("stop"),pace.running=!1,q.destroy(),r=!0,null!=o&&("function"==typeof s&&s(o),o=null),a()},pace.restart=function(){return pace.trigger("restart"),pace.stop(),pace.start()},pace.go=function(){return pace.running=!0,q.render(),r=!1,o=f(function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v;for(j=100-q.progress,d=o=0,e=!0,h=p=0,t=j.length;t>p;h=++p)for(i=j[h],m=null!=g[h]?g[h]:g[h]=[],g=null!=(v=i.elements)?v:[i],i=s=0,u=g.length;u>s;i=++s)f=g[i],k=null!=m[i]?m[i]:m[i]=new l(f),e&=k.done,k.done||(d++,o+=k.tick(a));return c=o/d,q.update(k.tick(a,c)),n=b(),q.done()||e||r?(q.update(100),pace.trigger("done"),settimeout(function(){return q.finish(),pace.running=!1,pace.trigger("hide")},math.max(c.ghosttime,math.min(c.mintime,b()-n)))):b()})},pace.start=function(a){u(c,a),pace.running=!0;try{q.render()}catch(b){i=b}return document.queryselector(".pace")?(pace.trigger("start"),pace.go()):settimeout(pace.start,50)},"function"==typeof define&&define.amd?define(function(){return pace}):"object"==typeof exports?module.exports=pace:c.startonpageload&&pace.start()}).call(this); //锚链接 smoothscroll /*使用方法链接导航锚链接*/ eval(function(p,a,c,k,e,r){e=function(c){return(c35?string.fromcharcode(c+29):c.tostring(36))};if(!''.replace(/^/,string)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new regexp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7(a,b){6(12 1r===\'7\'&&1r.2j){1r([],b(a))}z 6(12 1o===\'s\'){2o.1o=b(a)}z{a.2k=b(a)}})(12 1f!==\'2k\'?1f:24.1w||24.1f,7(u){\'37 2g\';3 v={};3 w=\'13\'1e l&&\'1g\'1e u;3 x,t,n,o,x;3 y={1p:\'[1o-1h]\',1s:\'[1o-1h-2n]\',1l:2h,1x:\'1v\',1q:0,1e:11,1a:7(){}};3 z=7(){3 c={};3 d=q;3 i=0;3 e=1d.14;6(v.15.17.18(1d[0])===\'[s 2l]\'){d=1d[0];i++}3 f=7(a){1p(3 b 1e a){6(v.15.2i.18(a,b)){6(d&&v.15.17.18(a[b])===\'[s v]\'){c[b]=z(11,c[b],a[b])}z{c[b]=a[b]}}}};1p(;i1){1n=11;e[1]=e[1].1r(/"/g,\'\').1r(/\'/g,\'\')}}1p(;a&&a!==l&&a.2i===1;a=a.2j){6(c===\'.\'){6(d){6(a.1g.1s(b.y(1))){9 a}}z{6(1u 2u(\'(^|\\\\s)\'+b.y(1)+\'(\\\\s|$)\').38(a.29)){9 a}}}6(c===\'#\'){6(a.2d===b.y(1)){9 a}}6(c===\'[\'){6(a.2e(e[0])){6(1n){6(a.1w(e[0])===e[1]){9 a}}z{9 a}}}6(a.1z.20()===b){9 a}}9 m};v.1t=7(a){6(a.1c(0)===\'#\'){a=a.y(1)}3 b=2m(a);3 c=b.14;3 d=-1;3 e;3 f=\'\';3 g=b.1u(0);1v(++d=2e&&e<=2f)||e==2g||(d===0&&e>=1i&&e<=1j)||(d===1&&e>=1i&&e<=1j&&g===1z)){f+=\'\\\\\'+e.17(16)+\' \';1b}6(e>=2m||e===1z||e===2n||e>=1i&&e<=1j||e>=2o&&e<=2p||e>=2q&&e<=2s){f+=b.1c(d);1b}f+=\'\\\\\'+b.1c(d)}9\'#\'+f};3 c=7(a,b){3 c;6(a===\'2w\')c=b*b;6(a===\'33\')c=b*(2-b);6(a===\'36\')c=b<0.5?2*b*b:-1+(4-2*b)*b;6(a===\'39\')c=b*b*b;6(a===\'25\')c=(--b)*b*b+1;6(a===\'1v\')c=b<0.5?4*b*b*b:(b-1)*(2*b-2)*(2*b-2)+1;6(a===\'26\')c=b*b*b*b;6(a===\'27\')c=1-(--b)*b*b*b;6(a===\'28\')c=b<0.5?8*b*b*b*b:1-8*(--b)*b*b*b;6(a===\'2a\')c=b*b*b*b*b;6(a===\'2b\')c=1+(--b)*b*b*b*b;6(a===\'2c\')c=b<0.5?16*b*b*b*b*b:1+16*(--b)*b*b*b*b;9 c||b};3 d=7(a,b,c){3 d=0;6(a.1c){2f{d+=a.1d;a=a.1c}1v(a)}d=r.1a(d-b-c,0);9 r.2h(d,f()-e())};3 e=7(){9 r.1a(l.p.1b,1w.1f||0)};3 f=7(){9 r.1a(u.l.1l.1k,u.l.p.1k,u.l.1l.1h,u.l.p.1h,u.l.1l.1b,u.l.p.1b)};3 g=7(a){9!a||!(12 1m===\'s\'&&12 1m.1i===\'7\')?{}:1m.1i(a)};3 h=7(a,b){6(u.1j.1k&&(b||b===\'11\')&&u.w.1m!==\'2u:\'){u.1j.1k(m,m,[u.w.1m,\'//\',u.w.2v,u.w.2w,u.w.2x,a].2y(\'\'))}};3 i=7(a){9 a===m?0:(a(a)+a.1d)};v.1n=7(e,f,g){3 h=g(f?f.1w(\'1o-2b\'):m);3 i=z(x||y,g||{},h);3 j=v.15.17.18(e)===\'[s 2d]\'?11:q;3 k=j?m:(e===\'#\'?u.l.p:u.l.13(e));6(!j&&!k)9;3 l=u.1q;6(!n){n=u.l.13(i.1s)}6(!o){o=i(n)}3 m=j?e:d(k,o,1t(i.1q,10));3 n=m-l;3 o=f();3 p=0;3 q,19;6(!j){h(e,i.1e)}3 r=7(a,b,c){3 d=u.1q;6(a==b||d==b||((u.1f+d)>=o)){1x(c);6(!j){k.2r()}i.1a(e,f)}};3 s=7(){p+=16;q=(p/1t(i.1l,10));q=(q>1)?1:q;19=l+(n*c(i.1x,q));u.1y(0,r.2t(19));r(19,m,x)};3 t=7(){1x(x);x=2v(s,16)};6(u.1q===0){u.1y(0,0)}t()};3 j=7(a){6(a.2x!==0||a.2y||a.2z)9;3 b=b(a.30,x.1p);6(b&&b.1z.20()===\'a\'){a.31();3 c=v.1t(b.32);v.1n(c,b,x)}};3 k=7(a){6(!t){t=34(7(){t=m;o=i(n)},35)}};v.21=7(){6(!x)9;u.l.22(\'23\',j,q);u.22(\'1y\',k,q);x=m;t=m;n=m;o=m;x=m};v.2l=7(a){6(!w)9;v.21();x=z(y,a||{});n=u.l.13(x.1s);o=i(n);u.l.1g(\'23\',j,q);6(n){u.1g(\'1y\',k,q)}};9 v});',62,197,'|||var|||if|function||return||||||||||||||||||||||||||||||||||||||document|null|fixedheader|headerheight|documentelement|false|math|object|eventtimeout||object|location|animationinterval|substr|else||true|typeof|queryselector|length|prototype||tostring|call|position|max|clientheight|charat|arguments|in|global|addeventlistener|offsetheight|0x0030|0x0039|scrollheight|body|json|value|data|for|pageyoffset|define|selectorheader|escapecharacters|charcodeat|while|window|easing|resize|0x002d|callback|continue|offsetparent|offsettop|updateurl|innerheight|classlist|scroll|parse|history|pushstate|speed|protocol|animatescroll|exports|selector|offset|replace|contains|parseint|new|easeinoutcubic|getattribute|clearinterval|scrollto|tagname|tolowercase|destroy|removeeventlistener|click|this|easeoutcubic|easeinquart|easeoutquart|easeinoutquart|classname|easeinquint|easeoutquint|easeinoutquint|id|hasattribute|do|strict|min|hasownproperty|amd|undefined|init|string|header|module|split|throw|invalidcharactererror|invalid|character|file|host|pathname|search|join|the|input|options|0000|number|0x0001|0x001f|0x007f|500|nodetype|parentnode|smoothscroll|boolean|0x0080|0x005f|0x0041|0x005a|0x0061|focus|0x007a|floor|regexp|setinterval|easeinquad|button|metakey|ctrlkey|target|preventdefault|hash|easeoutquad|settimeout|66|easeinoutquad|use|test|easeincubic|0x0000'.split('|'),0,{})); /*rellax视觉差*/ (function(e,b){"function"===typeof define&&define.amd?define([],b):"object"===typeof module&&module.exports?module.exports=b():e.rellax=b()})(this,function(){var e=function(b,h){var c=object.create(e.prototype);if("undefined"===typeof window.orientation){var f=0,g=0,d=[],n=window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||window.msrequestanimationframe||window.orequestanimationframe||function(a){settimeout(a,1e3/60)};c.options={speed:-2};h&&object.keys(h).foreach(function(a){c.options[a]= h[a]});-10>c.options.speed?c.options.speed=-10:10b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.ismobile=function(a){return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(a)},a.prototype.addevent=function(a,b,c){return null!=a.addeventlistener?a.addeventlistener(b,c,!1):null!=a.attachevent?a.attachevent("on"+b,c):a[b]=c},a.prototype.removeevent=function(a,b,c){return null!=a.removeeventlistener?a.removeeventlistener(b,c,!1):null!=a.detachevent?a.detachevent("on"+b,c):delete a[b]},a.prototype.innerheight=function(){return"innerheight"in window?window.innerheight:document.documentelement.clientheight},a}(),c=this.weakmap||this.mozweakmap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.mutationobserver||this.webkitmutationobserver||this.mozmutationobserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("mutationobserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("wow.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notsupported=!0,a.prototype.observe=function(){},a}()),d=this.getcomputedstyle||function(a){return this.getpropertyvalue=function(b){var c;return"float"===b&&(b="stylefloat"),e.test(b)&&b.replace(e,function(a,b){return b.touppercase()}),(null!=(c=a.currentstyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.wow=function(){function e(a){null==a&&(a={}),this.scrollcallback=f(this.scrollcallback,this),this.scrollhandler=f(this.scrollhandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationnamecache=new c}return e.prototype.defaults={boxclass:"wow",animateclass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentelement,"interactive"===(a=document.readystate)||"complete"===a?this.start():this.util().addevent(document,"domcontentloaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.queryselectorall("."+this.config.boxclass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetstyle();else{for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applystyle(b,!0);this.util().addevent(window,"scroll",this.scrollhandler),this.util().addevent(window,"resize",this.scrollhandler),this.interval=setinterval(this.scrollcallback,50)}return this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addednodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.dosync(c));return f}.call(a));return g}}(this)).observe(document.body,{childlist:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeevent(window,"scroll",this.scrollhandler),this.util().removeevent(window,"resize",this.scrollhandler),null!=this.interval?clearinterval(this.interval):void 0},e.prototype.sync=function(){return a.notsupported?this.dosync(this.element):void 0},e.prototype.dosync=function(a){var b,c,d,e,f;if(!this.stopped){if(null==a&&(a=this.element),1!==a.nodetype)return;for(a=a.parentnode||a,e=a.queryselectorall("."+this.config.boxclass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.applystyle(b,!0),this.boxes.push(b),this.all.push(b),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applystyle(a),a.classname=""+a.classname+" "+this.config.animateclass},e.prototype.applystyle=function(a,b){var c,d,e;return d=a.getattribute("data-wow-duration"),c=a.getattribute("data-wow-delay"),e=a.getattribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customstyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestanimationframe"in window?function(a){return window.requestanimationframe(a)}:function(a){return a()}}(),e.prototype.resetstyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.setattribute("style","visibility: visible;"));return e},e.prototype.customstyle=function(a,b,c,d,e){return b&&this.cacheanimationname(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorset(a.style,{animationduration:c}),d&&this.vendorset(a.style,{animationdelay:d}),e&&this.vendorset(a.style,{animationiterationcount:e}),this.vendorset(a.style,{animationname:b?"none":this.cachedanimationname(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorset=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charat(0).touppercase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorcss=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getpropertycssvalue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getpropertycssvalue("-"+f+"-"+b);return c},e.prototype.animationname=function(a){var b;try{b=this.vendorcss(a,"animation-name").csstext}catch(c){b=d(a).getpropertyvalue("animation-name")}return"none"===b?"":b},e.prototype.cacheanimationname=function(a){return this.animationnamecache.set(a,this.animationname(a))},e.prototype.cachedanimationname=function(a){return this.animationnamecache.get(a)},e.prototype.scrollhandler=function(){return this.scrolled=!0},e.prototype.scrollcallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isvisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsettop=function(a){for(var b;void 0===a.offsettop;)a=a.parentnode;for(b=a.offsettop;a=a.offsetparent;)b+=a.offsettop;return b},e.prototype.isvisible=function(a){var b,c,d,e,f;return c=a.getattribute("data-wow-offset")||this.config.offset,f=window.pageyoffset,e=f+math.min(this.element.clientheight,this.util().innerheight())-c,d=this.offsettop(a),b=d+a.clientheight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().ismobile(navigator.useragent)},e}()}).call(this); /*! * superslide v2.1.2 * 轻松解决网站大部分特效展示问题 * 详尽信息请看官网:http://www.superslide2.com/ * * copyright 2011-2015, 大话主席 * * 请尊重原创,保留头部版权 * 在保留版权的前提下可应用于个人或商业用途 * v2.1.1:修复当调用多个superslide,并设置returndefault:true 时返回defaultindex索引错误 * v2.1.2:增加参数设置vis:"auto",解决左滚动自适应窗口宽度问题。适应情况:vis:"auto",scroll:1, effect:"left或leftloop"(注:此为临时解决方案,日后版本可能变动) * v2.1.2:修复 mouseoverstop 和 autoplay均为false下,点击切换按钮后会自动播放bug */ (function(a){a.fn.slide=function(b){a.fn.slide.defaults={type:"slide",effect:"fade",autoplay:false,delaytime:500,intertime:2500,triggertime:150,defaultindex:0,titcell:".hd li",maincell:".bd",targetcell:null,trigger:"mouseover",scroll:1,vis:1,titonclassname:"on",autopage:false,prevcell:".prev",nextcell:".next",pagestatecell:".pagestate",opp:false,pnloop:true,easing:"swing",startfun:null,endfun:null,switchload:null,playstatecell:".playstate",mouseoverstop:true,defaultplay:true,returndefault:false};return this.each(function(){var i=a.extend({},a.fn.slide.defaults,b);var g=a(this);var af=i.effect;var o=a(i.prevcell,g);var h=a(i.nextcell,g);var g=a(i.pagestatecell,g);var n=a(i.playstatecell,g);var b=a(i.titcell,g);var m=b.size();var aa=a(i.maincell,g);var e=aa.children().size();var h=i.switchload;var ai=a(i.targetcell,g);var k=parseint(i.defaultindex);var z=parseint(i.delaytime);var p=parseint(i.intertime);var aq=parseint(i.triggertime);var ac=parseint(i.scroll);var ab=(i.autoplay=="false"||i.autoplay==false)?false:true;var c=(i.opp=="false"||i.opp==false)?false:true;var s=(i.autopage=="false"||i.autopage==false)?false:true;var p=(i.pnloop=="false"||i.pnloop==false)?false:true;var ae=(i.mouseoverstop=="false"||i.mouseoverstop==false)?false:true;var x=(i.defaultplay=="false"||i.defaultplay==false)?false:true;var q=(i.returndefault=="false"||i.returndefault==false)?false:true;var ag=isnan(i.vis)?1:parseint(i.vis);var an=!-[1,]&&!window.xmlhttprequest;var j=0;var f=0;var q=0;var e=0;var r=i.easing;var ad=null;var m=null;var w=null;var ap=i.titonclassname;var d=b.index(g.find("."+ap));var ao=k=d==-1?k:d;var f=k;var am=k;var r=e>=ag?(e%ac!=0?e%ac:ac):0;var v;var u=af=="leftmarquee"||af=="topmarquee"?true:false;var al=function(){if(a.isfunction(i.startfun)){i.startfun(k,m,g,a(i.titcell,g),aa,ai,o,h)}};var j=function(){if(a.isfunction(i.endfun)){i.endfun(k,m,g,a(i.titcell,g),aa,ai,o,h)}};var c=function(){b.removeclass(ap);if(x){b.eq(f).addclass(ap)}};if(i.type=="menu"){if(x){b.removeclass(ap).eq(k).addclass(ap)}b.hover(function(){v=a(this).find(i.targetcell);var i=b.index(a(this));m=settimeout(function(){k=i;b.removeclass(ap).eq(k).addclass(ap);al();switch(af){case"fade":v.stop(true,true).animate({opacity:"show"},z,r,j);break;case"slidedown":v.stop(true,true).animate({height:"show"},z,r,j);break}},i.triggertime)},function(){cleartimeout(m);switch(af){case"fade":v.animate({opacity:"hide"},z,r);break;case"slidedown":v.animate({height:"hide"},z,r);break}});if(q){g.hover(function(){cleartimeout(w)},function(){w=settimeout(c,z)})}return}if(m==0){m=e}if(u){m=2}if(s){if(e>=ag){if(af=="leftloop"||af=="toploop"){m=e%ac!=0?(e/ac^0)+1:e/ac}else{var s=e-ag;m=1+parseint(s%ac!=0?(s/ac+1):(s/ac));if(m<=0){m=1}}}else{m=1}b.html("");var l="";if(i.autopage==true||i.autopage=="true"){for(var ak=0;ak"+(ak+1)+""}}else{for(var ak=0;ak=ag){aa.children().each(function(){if(a(this).width()>q){q=a(this).width();f=a(this).outerwidth(true)}if(a(this).height()>e){e=a(this).height();j=a(this).outerheight(true)}});var y=aa.children();var w=function(){for(var ar=0;ar').css({"top":-(k*ac)*j,"position":"relative","padding":"0","margin":"0"}).children().css({"height":e});break;case"left":aa.wrap('
').css({"width":e*f,"left":-(k*ac)*f,"position":"relative","overflow":"hidden","padding":"0","margin":"0"}).children().css({"float":"left","width":q});break;case"leftloop":case"leftmarquee":w();aa.wrap('
').css({"width":(e+ag+r)*f,"position":"relative","overflow":"hidden","padding":"0","margin":"0","left":-(r+k*ac)*f}).children().css({"float":"left","width":q});break;case"toploop":case"topmarquee":w();aa.wrap('
').css({"height":(e+ag+r)*j,"position":"relative","padding":"0","margin":"0","top":-(r+k*ac)*j}).children().css({"height":e});break}}var z=function(ar){var i=ar*ac;if(ar==m){i=e}else{if(ar==-1&&e%ac!=0){i=-e%ac}}return i};var d=function(aw){var av=function(ay){for(var ax=ay;ax<(ag+ay);ax++){aw.eq(ax).find("img["+h+"]").each(function(){var ab=a(this);ab.attr("src",ab.attr(h)).removeattr(h);if(aa.find(".clone")[0]){var aa=aa.children();for(var az=0;az=1){k=1}else{if(k<=0){k=0}}}else{am=k;if(k>=m){k=0}else{if(k<0){k=m-1}}}al();if(h!=null){d(aa.children())}if(ai[0]){v=ai.eq(k);if(h!=null){d(ai)}if(af=="slidedown"){ai.not(v).stop(true,true).slideup(z);v.slidedown(z,r,function(){if(!aa[0]){j()}})}else{ai.not(v).stop(true,true).hide();v.animate({opacity:"show"},z,function(){if(!aa[0]){j()}})}}if(e>=ag){switch(af){case"fade":aa.children().stop(true,true).eq(k).animate({opacity:"show"},z,r,function(){j()}).siblings().hide();break;case"fold":aa.children().stop(true,true).eq(k).animate({opacity:"show"},z,r,function(){j()}).siblings().animate({opacity:"hide"},z,r);break;case"top":aa.stop(true,false).animate({"top":-k*ac*j},z,r,function(){j()});break;case"left":aa.stop(true,false).animate({"left":-k*ac*f},z,r,function(){j()});break;case"leftloop":var ar=am;aa.stop(true,true).animate({"left":-(z(am)+r)*f},z,r,function(){if(ar<=-1){aa.css("left",-(r+(m-1)*ac)*f)}else{if(ar>=m){aa.css("left",-r*f)}}j()});break;case"toploop":var ar=am;aa.stop(true,true).animate({"top":-(z(am)+r)*j},z,r,function(){if(ar<=-1){aa.css("top",-(r+(m-1)*ac)*j)}else{if(ar>=m){aa.css("top",-r*j)}}j()});break;case"leftmarquee":var at=aa.css("left").replace("px","");if(k==0){aa.animate({"left":++at},0,function(){if(aa.css("left").replace("px","")>=0){aa.css("left",-e*f)}})}else{aa.animate({"left":--at},0,function(){if(aa.css("left").replace("px","")<=-(e+r)*f){aa.css("left",-r*f)}})}break;case"topmarquee":var i=aa.css("top").replace("px","");if(k==0){aa.animate({"top":++i},0,function(){if(aa.css("top").replace("px","")>=0){aa.css("top",-e*j)}})}else{aa.animate({"top":--i},0,function(){if(aa.css("top").replace("px","")<=-(e+r)*j){aa.css("top",-r*j)}})}break}}b.removeclass(ap).eq(k).addclass(ap);ao=k;if(!p){h.removeclass("nextstop");o.removeclass("prevstop");if(k==0){o.addclass("prevstop")}if(k==m-1){h.addclass("nextstop")}}g.html(""+(k+1)+"/"+m)};if(x){o(true)}if(q){g.hover(function(){cleartimeout(w)},function(){w=settimeout(function(){k=f;if(x){o()}else{if(af=="slidedown"){v.slideup(z,c)}else{v.animate({opacity:"hide"},z,c)}}ao=k},300)})}var t=function(i){ad=setinterval(function(){c?k--:k++;o()},!!i?i:p)};var u=function(i){ad=setinterval(o,!!i?i:p)};var a=function(){if(!ae&&ab&&!n.hasclass("pausestate")){clearinterval(ad);t()}};var y=function(){if(p||k!=m-1){k++;o();if(!u){a()}}};var v=function(){if(p||k!=0){k--;o();if(!u){a()}}};var t=function(){clearinterval(ad);u?u():t();n.removeclass("pausestate")};var aj=function(){clearinterval(ad);n.addclass("pausestate")};if(ab){if(u){c?k--:k++;u();if(ae){aa.hover(aj,t)}}else{t();if(ae){g.hover(aj,t)}}}else{if(u){c?k--:k++}n.addclass("pausestate")}n.click(function(){n.hasclass("pausestate")?t():aj()});if(i.trigger=="mouseover"){b.hover(function(){var i=b.index(this);m=settimeout(function(){k=i;o();a()},i.triggertime)},function(){cleartimeout(m)})}else{b.click(function(){k=b.index(this);o();a()})}if(u){h.mousedown(y);o.mousedown(v);if(p){var n;var k=function(){n=settimeout(function(){clearinterval(ad);u(p/10^0)},150)};var ah=function(){cleartimeout(n);clearinterval(ad);u()};h.mousedown(k);h.mouseup(ah);o.mousedown(k);o.mouseup(ah)}if(i.trigger=="mouseover"){h.hover(y,function(){});o.hover(v,function(){})}}else{h.click(y);o.click(v)}if(i.vis=="auto"&&ac==1&&(af=="left"||af=="leftloop")){var x;var l=function(){if(an){aa.width("auto");aa.children().width("auto")}aa.parent().width("auto");f=aa.parent().width();if(an){aa.parent().width(f)}aa.children().width(f);if(af=="left"){aa.width(f*e);aa.stop(true,false).animate({"left":-k*f},0)}else{aa.width(f*(e+2));aa.stop(true,false).animate({"left":-(k+1)*f},0)}if(!an&&(f!=aa.parent().width())){l()}};a(window).resize(function(){cleartimeout(x);x=settimeout(l,100)});l()}})}})(jquery);jquery.easing["jswing"]=jquery.easing["swing"];jquery.extend(jquery.easing,{def:"easeoutquad",swing:function(e,f,a,h,g){return jquery.easing[jquery.easing.def](e,f,a,h,g)},easeinquad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeoutquad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeinoutquad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeincubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeoutcubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeinoutcubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeinquart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeoutquart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeinoutquart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeinquint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeoutquint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeinoutquint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeinsine:function(e,f,a,h,g){return -h*math.cos(f/g*(math.pi/2))+h+a},easeoutsine:function(e,f,a,h,g){return h*math.sin(f/g*(math.pi/2))+a},easeinoutsine:function(e,f,a,h,g){return -h/2*(math.cos(math.pi*f/g)-1)+a},easeinexpo:function(e,f,a,h,g){return(f==0)?a:h*math.pow(2,10*(f/g-1))+a},easeoutexpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-math.pow(2,-10*f/g)+1)+a},easeinoutexpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*math.pow(2,10*(f-1))+a}return h/2*(-math.pow(2,-10*--f)+2)+a},easeincirc:function(e,f,a,h,g){return -h*(math.sqrt(1-(f/=g)*f)-1)+a},easeoutcirc:function(e,f,a,h,g){return h*math.sqrt(1-(f=f/g-1)*f)+a},easeinoutcirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(math.sqrt(1-f*f)-1)+a}return h/2*(math.sqrt(1-(f-=2)*f)+1)+a},easeinelastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g'+item+''+after});t.empty().append(inject)}}var methods={init:function(){return this.each(function(){injector($(this),'','char','')})},words:function(){return this.each(function(){injector($(this),' ','word',' ')})},lines:function(){return this.each(function(){var r="eefec303079ad17405c889e092e105b0";injector($(this).children("br").replacewith(r).end(),r,'line','')})}};$.fn.lettering=function(method){if(method&&methods[method]){return methods[method].apply(this,[].slice.call(arguments,1))}else if(method==='letters'||!method){return methods.init.apply(this,[].slice.call(arguments,0))}$.error('method '+method+' does not exist on jquery.lettering');return this}})(jquery); /*textillate.js*/ (function($){"use strict";function isineffect(effect){return/in/.test(effect)||$.inarray(effect,$.fn.textillate.defaults.ineffects)>=0};function isouteffect(effect){return/out/.test(effect)||$.inarray(effect,$.fn.textillate.defaults.outeffects)>=0};function getdata(node){var attrs=node.attributes||[],data={};if(!attrs.length)return data;$.each(attrs,function(i,attr){if(/^data-in-*/.test(attr.nodename)){data.in=data.in||{};data.in[attr.nodename.replace(/data-in-/,'')]=attr.nodevalue}else if(/^data-out-*/.test(attr.nodename)){data.out=data.out||{};data.out[attr.nodename.replace(/data-out-/,'')]=attr.nodevalue}else if(/^data-*/.test(attr.nodename)){data[attr.nodename]=attr.nodevalue}});return data};function shuffle(o){for(var j,x,i=o.length;i;j=parseint(math.random()*i),x=o[--i],o[i]=o[j],o[j]=x);return o};function animate($c,effect,cb){$c.addclass('animated '+effect).css('visibility','visible').show();$c.one('animationend webkitanimationend oanimationend',function(){$c.removeclass('animated '+effect);cb&&cb()})};function animatechars($chars,options,cb){var that=this,count=$chars.length;if(!count){cb&&cb();return};if(options.shuffle)$chars=shuffle($chars);if(options.reverse)$chars=$chars.toarray().reverse();$.each($chars,function(i,c){var $char=$(c);function complete(){if(isineffect(options.effect)){$char.css('visibility','visible')}else if(isouteffect(options.effect)){$char.css('visibility','hidden')}count-=1;if(!count&&cb)cb()};var delay=options.sync?options.delay:options.delay*i*options.delayscale;$char.text()?settimeout(function(){animate($char,options.effect,complete)},delay):complete()})};var textillate=function(element,options){var base=this,$element=$(element);base.init=function(){base.$texts=$element.find(options.selector);if(!base.$texts.length){base.$texts=$('
  • '+$element.html()+'
');$element.html(base.$texts)};base.$texts.hide();base.$current=$('').text(base.$texts.find(':first-child').html()).prependto($element);if(isineffect(options.in.effect)){base.$current.css('visibility','hidden')}else if(isouteffect(options.out.effect)){base.$current.css('visibility','visible')};base.setoptions(options);base.timeoutrun=null;settimeout(function(){base.options.autostart&&base.start()},base.options.initialdelay)};base.setoptions=function(options){base.options=options};base.triggerevent=function(name){var e=$.event(name+'.tlt');$element.trigger(e,base);return e};base.in=function(index,cb){index=index||0;var $elem=base.$texts.find(':nth-child('+(index+1)+')'),options=$.extend({},base.options,getdata($elem)),$chars;$elem.addclass('current');base.triggerevent('inanimationbegin');base.$current.text($elem.html()).lettering('words');base.$current.find('[class^="word"]').css({'display':'inline-block','-webkit-transform':'translate3d(0,0,0)','-moz-transform':'translate3d(0,0,0)','-o-transform':'translate3d(0,0,0)','transform':'translate3d(0,0,0)'}).each(function(){$(this).lettering()});$chars=base.$current.find('[class^="char"]').css('display','inline-block');if(isineffect(options.in.effect)){$chars.css('visibility','hidden')}else if(isouteffect(options.in.effect)){$chars.css('visibility','visible')};base.currentindex=index;animatechars($chars,options.in,function(){base.triggerevent('inanimationend');if(options.in.callback)options.in.callback();if(cb)cb(base)})};base.out=function(cb){var $elem=base.$texts.find(':nth-child('+(base.currentindex+1)+')'),$chars=base.$current.find('[class^="char"]'),options=$.extend({},base.options,getdata($elem));base.triggerevent('outanimationbegin');animatechars($chars,options.out,function(){$elem.removeclass('current');base.triggerevent('outanimationend');if(options.out.callback)options.out.callback();if(cb)cb(base)})};base.start=function(index){base.triggerevent('start');(function run(index){base.in(index,function(){var length=base.$texts.children().length;index+=1;if(!base.options.loop&&index>=length){if(base.options.callback)base.options.callback();base.triggerevent('end')}else{index=index%length;base.timeoutrun=settimeout(function(){base.out(function(){run(index)})},base.options.mindisplaytime)}})}(index||0))};base.stop=function(){if(base.timeoutrun){clearinterval(base.timeoutrun);base.timeoutrun=null}};base.init()};$.fn.textillate=function(settings,args){return this.each(function(){var $this=$(this),data=$this.data('textillate'),options=$.extend(true,{},$.fn.textillate.defaults,getdata(this),typeof settings=='object'&&settings);if(!data){$this.data('textillate',(data=new textillate(this,options)))}else if(typeof settings=='string'){data[settings].apply(data,[].concat(args))}else{data.setoptions.call(data,options)}})};$.fn.textillate.defaults={selector:'.texts',loop:false,mindisplaytime:2000,initialdelay:0,in:{effect:'fadeinleftbig',delayscale:1.5,delay:50,sync:false,reverse:false,shuffle:false,callback:function(){}},out:{effect:'hinge',delayscale:1.5,delay:50,sync:false,reverse:false,shuffle:false,callback:function(){}},autostart:true,ineffects:[],outeffects:['hinge'],callback:function(){}}}(jquery)); $('.tlt').textillate(); /** * vivus - javascript library to make drawing animation on svg * @version v0.1.2 * @link https://github.com/maxwellito/vivus * @license mit */ "use strict";!function(){function t(t){if("undefined"==typeof t)throw new error('pathformer [constructor]: "element" parameter is required');if(t.constructor===string&&(t=document.getelementbyid(t),!t))throw new error('pathformer [constructor]: "element" parameter is not related to an existing id');if(t.constructor!==svgsvgelement)throw new error('pathformer [constructor]: "element" parameter must be a string or a svgelement');this.el=t,this.scan(t)}function e(e,r,n){this.setelement(e),this.setoptions(r),this.setcallback(n),this.framelength=0,this.currentframe=0,this.map=[],new t(e),this.mapping(),this.starter()}t.prototype.types=["line","elipse","circle","polygon","polyline","rect"],t.prototype.attr_watch=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],t.prototype.scan=function(t){for(var e,r,n,o,a=t.queryselectorall(this.types.join(",")),i=0;i=this.duration)throw new error("vivus [constructor]: delay must be shorter than duration")},e.prototype.setcallback=function(t){if(t&&t.constructor!==function)throw new error('vivus [constructor]: "callback" parameter must be a function');this.callback=t||function(){}},e.prototype.mapping=function(){var t,e,r,n,a,i,s,h;for(h=i=s=0,e=this.el.queryselectorall("path"),t=0;t1?e.length-1:1),t=0;t=this.framelength?(this.stop(),this.currentframe=this.framelength,this.trace(),this.selfdestroy&&this.destroy(),this.callback(this)):(this.trace(),this.handle=r(function(){t.drawer()}))},e.prototype.trace=function(){var t,e,r;for(t=0;t=i+a*e&&s>=r},e.prototype.docelem=window.document.documentelement,e.prototype.getviewporth=function(){var t=this.docelem.clientheight,e=window.innerheight;return e>t?e:t},e.prototype.scrolly=function(){return window.pageyoffset||this.docelem.scrolltop},r=function(){return window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||window.orequestanimationframe||window.msrequestanimationframe||function(t){return window.settimeout(t,1e3/60)}}(),n=function(){return window.cancelanimationframe||window.webkitcancelanimationframe||window.mozcancelanimationframe||window.ocancelanimationframe||window.mscancelanimationframe||function(t){return window.cleartimeout(t)}}(),o=function(t,e){var r=parseint(t,10);return r>=0?r:e},window.vivus=e}(); /*! lazy load 1.9.3 - mit license - copyright 2010-2013 mika tuupola */ /*data-original='url'*/ !function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,ivborw0kggoaaaansuheugaaaaeaaaabcayaaaaffcsjaaaaaxnsr0iars4c6qaaaarnqu1baacxjwv8yquaaaajcehzcwaadsqaaa7eazurdhsaaaansurbvbhxyzh8+pb/aaffa0nnpuclaaaaaelftksuqmcc"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexof("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexof("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appversion)&&e.bind("pageshow",function(b){b.originalevent&&b.originalevent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerheight?b.innerheight:e.height())+e.scrolltop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollleft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrolltop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollleft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jquery,window,document); /*mousewheel*/ (function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheeldelta&&(e=c.wheeldelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.horizontal_axis&&(h=0,g=-1*e),c.wheeldeltay!==undefined&&(h=c.wheeldeltay/120),c.wheeldeltax!==undefined&&(g=-1*c.wheeldeltax/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["dommousescroll","mousewheel"];if(a.event.fixhooks)for(var c=b.length;c;)a.event.fixhooks[b[--c]]=a.event.mousehooks;a.event.special.mousewheel={setup:function(){if(this.addeventlistener)for(var a=b.length;a;)this.addeventlistener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeeventlistener)for(var a=b.length;a;)this.removeeventlistener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jquery); /*custom scrollbar*/ /* == jquery mousewheel plugin == version: 3.1.13, license: mit license (mit) */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jquery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheeldelta"in g&&(m=g.wheeldelta),"wheeldeltay"in g&&(m=g.wheeldeltay),"wheeldeltax"in g&&(l=-1*g.wheeldeltax),"axis"in g&&g.axis===g.horizontal_axis&&(l=-1*m,m=0),j=0===m?l:m,"deltay"in g&&(m=-1*g.deltay,j=m),"deltax"in g&&(l=g.deltax,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltamode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltamode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=math.max(math.abs(m),math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=math[j>=1?"floor":"ceil"](j/f),l=math[l>=1?"floor":"ceil"](l/f),m=math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeoffset&&this.getboundingclientrect){var s=this.getboundingclientrect();o=b.clientx-s.left,p=b.clienty-s.top}return b.deltax=l,b.deltay=m,b.deltafactor=f,b.offsetx=o,b.offsety=p,b.deltamode=0,h.unshift(b,j,l,m),e&&cleartimeout(e),e=settimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustolddeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","dommousescroll","mozmousepixelscroll"],h="onwheel"in document||document.documentmode>=9?["wheel"]:["mousewheel","dommousescroll","mozmousepixelscroll"],i=array.prototype.slice;if(a.event.fixhooks)for(var j=g.length;j;)a.event.fixhooks[g[--j]]=a.event.mousehooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addeventlistener)for(var c=h.length;c;)this.addeventlistener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getlineheight(this)),a.data(this,"mousewheel-page-height",k.getpageheight(this))},teardown:function(){if(this.removeeventlistener)for(var c=h.length;c;)this.removeeventlistener(h[--c],b,!1);else this.onmousewheel=null;a.removedata(this,"mousewheel-line-height"),a.removedata(this,"mousewheel-page-height")},getlineheight:function(b){var c=a(b),d=c["offsetparent"in a.fn?"offsetparent":"parent"]();return d.length||(d=a("body")),parseint(d.css("fontsize"),10)||parseint(c.css("fontsize"),10)||16},getpageheight:function(b){return a(b).height()},settings:{adjustolddeltas:!0,normalizeoffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jquery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheeldelta"in g&&(m=g.wheeldelta),"wheeldeltay"in g&&(m=g.wheeldeltay),"wheeldeltax"in g&&(l=-1*g.wheeldeltax),"axis"in g&&g.axis===g.horizontal_axis&&(l=-1*m,m=0),j=0===m?l:m,"deltay"in g&&(m=-1*g.deltay,j=m),"deltax"in g&&(l=g.deltax,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltamode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltamode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=math.max(math.abs(m),math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=math[j>=1?"floor":"ceil"](j/f),l=math[l>=1?"floor":"ceil"](l/f),m=math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeoffset&&this.getboundingclientrect){var s=this.getboundingclientrect();o=b.clientx-s.left,p=b.clienty-s.top}return b.deltax=l,b.deltay=m,b.deltafactor=f,b.offsetx=o,b.offsety=p,b.deltamode=0,h.unshift(b,j,l,m),e&&cleartimeout(e),e=settimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustolddeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","dommousescroll","mozmousepixelscroll"],h="onwheel"in document||document.documentmode>=9?["wheel"]:["mousewheel","dommousescroll","mozmousepixelscroll"],i=array.prototype.slice;if(a.event.fixhooks)for(var j=g.length;j;)a.event.fixhooks[g[--j]]=a.event.mousehooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addeventlistener)for(var c=h.length;c;)this.addeventlistener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getlineheight(this)),a.data(this,"mousewheel-page-height",k.getpageheight(this))},teardown:function(){if(this.removeeventlistener)for(var c=h.length;c;)this.removeeventlistener(h[--c],b,!1);else this.onmousewheel=null;a.removedata(this,"mousewheel-line-height"),a.removedata(this,"mousewheel-page-height")},getlineheight:function(b){var c=a(b),d=c["offsetparent"in a.fn?"offsetparent":"parent"]();return d.length||(d=a("body")),parseint(d.css("fontsize"),10)||parseint(c.css("fontsize"),10)||16},getpageheight:function(b){return a(b).height()},settings:{adjustolddeltas:!0,normalizeoffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); /* == malihu jquery custom scrollbar plugin == version: 3.1.5, license: mit license (mit) */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jquery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeuri("%3cscript src="+n+"//"+i+"%3e%3c/script%3e"))),t()}(function(){var t,o="mcustomscrollbar",a="mcs",n=".mcustomscrollbar",i={settop:0,setleft:0,axis:"y",scrollbarposition:"inside",scrollinertia:950,autodraggerlength:!0,alwaysshowscrollbar:0,snapoffset:0,mousewheel:{enable:!0,scrollamount:"auto",axis:"y",deltafactor:"auto",disableover:["select","option","keygen","datalist","textarea"]},scrollbuttons:{scrolltype:"stepless",scrollamount:"auto"},keyboard:{enable:!0,scrolltype:"stepless",scrollamount:"auto"},contenttouchscroll:25,documenttouchscroll:!0,advanced:{autoscrollonfocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateoncontentresize:!0,updateonimageload:"auto",autoupdatetimeout:60},theme:"light",callbacks:{ontotalscrolloffset:0,ontotalscrollbackoffset:0,alwaystriggeroffsets:!0}},r=0,l={},s=window.attachevent&&!window.addeventlistener?1:0,c=!1,d=["mcsb_dragger_ondrag","mcsb_scrolltools_ondrag","mcs_img_loaded","mcs_disabled","mcs_destroyed","mcs_no_scrollbar","mcs-autohide","mcs-dir-rtl","mcs_no_scrollbar_y","mcs_no_scrollbar_x","mcs_y_hidden","mcs_x_hidden","mcsb_draggercontainer","mcsb_buttonup","mcsb_buttondown","mcsb_buttonleft","mcsb_buttonright"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveselector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=settimeout(function(){c.mcustomscrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setwidth=t.set_width?t.set_width:t.setwidth,t.setheight=t.set_height?t.set_height:t.setheight,t.axis=t.horizontalscroll?"x":p(t.axis),t.scrollinertia=t.scrollinertia>0&&t.scrollinertia<17?17:t.scrollinertia,"object"!=typeof t.mousewheel&&1==t.mousewheel&&(t.mousewheel={enable:!0,scrollamount:"auto",axis:"y",preventdefault:!1,deltafactor:"auto",normalizedelta:!1,invert:!1}),t.mousewheel.scrollamount=t.mousewheelpixels?t.mousewheelpixels:t.mousewheel.scrollamount,t.mousewheel.normalizedelta=t.advanced.normalizemousewheeldelta?t.advanced.normalizemousewheeldelta:t.mousewheel.normalizedelta,t.scrollbuttons.scrolltype=g(t.scrollbuttons.scrolltype),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollratio:{y:null,x:null},overflowed:null,contentreset:{y:null,x:null},bindevents:!1,tweenrunning:!1,sequential:{},langdir:o.css("direction"),cboffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarposition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.oncreate&&"function"==typeof i.callbacks.oncreate&&i.callbacks.oncreate.call(this),e("#mcsb_"+n.idx+"_container img:not(."+d[2]+")").addclass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mcsb_"+n.idx+"_container"),l=e("#mcsb_"+n.idx),s=[e("#mcsb_"+n.idx+"_dragger_vertical"),e("#mcsb_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenrunning&&q(t),o&&n&&i.callbacks.onbeforeupdate&&"function"==typeof i.callbacks.onbeforeupdate&&i.callbacks.onbeforeupdate.call(this),t.hasclass(d[3])&&t.removeclass(d[3]),t.hasclass(d[4])&&t.removeclass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoexpandhorizontalscroll||r.css("width",x(r)),n.overflowed=y.call(this),m.call(this),i.autodraggerlength&&s.call(this),b.call(this),t.call(this);var c=[math.abs(r[0].offsettop),math.abs(r[0].offsetleft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?b.call(this):(g(t,c[0].tostring(),{dir:"y",dur:0,overwrite:"none"}),n.contentreset.y=null):(b.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&g(t,c[1].tostring(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?b.call(this):(g(t,c[1].tostring(),{dir:"x",dur:0,overwrite:"none"}),n.contentreset.x=null):(b.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&g(t,c[0].tostring(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onimageload&&"function"==typeof i.callbacks.onimageload?i.callbacks.onimageload.call(this):3===o&&i.callbacks.onselectorchange&&"function"==typeof i.callbacks.onselectorchange?i.callbacks.onselectorchange.call(this):i.callbacks.onupdate&&"function"==typeof i.callbacks.onupdate&&i.callbacks.onupdate.call(this)),n.call(this)}})},scrollto:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollinertia:r.scrollinertia,scrolleasing:"mcseaseinout",movedragger:!1,timeout:60,callbacks:!0,onstart:!0,onupdate:!0,oncomplete:!0},s=e.extend(!0,{},l,o),c=y.call(this,t),d=s.scrollinertia>0&&s.scrollinertia<17?17:s.scrollinertia;c[0]=x.call(this,c[0],"y"),c[1]=x.call(this,c[1],"x"),s.movedragger&&(c[0]*=i.scrollratio.y,c[1]*=i.scrollratio.x),s.dur=ne()?0:d,settimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",g(n,c[0].tostring(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",g(n,c[1].tostring(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);n.call(this,"remove"),k.call(this),t&&b.call(this),m.call(this,!0),o.addclass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mcsb_"+i.idx),s=e("#mcsb_"+i.idx+"_container"),c=e(".mcsb_"+i.idx+"_scrollbar");r.live&&m(r.liveselector||e(t).selector),n.call(this,"remove"),k.call(this),b.call(this),n.removedata(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeclass(d[2]),l.replacewith(s.contents()),n.removeclass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addclass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autodraggerlength=e.inarray(t.theme,o)>-1?!1:t.autodraggerlength,t.autoexpandscrollbar=e.inarray(t.theme,a)>-1?!1:t.autoexpandscrollbar,t.scrollbuttons.enable=e.inarray(t.theme,n)>-1?!1:t.scrollbuttons.enable,t.autohidescrollbar=e.inarray(t.theme,i)>-1?!0:t.autohidescrollbar,t.scrollbarposition=e.inarray(t.theme,r)>-1?"outside":t.scrollbarposition},m=function(e){l[e]&&(cleartimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoexpandscrollbar?" "+d[1]+"_expand":"",l=["
","
"],s="yx"===i.axis?"mcsb_vertical_horizontal":"x"===i.axis?"mcsb_horizontal":"mcsb_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"
":"",f=i.autohidescrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langdir?" "+d[7]:"";i.setwidth&&t.css("width",i.setwidth),i.setheight&&t.css("height",i.setheight),i.setleft="y"!==i.axis&&"rtl"===n.langdir?"989999px":i.setleft,t.addclass(o+" _"+a+"_"+n.idx+f+h).wrapinner("
");var m=e("#mcsb_"+n.idx),p=e("#mcsb_"+n.idx+"_container");"y"===i.axis||i.advanced.autoexpandhorizontalscroll||p.css("width",x(p)),"outside"===i.scrollbarposition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addclass("mcsb_outside").after(c)):(m.addclass("mcsb_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mcsb_"+n.idx+"_dragger_vertical"),e("#mcsb_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollwidth,math.max.apply(math,t.children().map(function(){return e(this).outerwidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mcsb_"+o.idx+"_container");if(n.advanced.autoexpandhorizontalscroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=math.ceil(i[0].scrollwidth);3===n.advanced.autoexpandhorizontalscroll||2!==n.advanced.autoexpandhorizontalscroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("
").css({width:math.ceil(i[0].getboundingclientrect().right+.4)-math.floor(i[0].getboundingclientrect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mcsb_"+o.idx+"_scrollbar:first"),r=oe(n.scrollbuttons.tabindex)?"tabindex='"+n.scrollbuttons.tabindex+"'":"",l=["","","",""],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollbuttons.enable&&i.prepend(s[0]).append(s[1]).next(".mcsb_scrolltools").prepend(s[2]).append(s[3])},s=function(){var t=e(this),o=t.data(a),n=e("#mcsb_"+o.idx),i=e("#mcsb_"+o.idx+"_container"),r=[e("#mcsb_"+o.idx+"_dragger_vertical"),e("#mcsb_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerheight(!1),n.width()/i.outerwidth(!1)],c=[parseint(r[0].css("min-height")),math.round(l[0]*r[0].parent().height()),parseint(r[1].css("min-width")),math.round(l[1]*r[1].parent().width())],d=s&&c[1]r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},b=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mcsb_"+o.idx),r=e("#mcsb_"+o.idx+"_container"),l=[e("#mcsb_"+o.idx+"_dragger_vertical"),e("#mcsb_"+o.idx+"_dragger_horizontal")];if(q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),g(t,"_resety")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langdir&&(s=i.width()-r.outerwidth(!1),dx=math.abs(s/o.scrollratio.x)),r.css("left",s),l[1].css("left",dx),g(t,"_resetx")}},t=function(){function t(){r=settimeout(function(){e.event.special.mousewheel?(cleartimeout(r),w.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindevents){if(i.call(this),i.contenttouchscroll&&d.call(this),e.call(this),i.mousewheel.enable){var r;t()}p.call(this),u.call(this),i.advanced.autoscrollonfocus&&h.call(this),i.scrollbuttons.enable&&f.call(this),i.keyboard.enable&&q.call(this),n.bindevents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mcsb_"+o.idx+"_scrollbar",l=e("#mcsb_"+o.idx+",#mcsb_"+o.idx+"_container,#mcsb_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mcsb_"+o.idx+"_dragger_vertical,#mcsb_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mcsb_"+o.idx+"_container");n.advanced.releasedraggableselectors&&l.add(e(n.advanced.releasedraggableselectors)),n.advanced.extradraggableselectors&&l.add(e(n.advanced.extradraggableselectors)),o.bindevents&&(e(document).add(e(!a()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),cleartimeout(t[0]._focustimeout),$(t[0],"_focustimeout"),cleartimeout(o.sequential.step),$(o.sequential,"step"),cleartimeout(s[0].oncompletetimeout),$(s[0],"oncompletetimeout"),o.bindevents=!1)},m=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mcsb_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mcsb_"+n.idx+"_container"),s=[e("#mcsb_"+n.idx+"_scrollbar_vertical"),e("#mcsb_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mcsb_dragger"),s[1].find(".mcsb_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeclass(d[8]+" "+d[10])):(i.alwaysshowscrollbar?(2!==i.alwaysshowscrollbar&&c[0].css("display","none"),l.removeclass(d[10])):(s[0].css("display","none"),l.addclass(d[10])),l.addclass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeclass(d[9]+" "+d[11])):(i.alwaysshowscrollbar?(2!==i.alwaysshowscrollbar&&c[1].css("display","none"),l.removeclass(d[11])):(s[1].css("display","none"),l.addclass(d[11])),l.addclass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeclass(d[5]):o.addclass(d[5])},o=function(t){var o=t.type,a=t.target.ownerdocument!==document&&null!==frameelement?[e(frameelement).offset().top,e(frameelement).offset().left]:null,n=a()&&t.target.ownerdocument!==top.document&&null!==frameelement?[e(t.view.frameelement).offset().top,e(t.view.frameelement).offset().left]:[0,0];switch(o){case"pointerdown":case"mspointerdown":case"pointermove":case"mspointermove":case"pointerup":case"mspointerup":return a?[t.originalevent.pagey-a[0]+n[0],t.originalevent.pagex-a[1]+n[1],!1]:[t.originalevent.pagey,t.originalevent.pagex,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalevent.touches[0]||t.originalevent.changedtouches[0],r=t.originalevent.touches.length||t.originalevent.changedtouches.length;return t.target.ownerdocument!==document?[i.screeny,i.screenx,r>1]:[i.pagey,i.pagex,r>1];default:return a?[t.pagey-a[0]+n[0],t.pagex-a[1]+n[1],!1]:[t.pagey,t.pagex,!1]}},i=function(){function t(e,t,a,n){if(h[0].idletimer=d.scrollinertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetleft-t+n)*l.scrollratio.x;else var i="y",s=(o[0].offsettop-e+a)*l.scrollratio.y;g(r,s.tostring(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mcsb_"+l.idx+"_dragger_vertical","mcsb_"+l.idx+"_dragger_horizontal"],h=e("#mcsb_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releasedraggableselectors?m.add(e(d.advanced.releasedraggableselectors)):m,g=d.advanced.extradraggableselectors?e(!a()||top.document).add(e(d.advanced.extradraggableselectors)):e(!a()||top.document);m.bind("contextmenu."+u,function(e){e.preventdefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" mspointerdown."+u,function(t){if(t.stopimmediatepropagation(),t.preventdefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),l.call(h,!1),q(r),o=e(this);var a=o.offset(),l=o(t)[0]-a.top,u=o(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),c(o,"active",d.autoexpandscrollbar)}}).bind("touchmove."+u,function(e){e.stopimmediatepropagation(),e.preventdefault();var a=o.offset(),r=o(e)[0]-a.top,l=o(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" mspointermove."+u,function(e){if(o){var a=o.offset(),r=o(e)[0]-a.top,l=o(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" mspointerup."+u,function(){o&&(c(o,"active",d.autoexpandscrollbar),o=null),c=!1,s&&(document.onselectstart=null),l.call(h,!0)})},d=function(){function o(e){if(!te(e)||c||o(e)[2])return void(t=0);t=1,b=0,c=0,d=1,y.removeclass("mcs_touch_action");var o=i.offset();u=o(e)[0]-o.top,f=o(e)[1]-o.left,z=[o(e)[0],o(e)[1]]}function n(e){if(te(e)&&!c&&!o(e)[2]&&(t.documenttouchscroll||e.preventdefault(),e.stopimmediatepropagation(),(!c||b)&&d)){g=k();var t=m.offset(),o=o(e)[0]-t.top,a=o(e)[1]-t.left,n="mcslinearout";if(e.push(o),w.push(a),z[2]=math.abs(o(e)[0]-z[0]),z[3]=math.abs(o(e)[1]-z[1]),b.overflowed[0])var i=d[0].parent().height()-d[0].height(),r=u-o>0&&o-u>-(i*b.scrollratio.y)&&(2*z[3]0&&a-f>-(l*b.scrollratio.x)&&(2*z[2]30)){_=1e3/(v-p);var n="mcseaseout",i=2.5>_,r=i?[e[e.length-2],w[w.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[math.abs(x[0]),math.abs(x[1])];_=i?[math.abs(x[0]/4),math.abs(x[1]/4)]:[_,_];var f=[math.abs(i[0].offsettop)-x[0]*l(u[0]/_[0],_[0]),math.abs(i[0].offsetleft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===t.axis?[f[0],f[1]]:"x"===t.axis?[null,f[1]]:[f[0],null],s=[4*u[0]+t.scrollinertia,4*u[1]+t.scrollinertia];var y=parseint(t.contenttouchscroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,b.overflowed[0]&&s(w[0],s[0],n,"y",l,!1),b.overflowed[1]&&s(w[1],s[1],n,"x",l,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&g(y,e.tostring(),{dur:t,scrolleasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,s,b,c,y=e(this),b=y.data(a),t=b.opt,k=a+"_"+b.idx,m=e("#mcsb_"+b.idx),i=e("#mcsb_"+b.idx+"_container"),d=[e("#mcsb_"+b.idx+"_dragger_vertical"),e("#mcsb_"+b.idx+"_dragger_horizontal")],e=[],w=[],r=0,l="yx"===t.axis?"none":"all",z=[],p=i.find("iframe"),h=["touchstart."+k+" pointerdown."+k+" mspointerdown."+k,"touchmove."+k+" pointermove."+k+" mspointermove."+k,"touchend."+k+" pointerup."+k+" mspointerup."+k],u=void 0!==document.body.style.touchaction&&""!==document.body.style.touchaction;i.bind(h[0],function(e){o(e)}).bind(h[1],function(e){n(e)}),m.bind(h[0],function(e){i(e)}).bind(h[2],function(e){r(e)}),p.length&&p.each(function(){e(this).bind("load",function(){a(this)&&e(this.contentdocument||this.contentwindow.document).bind(h[0],function(e){o(e),i(e)}).bind(h[1],function(e){n(e)}).bind(h[2],function(e){r(e)})})})},e=function(){function o(){return window.getselection?window.getselection().tostring():document.selection&&"control"!=document.selection.type?document.selection.createrange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollamount=10,j(r,e,t,"mcslinearout",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mcsb_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=o(e)[0]-a.top+f[0].offsettop,c=o(e)[1]-a.left+f[0].offsetleft;r>0&&r0&&cr?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},w=function(){function t(t,a){if(q(o),!z(o,t.target)){var r="auto"!==i.mousewheel.deltafactor?parseint(i.mousewheel.deltafactor):s&&t.deltafactor<100?100:t.deltafactor||100,d=i.scrollinertia;if("x"===i.axis||"x"===i.mousewheel.axis)var u="x",f=[math.round(r*n.scrollratio.x),parseint(i.mousewheel.scrollamount)],h="auto"!==i.mousewheel.scrollamount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=math.abs(e("#mcsb_"+n.idx+"_container")[0].offsetleft),p=c[1][0].offsetleft,g=c[1].parent().width()-c[1].width(),v="y"===i.mousewheel.axis?t.deltay||a:t.deltax;else var u="y",f=[math.round(r*n.scrollratio.y),parseint(i.mousewheel.scrollamount)],h="auto"!==i.mousewheel.scrollamount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=math.abs(e("#mcsb_"+n.idx+"_container")[0].offsettop),p=c[0][0].offsettop,g=c[0].parent().height()-c[0].height(),v=t.deltay||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mousewheel.invert||t.webkitdirectioninvertedfromdevice)&&(v=-v),i.mousewheel.normalizedelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mousewheel.preventdefault)&&(t.stopimmediatepropagation(),t.preventdefault()),t.deltafactor<5&&!i.mousewheel.normalizedelta&&(h=t.deltafactor,d=17),g(o,(m-v*h).tostring(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mcsb_"+n.idx),c=[e("#mcsb_"+n.idx+"_dragger_vertical"),e("#mcsb_"+n.idx+"_dragger_horizontal")],d=e("#mcsb_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){a(this)&&e(this.contentdocument||this.contentwindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},r=new object,a=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==r[a])return r[a];if(t){try{var i=t.contentdocument||t.contentwindow.document;n=i.body.innerhtml}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerhtml}catch(r){}o=null!==n}return a!==!1&&(r[a]=o),o},l=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodename.tolowercase(),i=t.data(a).opt.mousewheel.disableover,r=["select","textarea"];return e.inarray(n,i)>-1&&!(e.inarray(n,r)>-1&&!e(o).is(":focus"))},p=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mcsb_"+n.idx+"_container"),l=r.parent(),s=e(".mcsb_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" mspointerdown."+i,function(o){c=!0,e(o.target).hasclass("mcsb_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" mspointerup."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasclass(d[12])||e(a.target).hasclass("mcsb_draggerrail"))){q(o);var i=e(this),s=i.find(".mcsb_dragger");if(i.parent(".mcsb_scrolltools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pagex>s.offset().left?-1:1,f=math.abs(r[0].offsetleft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pagey>s.offset().top?-1:1,f=math.abs(r[0].offsettop)-u*(.9*l.height())}g(o,f.tostring(),{dir:c,scrolleasing:"mcseaseinout"})}})},h=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mcsb_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeelement),a=r.find(".mcustomscrollbox").length,i=0;o.is(n.advanced.autoscrollonfocus)&&(q(t),cleartimeout(t[0]._focustimeout),t[0]._focustimer=a?(i+17)*a:0,t[0]._focustimeout=settimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsettop,r[0].offsetleft],s=[a[0]+e[0]>=0&&a[0]+e[0]=0&&a[0]+e[1]a");s.bind("contextmenu."+r,function(e){e.preventdefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" mspointerdown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" mspointerup."+r+" mouseout."+r+" pointerout."+r+" mspointerout."+r+" click."+r,function(a){function r(e,o){i.scrollamount=n.scrollbuttons.scrollamount,j(t,e,o)}if(a.preventdefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollbuttons.scrolltype,a.type){case"mousedown":case"touchstart":case"pointerdown":case"mspointerdown":if("stepped"===i.type)return;c=!0,o.tweenrunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"mspointerup":case"mouseout":case"pointerout":case"mspointerout":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenrunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrolltype,r.scrollamount=i.keyboard.scrollamount,"stepped"===r.type&&n.tweenrunning||j(o,e,t)}switch(t.type){case"blur":n.tweenrunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keycode?t.keycode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeelement).is(u)||(t.preventdefault(),t.stopimmediatepropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventdefault(),t.stopimmediatepropagation()),"keyup"===t.type){q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=math.abs(c[0].offsetleft)-f*(.9*d.width());else var h="y",m=math.abs(c[0].offsettop)-f*(.9*d.height());g(o,m.tostring(),{dir:h,scrolleasing:"mcseaseinout"})}}else if((35===l||36===l)&&!e(document.activeelement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventdefault(),t.stopimmediatepropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?math.abs(d.width()-c.outerwidth(!1)):0;else var h="y",m=35===l?math.abs(d.height()-c.outerheight(!1)):0;g(o,m.tostring(),{dir:h,scrolleasing:"mcseaseinout"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mcsb_"+n.idx),c=e("#mcsb_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){a(this)&&e(this.contentdocument||this.contentwindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapamount&&(f.scrollamount=u.snapamount instanceof array?"x"===f.dir[0]?u.snapamount[1]:u.snapamount[0]:u.snapamount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[math.abs(h[0].offsettop),math.abs(h[0].offsetleft)],d=[c.scrollratio.y>10?10:c.scrollratio.y,c.scrollratio.x>10?10:c.scrollratio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseint(f.scrollamount):s[0]+f.dir[1]*parseint(f.scrollamount),x="auto"!==f.scrollamount?v:m,_=i?i:e?o?"mcslinearout":"mcseaseinout":"mcslinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),g(t,x.tostring(),{dir:f.dir[0],scrolleasing:_,dur:a,oncomplete:w}),e?void(f.dir=!1):(cleartimeout(f.step),void(f.step=settimeout(function(){l()},a)))}function s(){cleartimeout(f.step),$(f,"step"),q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mcsb_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollinertia<26?26:u.scrollinertia,g=u.scrollinertia<1?17:u.scrollinertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenrunning&&f.dir)&&l(!0)}},y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},x=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mcsb_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerwidth(!1)-s.width():l.outerheight(!1)-s.height(),f="x"===o?l[0].offsetleft:l[0].offsettop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return math.abs(t);if(-1!==t.indexof("%"))return math.abs(d*parseint(t)/100);if(-1!==t.indexof("-="))return math.abs(f-parseint(t.split("-=")[1]));if(-1!==t.indexof("+=")){var p=f+parseint(t.split("+=")[1]);return p>=0?0:math.abs(p)}if(-1!==t.indexof("px")&&oe(t.split("px")[0]))return math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return math.abs(s.height()-l.outerheight(!1));if("right"===t)return math.abs(s.width()-l.outerwidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},n=function(t){function o(){return cleartimeout(f[0].autoupdate),0===l.parents("html").length?void(l=null):void(f[0].autoupdate=settimeout(function(){return c.advanced.updateonselectorchange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateoncontentresize&&(s.poll.size.n=l[0].scrollheight+l[0].scrollwidth+f[0].offsetheight+l[0].offsetheight+l[0].offsetwidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateonimageload||"auto"===c.advanced.updateonimageload&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateonselectorchange||c.advanced.updateoncontentresize||c.advanced.updateonimageload)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoupdatetimeout))}function n(t){function o(e,t){return function(){ return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addclass(d[2]),r(2)}if(e(t).hasclass(d[2]))return void r();var n=new image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateonselectorchange===!0&&(c.advanced.updateonselectorchange="*");var e=0,t=f.find(c.advanced.updateonselectorchange);return c.advanced.updateonselectorchange&&t.length>0&&t.each(function(){e+=this.offsetheight+this.offsetwidth}),e}function r(e){cleartimeout(f[0].autoupdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mcsb_"+s.idx+"_container");return t?(cleartimeout(f[0].autoupdate),void $(f[0],"autoupdate")):void o()},v=function(e,t,o){return math.round(e/t)*t-o},q=function(t){var o=t.data(a),n=e("#mcsb_"+o.idx+"_container,#mcsb_"+o.idx+"_container_wrapper,#mcsb_"+o.idx+"_dragger_vertical,#mcsb_"+o.idx+"_dragger_horizontal");n.each(function(){z.call(this)})},g=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaystriggeroffsets||w>=s[0]+y,c.callbacks.alwaystriggeroffsets||-b>=w]}function l(){var e=[h[0].offsettop,h[0].offsetleft],o=[x[0].offsettop,x[0].offsetleft],a=[h.outerheight(!1),h.outerwidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggertop:o[0],draggerleft:o[1],toppct:math.round(100*math.abs(e[0])/(math.abs(a[0])-i[0])),leftpct:math.round(100*math.abs(e[1])/(math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrolleasing:"mcseaseout",drag:!1,dur:c.scrollinertia,overwrite:"all",callbacks:!0,onstart:!0,onupdate:!0,oncomplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mcsb_"+s.idx),h=e("#mcsb_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.ontotalscrolloffset?y.call(t,c.callbacks.ontotalscrolloffset):[0,0],g=c.callbacks.ontotalscrollbackoffset?y.call(t,c.callbacks.ontotalscrollbackoffset):[0,0];if(s.trigger=n.trigger,0===m.scrolltop()&&0===m.scrollleft()||(e(".mcsb_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrolltop(0).scrollleft(0)),"_resety"!==o||s.contentreset.y||(i("onoverflowynone")&&c.callbacks.onoverflowynone.call(t[0]),s.contentreset.y=1),"_resetx"!==o||s.contentreset.x||(i("onoverflowxnone")&&c.callbacks.onoverflowxnone.call(t[0]),s.contentreset.x=1),"_resety"!==o&&"_resetx"!==o){if(!s.contentreset.y&&t[0].mcs||!s.overflowed[0]||(i("onoverflowy")&&c.callbacks.onoverflowy.call(t[0]),s.contentreset.x=null),!s.contentreset.x&&t[0].mcs||!s.overflowed[1]||(i("onoverflowx")&&c.callbacks.onoverflowx.call(t[0]),s.contentreset.x=null),c.snapamount){var v=c.snapamount instanceof array?"x"===n.dir?c.snapamount[1]:c.snapamount[0]:c.snapamount;o=v(o,v,c.snapoffset)}switch(n.dir){case"x":var x=e("#mcsb_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetleft,s=[f.width()-h.outerwidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollratio.x],y=p[1],b=g[1],t=y>0?y/s.scrollratio.x:0,k=b>0?b/s.scrollratio.x:0;break;case"y":var x=e("#mcsb_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsettop,s=[f.height()-h.outerheight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollratio.y],y=p[0],b=g[0],t=y>0?y/s.scrollratio.y:0,k=b>0?b/s.scrollratio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=s[1]?b=[s[0],s[1]]:b[0]=-b[0],t[0].mcs||(l(),i("oninit")&&c.callbacks.oninit.call(t[0])),cleartimeout(h[0].oncompletetimeout),j(x[0],_,math.round(b[1]),u[1],n.scrolleasing),!s.tweenrunning&&(0===w&&b[0]>=0||w===s[0]&&b[0]<=s[0])||j(h[0],_,math.round(b[0]),u[0],n.scrolleasing,n.overwrite,{onstart:function(){n.callbacks&&n.onstart&&!s.tweenrunning&&(i("onscrollstart")&&(l(),c.callbacks.onscrollstart.call(t[0])),s.tweenrunning=!0,c(x),s.cboffsets=r())},onupdate:function(){n.callbacks&&n.onupdate&&i("whilescrolling")&&(l(),c.callbacks.whilescrolling.call(t[0]))},oncomplete:function(){if(n.callbacks&&n.oncomplete){"yx"===c.axis&&cleartimeout(h[0].oncompletetimeout);var e=h[0].idletimer||0;h[0].oncompletetimeout=settimeout(function(){i("onscroll")&&(l(),c.callbacks.onscroll.call(t[0])),i("ontotalscroll")&&b[1]>=s[1]-t&&s.cboffsets[0]&&(l(),c.callbacks.ontotalscroll.call(t[0])),i("ontotalscrollback")&&b[1]<=k&&s.cboffsets[1]&&(l(),c.callbacks.ontotalscrollback.call(t[0])),s.tweenrunning=!1,h[0].idletimer=0,c(x,"hide")},e)}}})}},j=function(e,t,o,a,n,i,r){function l(){s.stop||(x||m.call(),x=k()-v,s(),x>=s.time&&(s.time=x>s.time?x+f-(x-s.time):x+f-1,s.time0?(s.currval=u(s.time,_,b,a,n),w[t]=math.round(s.currval)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,s.time=x+f,h=window.requestanimationframe?window.requestanimationframe:function(e){return s(),settimeout(e,.01)},s.id=h(l)}function d(){null!=s.id&&(window.requestanimationframe?window.cancelanimationframe(s.id):cleartimeout(s.id),s.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcslinear":return o*e/a+t;case"mcslinearout":return e/=a,e--,o*math.sqrt(1-e*e)+t;case"easeinoutsmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeinoutstrong":return e/=a/2,1>e?o/2*math.pow(2,10*(e-1))+t:(e--,o/2*(-math.pow(2,-10*e)+2)+t);case"easeinout":case"mcseaseinout":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeoutsmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeoutstrong":return o*(-math.pow(2,-10*e/a)+1)+t;case"easeout":case"mcseaseout":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mtween||(e._mtween={top:{},left:{}});var f,h,r=r||{},m=r.onstart||function(){},p=r.onupdate||function(){},g=r.oncomplete||function(){},v=k(),x=0,_=e.offsettop,w=e.style,s=e._mtween[t];"left"===t&&(_=e.offsetleft);var b=o-_;s.stop=0,"none"!==i&&d(),c()},k=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitnow?window.performance.webkitnow():date.now?date.now():(new date).gettime()},z=function(){var e=this;e._mtween||(e._mtween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&a[0]+ae(n)[0]=0&&a[1]+ae(n)[1]=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsoverflow:e.expr[":"].mcsoverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}); /*! * touchslide v1.1 * javascript触屏滑动特效插件,移动端滑动特效,触屏焦点图,触屏tab切换,触屏多图切换等 * 详尽信息请看官网:http://www.superslide2.com/touchslide/ * * copyright 2013 大话主席 * * 请尊重原创,保留头部版权 * 在保留版权的前提下可应用于个人或商业用途 * 1.1 宽度自适应(修复安卓横屏时滑动范围不变的bug) */ var touchslide=function(a){a=a||{};var b={slidecell:a.slidecell||"#touchslide",titcell:a.titcell||".hd li",maincell:a.maincell||".bd",effect:a.effect||"left",autoplay:a.autoplay||!1,delaytime:a.delaytime||200,intertime:a.intertime||2500,defaultindex:a.defaultindex||0,titonclassname:a.titonclassname||"on",autopage:a.autopage||!1,prevcell:a.prevcell||".prev",nextcell:a.nextcell||".next",pagestatecell:a.pagestatecell||".pagestate",pnloop:"undefined "==a.pnloop?!0:a.pnloop,startfun:a.startfun||null,endfun:a.endfun||null,switchload:a.switchload||null},c=document.getelementbyid(b.slidecell.replace("#",""));if(!c)return!1;var d=function(a,b){a=a.split(" ");var c=[];b=b||document;var d=[b];for(var e in a)0!=a[e].length&&c.push(a[e]);for(var e in c){if(0==d.length)return!1;var f=[];for(var g in d)if("#"==c[e][0])f.push(document.getelementbyid(c[e].replace("#","")));else if("."==c[e][0])for(var h=d[g].getelementsbytagname("*"),i=0;ir;r++)q+="
  • "+(r+1)+"
  • ";else for(var r=0;p>r;r++)q+=b.autopage.replace("$",r+1);o.innerhtml=q,o=o.children}"leftloop"==i&&(p+=2,m.appendchild(m.children[0].clonenode(!0)),m.insertbefore(m.children[n-1].clonenode(!0),m.children[0])),n=e(m,'
    '),m.style.csstext="width:"+p*m+"px;"+"position:relative;overflow:hidden;padding:0;margin:0;";for(var r=0;p>r;r++)m.children[r].style.csstext="display:table-cell;vertical-align:top;width:"+m+"px";var s=function(){"function"==typeof b.startfun&&b.startfun(r,p)},t=function(){"function"==typeof b.endfun&&b.endfun(r,p)},u=function(a){var b=("leftloop"==i?r+1:r)+a,c=function(a){for(var b=m.children[a].getelementsbytagname("img"),c=0;ca;a++)m.children[a].style.width=m+"px";var b="leftloop"==i?r+1:r;w(-b*m,0)};window.addeventlistener("resize",v,!1);var w=function(a,b,c){c=c?c.style:m.style,c.webkittransitionduration=c.moztransitionduration=c.mstransitionduration=c.otransitionduration=c.transitionduration=b+"ms",c.webkittransform="translate("+a+"px,0)"+"translatez(0)",c.mstransform=c.moztransform=c.otransform="translatex("+a+"px)"},x=function(a){switch(i){case"left":r>=p?r=a?r-1:0:0>r&&(r=a?0:p-1),null!=q&&u(0),w(-r*m,s),x=r;break;case"leftloop":null!=q&&u(0),w(-(r+1)*m,s),-1==r?(z=settimeout(function(){w(-p*m,0)},s),r=p-1):r==p&&(z=settimeout(function(){w(-m,0)},s),r=0),x=r}s(),a=settimeout(function(){t()},s);for(var c=0;p>c;c++)h(o[c],b.titonclassname),c==r&&g(o[c],b.titonclassname);0==w&&(h(k,"nextstop"),h(j,"prevstop"),0==r?g(j,"prevstop"):r==p-1&&g(k,"nextstop")),l&&(l.innerhtml=""+(r+1)+"/"+p)};if(x(),u&&(y=setinterval(function(){r++,x()},t)),o)for(var r=0;p>r;r++)!function(){var a=r;o[a].addeventlistener("click",function(){cleartimeout(z),cleartimeout(a),r=a,x()})}();k&&k.addeventlistener("click",function(){(1==w||r!=p-1)&&(cleartimeout(z),cleartimeout(a),r++,x())}),j&&j.addeventlistener("click",function(){(1==w||0!=r)&&(cleartimeout(z),cleartimeout(a),r--,x())});var y=function(a){cleartimeout(z),cleartimeout(a),o=void 0,d=0;var b=h?a.touches[0]:a;b=b.pagex,c=b.pagey,m.addeventlistener(j,z,!1),m.addeventlistener(k,$,!1)},z=function(a){if(!h||!(a.touches.length>1||a.scale&&1!==a.scale)){var b=h?a.touches[0]:a;if(d=b.pagex-b,e=b.pagey-c,"undefined"==typeof o&&(o=!!(o||math.abs(d)0||r>=p-1&&0>d)&&(d=.4*d),w(-r*m+d,0);break;case"leftloop":w(-(r+1)*m+d,0)}null!=q&&math.abs(d)>m/3&&u(d>-0?-1:1)}}},$=function(a){0!=d&&(a.preventdefault(),o||(math.abs(d)>m/10&&(d>0?r--:r++),x(!0),u&&(y=setinterval(function(){r++,x()},t))),m.removeeventlistener(j,z,!1),m.removeeventlistener(k,$,!1))};m.addeventlistener(i,y,!1)}; /*iscroll*/ (function(window,document,math){var raf=window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||window.orequestanimationframe||window.msrequestanimationframe||function(callback){window.settimeout(callback,1000/60)};var utils=(function(){var me={};var _elementstyle=document.createelement('div').style;var _vendor=(function(){var vendors=['t','webkitt','mozt','mst','ot'],transform,i=0,l=vendors.length;for(;i0){destination=wrappersize?wrappersize/2.5*(speed/8):0;distance=math.abs(current)+destination;duration=distance/speed}return{destination:math.round(destination),duration:duration}};var _transform=_prefixstyle('transform');me.extend(me,{hastransform:_transform!==false,hasperspective:_prefixstyle('perspective')in _elementstyle,hastouch:'ontouchstart'in window,haspointer:!!(window.pointerevent||window.mspointerevent),hastransition:_prefixstyle('transition')in _elementstyle});me.isbadandroid=(function(){var appversion=window.navigator.appversion;if(/android/.test(appversion)&&!(/chrome\/\d/.test(appversion))){var safariversion=appversion.match(/safari\/(\d+.\d)/);if(safariversion&&typeof safariversion==="object"&&safariversion.length>=2){return parsefloat(safariversion[1])<535.19}else{return true}}else{return false}})();me.extend(me.style={},{transform:_transform,transitiontimingfunction:_prefixstyle('transitiontimingfunction'),transitionduration:_prefixstyle('transitionduration'),transitiondelay:_prefixstyle('transitiondelay'),transformorigin:_prefixstyle('transformorigin')});me.hasclass=function(e,c){var re=new regexp("(^|\\s)"+c+"(\\s|$)");return re.test(e.classname)};me.addclass=function(e,c){if(me.hasclass(e,c)){return}var newclass=e.classname.split(' ');newclass.push(c);e.classname=newclass.join(' ')};me.removeclass=function(e,c){if(!me.hasclass(e,c)){return}var re=new regexp("(^|\\s)"+c+"(\\s|$)",'g');e.classname=e.classname.replace(re,' ')};me.offset=function(el){var left=-el.offsetleft,top=-el.offsettop;while(el=el.offsetparent){left-=el.offsetleft;top-=el.offsettop}return{left:left,top:top}};me.preventdefaultexception=function(el,exceptions){for(var i in exceptions){if(exceptions[i].test(el[i])){return true}}return false};me.extend(me.eventtype={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,mspointerdown:3,mspointermove:3,mspointerup:3});me.extend(me.ease={},{quadratic:{style:'cubic-bezier(0.25, 0.46, 0.45, 0.94)',fn:function(k){return k*(2-k)}},circular:{style:'cubic-bezier(0.1, 0.57, 0.1, 1)',fn:function(k){return math.sqrt(1-(--k*k))}},back:{style:'cubic-bezier(0.175, 0.885, 0.32, 1.275)',fn:function(k){var b=4;return(k=k-1)*k*((b+1)*k+b)+1}},bounce:{style:'',fn:function(k){if((k/=1)<(1/2.75)){return 7.5625*k*k}else if(k<(2/2.75)){return 7.5625*(k-=(1.5/2.75))*k+0.75}else if(k<(2.5/2.75)){return 7.5625*(k-=(2.25/2.75))*k+0.9375}else{return 7.5625*(k-=(2.625/2.75))*k+0.984375}}},elastic:{style:'',fn:function(k){var f=0.22,e=0.4;if(k===0){return 0}if(k==1){return 1}return(e*math.pow(2,-10*k)*math.sin((k-f/4)*(2*math.pi)/f)+1)}}});me.tap=function(e,eventname){var ev=document.createevent('event');ev.initevent(eventname,true,true);ev.pagex=e.pagex;ev.pagey=e.pagey;e.target.dispatchevent(ev)};me.click=function(e){var target=e.target,ev;if(!(/(select|input|textarea)/i).test(target.tagname)){ev=document.createevent(window.mouseevent?'mouseevents':'event');ev.initevent('click',true,true);ev.view=e.view||window;ev.detail=1;ev.screenx=target.screenx||0;ev.screeny=target.screeny||0;ev.clientx=target.clientx||0;ev.clienty=target.clienty||0;ev.ctrlkey=!!e.ctrlkey;ev.altkey=!!e.altkey;ev.shiftkey=!!e.shiftkey;ev.metakey=!!e.metakey;ev.button=0;ev.relatedtarget=null;ev._constructed=true;target.dispatchevent(ev)}};return me})();function iscroll(el,options){this.wrapper=typeof el=='string'?document.queryselector(el):el;this.scroller=this.wrapper.children[0];this.scrollerstyle=this.scroller.style;this.options={resizescrollbars:true,mousewheelspeed:20,snapthreshold:0.334,disablepointer:!utils.haspointer,disabletouch:utils.haspointer||!utils.hastouch,disablemouse:utils.haspointer||utils.hastouch,startx:0,starty:0,scrolly:true,directionlockthreshold:5,momentum:true,bounce:true,bouncetime:600,bounceeasing:'',preventdefault:true,preventdefaultexception:{tagname:/^(input|textarea|button|select)$/},hwcompositing:true,usetransition:true,usetransform:true,bindtowrapper:typeof window.onmousedown==="undefined"};for(var i in options){this.options[i]=options[i]}this.translatez=this.options.hwcompositing&&utils.hasperspective?' translatez(0)':'';this.options.usetransition=utils.hastransition&&this.options.usetransition;this.options.usetransform=utils.hastransform&&this.options.usetransform;this.options.eventpassthrough=this.options.eventpassthrough===true?'vertical':this.options.eventpassthrough;this.options.preventdefault=!this.options.eventpassthrough&&this.options.preventdefault;this.options.scrolly=this.options.eventpassthrough=='vertical'?false:this.options.scrolly;this.options.scrollx=this.options.eventpassthrough=='horizontal'?false:this.options.scrollx;this.options.freescroll=this.options.freescroll&&!this.options.eventpassthrough;this.options.directionlockthreshold=this.options.eventpassthrough?0:this.options.directionlockthreshold;this.options.bounceeasing=typeof this.options.bounceeasing=='string'?utils.ease[this.options.bounceeasing]||utils.ease.circular:this.options.bounceeasing;this.options.resizepolling=this.options.resizepolling===undefined?60:this.options.resizepolling;if(this.options.tap===true){this.options.tap='tap'}if(!this.options.usetransition&&!this.options.usetransform){if(!(/relative|absolute/i).test(this.scrollerstyle.position)){this.scrollerstyle.position="relative"}}if(this.options.shrinkscrollbars=='scale'){this.options.usetransition=false}this.options.invertwheeldirection=this.options.invertwheeldirection?-1:1;this.x=0;this.y=0;this.directionx=0;this.directiony=0;this._events={};this._init();this.refresh();this.scrollto(this.options.startx,this.options.starty);this.enable()}iscroll.prototype={version:'5.2.0',_init:function(){this._initevents();if(this.options.scrollbars||this.options.indicators){this._initindicators()}if(this.options.mousewheel){this._initwheel()}if(this.options.snap){this._initsnap()}if(this.options.keybindings){this._initkeys()}},destroy:function(){this._initevents(true);cleartimeout(this.resizetimeout);this.resizetimeout=null;this._execevent('destroy')},_transitionend:function(e){if(e.target!=this.scroller||!this.isintransition){return}this._transitiontime();if(!this.resetposition(this.options.bouncetime)){this.isintransition=false;this._execevent('scrollend')}},_start:function(e){if(utils.eventtype[e.type]!=1){var button;if(!e.which){button=(e.button<2)?0:((e.button==4)?1:2)}else{button=e.button}if(button!==0){return}}if(!this.enabled||(this.initiated&&utils.eventtype[e.type]!==this.initiated)){return}if(this.options.preventdefault&&!utils.isbadandroid&&!utils.preventdefaultexception(e.target,this.options.preventdefaultexception)){e.preventdefault()}var point=e.touches?e.touches[0]:e,pos;this.initiated=utils.eventtype[e.type];this.moved=false;this.distx=0;this.disty=0;this.directionx=0;this.directiony=0;this.directionlocked=0;this.starttime=utils.gettime();if(this.options.usetransition&&this.isintransition){this._transitiontime();this.isintransition=false;pos=this.getcomputedposition();this._translate(math.round(pos.x),math.round(pos.y));this._execevent('scrollend')}else if(!this.options.usetransition&&this.isanimating){this.isanimating=false;this._execevent('scrollend')}this.startx=this.x;this.starty=this.y;this.absstartx=this.x;this.absstarty=this.y;this.pointx=point.pagex;this.pointy=point.pagey;this._execevent('beforescrollstart')},_move:function(e){if(!this.enabled||utils.eventtype[e.type]!==this.initiated){return}if(this.options.preventdefault){e.preventdefault()}var point=e.touches?e.touches[0]:e,deltax=point.pagex-this.pointx,deltay=point.pagey-this.pointy,timestamp=utils.gettime(),newx,newy,absdistx,absdisty;this.pointx=point.pagex;this.pointy=point.pagey;this.distx+=deltax;this.disty+=deltay;absdistx=math.abs(this.distx);absdisty=math.abs(this.disty);if(timestamp-this.endtime>300&&(absdistx<10&&absdisty<10)){return}if(!this.directionlocked&&!this.options.freescroll){if(absdistx>absdisty+this.options.directionlockthreshold){this.directionlocked='h'}else if(absdisty>=absdistx+this.options.directionlockthreshold){this.directionlocked='v'}else{this.directionlocked='n'}}if(this.directionlocked=='h'){if(this.options.eventpassthrough=='vertical'){e.preventdefault()}else if(this.options.eventpassthrough=='horizontal'){this.initiated=false;return}deltay=0}else if(this.directionlocked=='v'){if(this.options.eventpassthrough=='horizontal'){e.preventdefault()}else if(this.options.eventpassthrough=='vertical'){this.initiated=false;return}deltax=0}deltax=this.hashorizontalscroll?deltax:0;deltay=this.hasverticalscroll?deltay:0;newx=this.x+deltax;newy=this.y+deltay;if(newx>0||newx0?0:this.maxscrollx}if(newy>0||newy0?0:this.maxscrolly}this.directionx=deltax>0?-1:deltax<0?1:0;this.directiony=deltay>0?-1:deltay<0?1:0;if(!this.moved){this._execevent('scrollstart')}this.moved=true;this._translate(newx,newy);if(timestamp-this.starttime>300){this.starttime=timestamp;this.startx=this.x;this.starty=this.y}},_end:function(e){if(!this.enabled||utils.eventtype[e.type]!==this.initiated){return}if(this.options.preventdefault&&!utils.preventdefaultexception(e.target,this.options.preventdefaultexception)){e.preventdefault()}var point=e.changedtouches?e.changedtouches[0]:e,momentumx,momentumy,duration=utils.gettime()-this.starttime,newx=math.round(this.x),newy=math.round(this.y),distancex=math.abs(newx-this.startx),distancey=math.abs(newy-this.starty),time=0,easing='';this.isintransition=0;this.initiated=0;this.endtime=utils.gettime();if(this.resetposition(this.options.bouncetime)){return}this.scrollto(newx,newy);if(!this.moved){if(this.options.tap){utils.tap(e,this.options.tap)}if(this.options.click){utils.click(e)}this._execevent('scrollcancel');return}if(this._events.flick&&duration<200&&distancex<100&&distancey<100){this._execevent('flick');return}if(this.options.momentum&&duration<300){momentumx=this.hashorizontalscroll?utils.momentum(this.x,this.startx,duration,this.maxscrollx,this.options.bounce?this.wrapperwidth:0,this.options.deceleration):{destination:newx,duration:0};momentumy=this.hasverticalscroll?utils.momentum(this.y,this.starty,duration,this.maxscrolly,this.options.bounce?this.wrapperheight:0,this.options.deceleration):{destination:newy,duration:0};newx=momentumx.destination;newy=momentumy.destination;time=math.max(momentumx.duration,momentumy.duration);this.isintransition=1}if(this.options.snap){var snap=this._nearestsnap(newx,newy);this.currentpage=snap;time=this.options.snapspeed||math.max(math.max(math.min(math.abs(newx-snap.x),1000),math.min(math.abs(newy-snap.y),1000)),300);newx=snap.x;newy=snap.y;this.directionx=0;this.directiony=0;easing=this.options.bounceeasing}if(newx!=this.x||newy!=this.y){if(newx>0||newx0||newy0){x=0}else if(this.x0){y=0}else if(this.y-1){this._events[type].splice(index,1)}},_execevent:function(type){if(!this._events[type]){return}var i=0,l=this._events[type].length;if(!l){return}for(;i0;var transitiontype=this.options.usetransition&&easing.style;if(!time||transitiontype){if(transitiontype){this._transitiontimingfunction(easing.style);this._transitiontime(time)}this._translate(x,y)}else{this._animate(x,y,time,easing.fn)}},scrolltoelement:function(el,time,offsetx,offsety,easing){el=el.nodetype?el:this.scroller.queryselector(el);if(!el){return}var pos=utils.offset(el);pos.left-=this.wrapperoffset.left;pos.top-=this.wrapperoffset.top;if(offsetx===true){offsetx=math.round(el.offsetwidth/2-this.wrapper.offsetwidth/2)}if(offsety===true){offsety=math.round(el.offsetheight/2-this.wrapper.offsetheight/2)}pos.left-=offsetx||0;pos.top-=offsety||0;pos.left=pos.left>0?0:pos.left0?0:pos.top0){newx--}else if(wheeldeltax<0){newx++}if(wheeldeltay>0){newy--}else if(wheeldeltay<0){newy++}this.gotopage(newx,newy);return}newx=this.x+math.round(this.hashorizontalscroll?wheeldeltax:0);newy=this.y+math.round(this.hasverticalscroll?wheeldeltay:0);this.directionx=wheeldeltax>0?-1:wheeldeltax<0?1:0;this.directiony=wheeldeltay>0?-1:wheeldeltay<0?1:0;if(newx>0){newx=0}else if(newx0){newy=0}else if(newy-this.scrollerwidth){this.pages[i]=[];l=0;y=0;while(y>-this.scrollerheight){this.pages[i][l]={x:math.max(x,this.maxscrollx),y:math.max(y,this.maxscrolly),width:stepx,height:stepy,cx:x-cx,cy:y-cy};y-=stepy;l++}x-=stepx;i++}}else{el=this.options.snap;l=el.length;n=-1;for(;ithis.maxscrollx){m++}}}this.gotopage(this.currentpage.pagex||0,this.currentpage.pagey||0,0);if(this.options.snapthreshold%1===0){this.snapthresholdx=this.options.snapthreshold;this.snapthresholdy=this.options.snapthreshold}else{this.snapthresholdx=math.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].width*this.options.snapthreshold);this.snapthresholdy=math.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].height*this.options.snapthreshold)}});this.on('flick',function(){var time=this.options.snapspeed||math.max(math.max(math.min(math.abs(this.x-this.startx),1000),math.min(math.abs(this.y-this.starty),1000)),300);this.gotopage(this.currentpage.pagex+this.directionx,this.currentpage.pagey+this.directiony,time)})},_nearestsnap:function(x,y){if(!this.pages.length){return{x:0,y:0,pagex:0,pagey:0}}var i=0,l=this.pages.length,m=0;if(math.abs(x-this.absstartx)0){x=0}else if(x0){y=0}else if(y=this.pages[i][0].cx){x=this.pages[i][0].x;break}}l=this.pages[i].length;for(;m=this.pages[0][m].cy){y=this.pages[0][m].y;break}}if(i==this.currentpage.pagex){i+=this.directionx;if(i<0){i=0}else if(i>=this.pages.length){i=this.pages.length-1}x=this.pages[i][0].x}if(m==this.currentpage.pagey){m+=this.directiony;if(m<0){m=0}else if(m>=this.pages[0].length){m=this.pages[0].length-1}y=this.pages[0][m].y}return{x:x,y:y,pagex:i,pagey:m}},gotopage:function(x,y,time,easing){easing=easing||this.options.bounceeasing;if(x>=this.pages.length){x=this.pages.length-1}else if(x<0){x=0}if(y>=this.pages[x].length){y=this.pages[x].length-1}else if(y<0){y=0}var posx=this.pages[x][y].x,posy=this.pages[x][y].y;time=time===undefined?this.options.snapspeed||math.max(math.max(math.min(math.abs(posx-this.x),1000),math.min(math.abs(posy-this.y),1000)),300):time;this.currentpage={x:posx,y:posy,pagex:x,pagey:y};this.scrollto(posx,posy,time,easing)},next:function(time,easing){var x=this.currentpage.pagex,y=this.currentpage.pagey;x++;if(x>=this.pages.length&&this.hasverticalscroll){x=0;y++}this.gotopage(x,y,time,easing)},prev:function(time,easing){var x=this.currentpage.pagex,y=this.currentpage.pagey;x--;if(x<0&&this.hasverticalscroll){x=0;y--}this.gotopage(x,y,time,easing)},_initkeys:function(e){var keys={pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40};var i;if(typeof this.options.keybindings=='object'){for(i in this.options.keybindings){if(typeof this.options.keybindings[i]=='string'){this.options.keybindings[i]=this.options.keybindings[i].touppercase().charcodeat(0)}}}else{this.options.keybindings={}}for(i in keys){this.options.keybindings[i]=this.options.keybindings[i]||keys[i]}utils.addevent(window,'keydown',this);this.on('destroy',function(){utils.removeevent(window,'keydown',this)})},_key:function(e){if(!this.enabled){return}var snap=this.options.snap,newx=snap?this.currentpage.pagex:this.x,newy=snap?this.currentpage.pagey:this.y,now=utils.gettime(),prevtime=this.keytime||0,acceleration=0.250,pos;if(this.options.usetransition&&this.isintransition){pos=this.getcomputedposition();this._translate(math.round(pos.x),math.round(pos.y));this.isintransition=false}this.keyacceleration=now-prevtime<200?math.min(this.keyacceleration+acceleration,50):0;switch(e.keycode){case this.options.keybindings.pageup:if(this.hashorizontalscroll&&!this.hasverticalscroll){newx+=snap?1:this.wrapperwidth}else{newy+=snap?1:this.wrapperheight}break;case this.options.keybindings.pagedown:if(this.hashorizontalscroll&&!this.hasverticalscroll){newx-=snap?1:this.wrapperwidth}else{newy-=snap?1:this.wrapperheight}break;case this.options.keybindings.end:newx=snap?this.pages.length-1:this.maxscrollx;newy=snap?this.pages[0].length-1:this.maxscrolly;break;case this.options.keybindings.home:newx=0;newy=0;break;case this.options.keybindings.left:newx+=snap?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.up:newy+=snap?1:5+this.keyacceleration>>0;break;case this.options.keybindings.right:newx-=snap?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.down:newy-=snap?1:5+this.keyacceleration>>0;break;default:return}if(snap){this.gotopage(newx,newy);return}if(newx>0){newx=0;this.keyacceleration=0}else if(newx0){newy=0;this.keyacceleration=0}else if(newy=desttime){that.isanimating=false;that._translate(destx,desty);if(!that.resetposition(that.options.bouncetime)){that._execevent('scrollend')}return}now=(now-starttime)/duration;easing=easingfn(now);newx=(destx-startx)*easing+startx;newy=(desty-starty)*easing+starty;that._translate(newx,newy);if(that.isanimating){raf(step)}}this.isanimating=true;step()},handleevent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'mspointerdown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'mspointermove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'mspointerup':case'mouseup':case'touchcancel':case'pointercancel':case'mspointercancel':case'mousecancel':this._end(e);break;case'orientationchange':case'resize':this._resize();break;case'transitionend':case'webkittransitionend':case'otransitionend':case'mstransitionend':this._transitionend(e);break;case'wheel':case'dommousescroll':case'mousewheel':this._wheel(e);break;case'keydown':this._key(e);break;case'click':if(this.enabled&&!e._constructed){e.preventdefault();e.stoppropagation()}break}}};function createdefaultscrollbar(direction,interactive,type){var scrollbar=document.createelement('div'),indicator=document.createelement('div');if(type===true){scrollbar.style.csstext='position:absolute;z-index:9999';indicator.style.csstext='-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px'}indicator.classname='iscrollindicator';if(direction=='h'){if(type===true){scrollbar.style.csstext+=';height:7px;left:2px;right:2px;bottom:0';indicator.style.height='100%'}scrollbar.classname='iscrollhorizontalscrollbar'}else{if(type===true){scrollbar.style.csstext+=';width:7px;bottom:2px;top:2px;right:1px';indicator.style.width='100%'}scrollbar.classname='iscrollverticalscrollbar'}scrollbar.style.csstext+=';overflow:hidden';if(!interactive){scrollbar.style.pointerevents='none'}scrollbar.appendchild(indicator);return scrollbar}function indicator(scroller,options){this.wrapper=typeof options.el=='string'?document.queryselector(options.el):options.el;this.wrapperstyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorstyle=this.indicator.style;this.scroller=scroller;this.options={listenx:true,listeny:true,interactive:false,resize:true,defaultscrollbars:false,shrink:false,fade:false,speedratiox:0,speedratioy:0};for(var i in options){this.options[i]=options[i]}this.sizeratiox=1;this.sizeratioy=1;this.maxposx=0;this.maxposy=0;if(this.options.interactive){if(!this.options.disabletouch){utils.addevent(this.indicator,'touchstart',this);utils.addevent(window,'touchend',this)}if(!this.options.disablepointer){utils.addevent(this.indicator,utils.prefixpointerevent('pointerdown'),this);utils.addevent(window,utils.prefixpointerevent('pointerup'),this)}if(!this.options.disablemouse){utils.addevent(this.indicator,'mousedown',this);utils.addevent(window,'mouseup',this)}}if(this.options.fade){this.wrapperstyle[utils.style.transform]=this.scroller.translatez;var durationprop=utils.style.transitionduration;if(!durationprop){return}this.wrapperstyle[durationprop]=utils.isbadandroid?'0.0001ms':'0ms';var self=this;if(utils.isbadandroid){raf(function(){if(self.wrapperstyle[durationprop]==='0.0001ms'){self.wrapperstyle[durationprop]='0s'}})}this.wrapperstyle.opacity='0'}}indicator.prototype={handleevent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'mspointerdown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'mspointermove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'mspointerup':case'mouseup':case'touchcancel':case'pointercancel':case'mspointercancel':case'mousecancel':this._end(e);break}},destroy:function(){if(this.options.fadescrollbars){cleartimeout(this.fadetimeout);this.fadetimeout=null}if(this.options.interactive){utils.removeevent(this.indicator,'touchstart',this);utils.removeevent(this.indicator,utils.prefixpointerevent('pointerdown'),this);utils.removeevent(this.indicator,'mousedown',this);utils.removeevent(window,'touchmove',this);utils.removeevent(window,utils.prefixpointerevent('pointermove'),this);utils.removeevent(window,'mousemove',this);utils.removeevent(window,'touchend',this);utils.removeevent(window,utils.prefixpointerevent('pointerup'),this);utils.removeevent(window,'mouseup',this)}if(this.options.defaultscrollbars){this.wrapper.parentnode.removechild(this.wrapper)}},_start:function(e){var point=e.touches?e.touches[0]:e;e.preventdefault();e.stoppropagation();this.transitiontime();this.initiated=true;this.moved=false;this.lastpointx=point.pagex;this.lastpointy=point.pagey;this.starttime=utils.gettime();if(!this.options.disabletouch){utils.addevent(window,'touchmove',this)}if(!this.options.disablepointer){utils.addevent(window,utils.prefixpointerevent('pointermove'),this)}if(!this.options.disablemouse){utils.addevent(window,'mousemove',this)}this.scroller._execevent('beforescrollstart')},_move:function(e){var point=e.touches?e.touches[0]:e,deltax,deltay,newx,newy,timestamp=utils.gettime();if(!this.moved){this.scroller._execevent('scrollstart')}this.moved=true;deltax=point.pagex-this.lastpointx;this.lastpointx=point.pagex;deltay=point.pagey-this.lastpointy;this.lastpointy=point.pagey;newx=this.x+deltax;newy=this.y+deltay;this._pos(newx,newy);e.preventdefault();e.stoppropagation()},_end:function(e){if(!this.initiated){return}this.initiated=false;e.preventdefault();e.stoppropagation();utils.removeevent(window,'touchmove',this);utils.removeevent(window,utils.prefixpointerevent('pointermove'),this);utils.removeevent(window,'mousemove',this);if(this.scroller.options.snap){var snap=this.scroller._nearestsnap(this.scroller.x,this.scroller.y);var time=this.options.snapspeed||math.max(math.max(math.min(math.abs(this.scroller.x-snap.x),1000),math.min(math.abs(this.scroller.y-snap.y),1000)),300);if(this.scroller.x!=snap.x||this.scroller.y!=snap.y){this.scroller.directionx=0;this.scroller.directiony=0;this.scroller.currentpage=snap;this.scroller.scrollto(snap.x,snap.y,time,this.scroller.options.bounceeasing)}}if(this.moved){this.scroller._execevent('scrollend')}},transitiontime:function(time){time=time||0;var durationprop=utils.style.transitionduration;if(!durationprop){return}this.indicatorstyle[durationprop]=time+'ms';if(!time&&utils.isbadandroid){this.indicatorstyle[durationprop]='0.0001ms';var self=this;raf(function(){if(self.indicatorstyle[durationprop]==='0.0001ms'){self.indicatorstyle[durationprop]='0s'}})}},transitiontimingfunction:function(easing){this.indicatorstyle[utils.style.transitiontimingfunction]=easing},refresh:function(){this.transitiontime();if(this.options.listenx&&!this.options.listeny){this.indicatorstyle.display=this.scroller.hashorizontalscroll?'block':'none'}else if(this.options.listeny&&!this.options.listenx){this.indicatorstyle.display=this.scroller.hasverticalscroll?'block':'none'}else{this.indicatorstyle.display=this.scroller.hashorizontalscroll||this.scroller.hasverticalscroll?'block':'none'}if(this.scroller.hashorizontalscroll&&this.scroller.hasverticalscroll){utils.addclass(this.wrapper,'iscrollbothscrollbars');utils.removeclass(this.wrapper,'iscrolllonescrollbar');if(this.options.defaultscrollbars&&this.options.customstyle){if(this.options.listenx){this.wrapper.style.right='8px'}else{this.wrapper.style.bottom='8px'}}}else{utils.removeclass(this.wrapper,'iscrollbothscrollbars');utils.addclass(this.wrapper,'iscrolllonescrollbar');if(this.options.defaultscrollbars&&this.options.customstyle){if(this.options.listenx){this.wrapper.style.right='2px'}else{this.wrapper.style.bottom='2px'}}}var r=this.wrapper.offsetheight;if(this.options.listenx){this.wrapperwidth=this.wrapper.clientwidth;if(this.options.resize){this.indicatorwidth=math.max(math.round(this.wrapperwidth*this.wrapperwidth/(this.scroller.scrollerwidth||this.wrapperwidth||1)),8);this.indicatorstyle.width=this.indicatorwidth+'px'}else{this.indicatorwidth=this.indicator.clientwidth}this.maxposx=this.wrapperwidth-this.indicatorwidth;if(this.options.shrink=='clip'){this.minboundaryx=-this.indicatorwidth+8;this.maxboundaryx=this.wrapperwidth-8}else{this.minboundaryx=0;this.maxboundaryx=this.maxposx}this.sizeratiox=this.options.speedratiox||(this.scroller.maxscrollx&&(this.maxposx/this.scroller.maxscrollx))}if(this.options.listeny){this.wrapperheight=this.wrapper.clientheight;if(this.options.resize){this.indicatorheight=math.max(math.round(this.wrapperheight*this.wrapperheight/(this.scroller.scrollerheight||this.wrapperheight||1)),8);this.indicatorstyle.height=this.indicatorheight+'px'}else{this.indicatorheight=this.indicator.clientheight}this.maxposy=this.wrapperheight-this.indicatorheight;if(this.options.shrink=='clip'){this.minboundaryy=-this.indicatorheight+8;this.maxboundaryy=this.wrapperheight-8}else{this.minboundaryy=0;this.maxboundaryy=this.maxposy}this.maxposy=this.wrapperheight-this.indicatorheight;this.sizeratioy=this.options.speedratioy||(this.scroller.maxscrolly&&(this.maxposy/this.scroller.maxscrolly))}this.updateposition()},updateposition:function(){var x=this.options.listenx&&math.round(this.sizeratiox*this.scroller.x)||0,y=this.options.listeny&&math.round(this.sizeratioy*this.scroller.y)||0;if(!this.options.ignoreboundaries){if(xthis.maxboundaryx){if(this.options.shrink=='scale'){this.width=math.max(this.indicatorwidth-(x-this.maxposx),8);this.indicatorstyle.width=this.width+'px';x=this.maxposx+this.indicatorwidth-this.width}else{x=this.maxboundaryx}}else if(this.options.shrink=='scale'&&this.width!=this.indicatorwidth){this.width=this.indicatorwidth;this.indicatorstyle.width=this.width+'px'}if(ythis.maxboundaryy){if(this.options.shrink=='scale'){this.height=math.max(this.indicatorheight-(y-this.maxposy)*3,8);this.indicatorstyle.height=this.height+'px';y=this.maxposy+this.indicatorheight-this.height}else{y=this.maxboundaryy}}else if(this.options.shrink=='scale'&&this.height!=this.indicatorheight){this.height=this.indicatorheight;this.indicatorstyle.height=this.height+'px'}}this.x=x;this.y=y;if(this.scroller.options.usetransform){this.indicatorstyle[utils.style.transform]='translate('+x+'px,'+y+'px)'+this.scroller.translatez}else{this.indicatorstyle.left=x+'px';this.indicatorstyle.top=y+'px'}},_pos:function(x,y){if(x<0){x=0}else if(x>this.maxposx){x=this.maxposx}if(y<0){y=0}else if(y>this.maxposy){y=this.maxposy}x=this.options.listenx?math.round(x/this.sizeratiox):this.scroller.x;y=this.options.listeny?math.round(y/this.sizeratioy):this.scroller.y;this.scroller.scrollto(x,y)},fade:function(val,hold){if(hold&&!this.visible){return}cleartimeout(this.fadetimeout);this.fadetimeout=null;var time=val?250:500,delay=val?0:300;val=val?'1':'0';this.wrapperstyle[utils.style.transitionduration]=time+'ms';this.fadetimeout=settimeout((function(val){this.wrapperstyle.opacity=val;this.visible=+val}).bind(this,val),delay)}};iscroll.utils=utils;if(typeof module!='undefined'&&module.exports){module.exports=iscroll}else if(typeof define=='function'&&define.amd){define(function(){return iscroll})}else{window.iscroll=iscroll}})(window,document,math); /* * 移动端模拟导航可点击自动滑动 0.1.4 * date: 2017-01-11 * by: xiewei * 导航可左右滑动,可点击边缘的一个,自动滚动下一个到可视范围【依赖于iscroll.js】 */ (function ($) { $.fn.navbarscroll = function (options) { //各种属性、参数 var _defaults = { classname:'cur', //当前选中点击元素的class类名 clickscrolltime:300, //点击后滑动时间 duibiscreenwidth:0.4, //单位以rem为准,默认为0.4rem scrollerwidth:3, //单位以px为准,默认为3,[仅用于特殊情况:外层宽度因为小数点造成的不精准情况] defaultselect:0, //初始选中第n个,默认第0个 fingerclick:0, //目标第0或1个选项触发,必须每一项长度一致,方可用此项 endclickscroll:function(thisobj){}//回调函数 } var _opt = $.extend(_defaults, options); this.each(function () { //插件实现代码 var _wrapper = $(this); var _win = $(window); var _win_width = _win.width(),_wrapper_width = _wrapper.width(),_wrapper_off_left = _wrapper.offset().left; var _wrapper_off_right=_win_width-_wrapper_off_left-_wrapper_width; var _obj_scroller = _wrapper.children('.scroller'); var _obj_ul = _obj_scroller.children('ul'); var _obj_li = _obj_ul.children('li'); var _scroller_w = 0; _obj_li.css({"margin-left":"0","margin-right":"0"}); for (var i = 0; i < _obj_li.length; i++) { _scroller_w += _obj_li[i].offsetwidth; } _obj_scroller.width(_scroller_w+_opt.scrollerwidth); var myscroll = new iscroll('#'+_wrapper.attr('id'), { eventpassthrough: true, scrollx: true, scrolly: false, preventdefault: false }); _init(_obj_li.eq(_opt.defaultselect)); _obj_li.click(function(){ _init($(this)); }); //解决pc端谷歌浏览器模拟的手机屏幕出现莫名的卡顿现象,滑动时禁止默认事件(2017-01-11) _wrapper[0].addeventlistener('touchmove',function (e){e.preventdefault();},false); function _init(thiobj){ var $this_obj=thiobj; var duibi=_opt.duibiscreenwidth*_win_width/10,this_index=$this_obj.index(),this_off_left=$this_obj.offset().left,this_pos_left=$this_obj.position().left,this_width=$this_obj.width(),this_prev_width=$this_obj.prev('li').width(),this_next_width=$this_obj.next('li').width(); var this_off_right=_win_width-this_off_left-this_width; if(_scroller_w+2>_wrapper_width){ if(_opt.fingerclick==1){ if(this_index==1){ myscroll.scrollto(-this_pos_left+this_prev_width,0, _opt.clickscrolltime); }else if(this_index==0){ myscroll.scrollto(-this_pos_left,0, _opt.clickscrolltime); }else if(this_index==_obj_li.length-2){ myscroll.scrollby(this_off_right-_wrapper_off_right-this_width,0, _opt.clickscrolltime); }else if(this_index==_obj_li.length-1){ myscroll.scrollby(this_off_right-_wrapper_off_right,0, _opt.clickscrolltime); }else{ if(this_off_left-_wrapper_off_left-(this_width*_opt.fingerclick)1||this_off_right-_wrapper_off_right<-1){ myscroll.scrollby(this_off_right-_wrapper_off_right,0, _opt.clickscrolltime); } }else{ if(this_off_left-_wrapper_off_left= loops) { $self.removedata('countto'); clearinterval(data.interval); value = settings.to; if (typeof(settings.oncomplete) == 'function') { settings.oncomplete.call(self, value) } } } function render(value) { var formattedvalue = settings.formatter.call(self, value, settings); $self.html(formattedvalue) } }) }; $.fn.countto.defaults = { from: 0, to: 0, speed: 1000, refreshinterval: 100, decimals: 0, formatter: formatter, onupdate: null, oncomplete: null }; function formatter(value, settings) { return value.tofixed(settings.decimals) }