/*! velocityjs.org (1.2.3). (c) 2014 julian shapiro. mit @license: en.wikipedia.org/wiki/mit_license */ /*! velocityjs.org jquery shim (1.0.1). (c) 2014 the jquery foundation. mit @license: en.wikipedia.org/wiki/mit_license. */ !function(a){function b(a){var b=a.length,d=c.type(a);return"function"===d||c.iswindow(a)?!1:1===a.nodetype&&b?!0:"array"===d||0===b||"number"==typeof b&&b>0&&b-1 in a}if(!a.jquery){var c=function(a,b){return new c.fn.init(a,b)};c.iswindow=function(a){return null!=a&&a==a.window},c.type=function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a},c.isarray=array.isarray||function(a){return"array"===c.type(a)},c.isplainobject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodetype||c.iswindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isprototypeof"))return!1}catch(d){return!1}for(b in a);return void 0===b||f.call(a,b)},c.each=function(a,c,d){var e,f=0,g=a.length,h=b(a);if(d){if(h)for(;g>f&&(e=c.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=c.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=c.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=c.call(a[f],f,a[f]),e===!1)break;return a},c.data=function(a,b,e){if(void 0===e){var f=a[c.expando],g=f&&d[f];if(void 0===b)return g;if(g&&b in g)return g[b]}else if(void 0!==b){var f=a[c.expando]||(a[c.expando]=++c.uuid);return d[f]=d[f]||{},d[f][b]=e,e}},c.removedata=function(a,b){var e=a[c.expando],f=e&&d[e];f&&c.each(b,function(a,b){delete f[b]})},c.extend=function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[i]||{},i++),"object"!=typeof h&&"function"!==c.type(h)&&(h={}),i===j&&(h=this,i--);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(c.isplainobject(d)||(b=c.isarray(d)))?(b?(b=!1,g=a&&c.isarray(a)?a:[]):g=a&&c.isplainobject(a)?a:{},h[e]=c.extend(k,g,d)):void 0!==d&&(h[e]=d));return h},c.queue=function(a,d,e){function f(a,c){var d=c||[];return null!=a&&(b(object(a))?!function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;)a[e++]=b[d++];if(c!==c)for(;void 0!==b[d];)a[e++]=b[d++];return a.length=e,a}(d,"string"==typeof a?[a]:a):[].push.call(d,a)),d}if(a){d=(d||"fx")+"queue";var g=c.data(a,d);return e?(!g||c.isarray(e)?g=c.data(a,d,f(e)):g.push(e),g):g||[]}},c.dequeue=function(a,b){c.each(a.nodetype?[a]:a,function(a,d){b=b||"fx";var e=c.queue(d,b),f=e.shift();"inprogress"===f&&(f=e.shift()),f&&("fx"===b&&e.unshift("inprogress"),f.call(d,function(){c.dequeue(d,b)}))})},c.fn=c.prototype={init:function(a){if(a.nodetype)return this[0]=a,this;throw new error("not a dom node.")},offset:function(){var b=this[0].getboundingclientrect?this[0].getboundingclientrect():{top:0,left:0};return{top:b.top+(a.pageyoffset||document.scrolltop||0)-(document.clienttop||0),left:b.left+(a.pagexoffset||document.scrollleft||0)-(document.clientleft||0)}},position:function(){function a(){for(var a=this.offsetparent||document;a&&"html"===!a.nodetype.tolowercase&&"static"===a.style.position;)a=a.offsetparent;return a||document}var b=this[0],a=a.apply(b),d=this.offset(),e=/^(?:body|html)$/i.test(a.nodename)?{top:0,left:0}:c(a).offset();return d.top-=parsefloat(b.style.margintop)||0,d.left-=parsefloat(b.style.marginleft)||0,a.style&&(e.top+=parsefloat(a.style.bordertopwidth)||0,e.left+=parsefloat(a.style.borderleftwidth)||0),{top:d.top-e.top,left:d.left-e.left}}};var d={};c.expando="velocity"+(new date).gettime(),c.uuid=0;for(var e={},f=e.hasownproperty,g=e.tostring,h="boolean number string function array date regexp object error".split(" "),i=0;ie;++e){var f=j(c,a,d);if(0===f)return c;var g=i(c,a,d)-b;c-=g/f}return c}function l(){for(var b=0;t>b;++b)x[b]=i(b*u,a,d)}function m(b,c,e){var f,g,h=0;do g=c+(e-c)/2,f=i(g,a,d)-b,f>0?e=g:c=g;while(math.abs(f)>r&&++h=q?k(b,h):0==i?h:m(b,c,c+u)}function o(){y=!0,(a!=c||d!=e)&&l()}var p=4,q=.001,r=1e-7,s=10,t=11,u=1/(t-1),v="float32array"in b;if(4!==arguments.length)return!1;for(var w=0;4>w;++w)if("number"!=typeof arguments[w]||isnan(arguments[w])||!isfinite(arguments[w]))return!1;a=math.min(a,1),d=math.min(d,1),a=math.max(a,0),d=math.max(d,0);var x=v?new float32array(t):new array(t),y=!1,z=function(b){return y||o(),a===c&&d===e?b:0===b?0:1===b?1:i(n(b),c,e)};z.getcontrolpoints=function(){return[{x:a,y:c},{x:d,y:e}]};var a="generatebezier("+[a,c,d,e]+")";return z.tostring=function(){return a},z}function j(a,b){var c=a;return p.isstring(a)?t.easings[a]||(c=!1):c=p.isarray(a)&&1===a.length?h.apply(null,a):p.isarray(a)&&2===a.length?u.apply(null,a.concat([b])):p.isarray(a)&&4===a.length?i.apply(null,a):!1,c===!1&&(c=t.easings[t.defaults.easing]?t.defaults.easing:s),c}function k(a){if(a){var b=(new date).gettime(),c=t.state.calls.length;c>1e4&&(t.state.calls=e(t.state.calls));for(var f=0;c>f;f++)if(t.state.calls[f]){var h=t.state.calls[f],i=h[0],j=h[2],n=h[3],o=!!n,q=null;n||(n=t.state.calls[f][3]=b-16);for(var r=math.min((b-n)/j.duration,1),s=0,u=i.length;u>s;s++){var w=i[s],y=w.element;if(g(y)){var z=!1;if(j.display!==d&&null!==j.display&&"none"!==j.display){if("flex"===j.display){var a=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];m.each(a,function(a,b){v.setpropertyvalue(y,"display",b)})}v.setpropertyvalue(y,"display",j.display)}j.visibility!==d&&"hidden"!==j.visibility&&v.setpropertyvalue(y,"visibility",j.visibility);for(var b in w)if("element"!==b){var c,d=w[b],e=p.isstring(d.easing)?t.easings[d.easing]:d.easing;if(1===r)c=d.endvalue;else{var f=d.endvalue-d.startvalue;if(c=d.startvalue+f*e(r,j,f),!o&&c===d.currentvalue)continue}if(d.currentvalue=c,"tween"===b)q=c;else{if(v.hooks.registered[b]){var g=v.hooks.getroot(b),h=g(y).rootpropertyvaluecache[g];h&&(d.rootpropertyvalue=h)}var i=v.setpropertyvalue(y,b,d.currentvalue+(0===parsefloat(c)?"":d.unittype),d.rootpropertyvalue,d.scrolldata);v.hooks.registered[b]&&(g(y).rootpropertyvaluecache[g]=v.normalizations.registered[g]?v.normalizations.registered[g]("extract",null,i[1]):i[1]),"transform"===i[0]&&(z=!0)}}j.mobileha&&g(y).transformcache.translate3d===d&&(g(y).transformcache.translate3d="(0px, 0px, 0px)",z=!0),z&&v.flushtransformcache(y)}}j.display!==d&&"none"!==j.display&&(t.state.calls[f][2].display=!1),j.visibility!==d&&"hidden"!==j.visibility&&(t.state.calls[f][2].visibility=!1),j.progress&&j.progress.call(h[1],h[1],r,math.max(0,n+j.duration-b),n,q),1===r&&l(f)}}t.state.isticking&&x(k)}function l(a,b){if(!t.state.calls[a])return!1;for(var c=t.state.calls[a][0],e=t.state.calls[a][1],f=t.state.calls[a][2],h=t.state.calls[a][4],i=!1,j=0,k=c.length;k>j;j++){var l=c[j].element;if(b||f.loop||("none"===f.display&&v.setpropertyvalue(l,"display",f.display),"hidden"===f.visibility&&v.setpropertyvalue(l,"visibility",f.visibility)),f.loop!==!0&&(m.queue(l)[1]===d||!/\.velocityqueueentryflag/i.test(m.queue(l)[1]))&&g(l)){g(l).isanimating=!1,g(l).rootpropertyvaluecache={};var n=!1;m.each(v.lists.transforms3d,function(a,b){var c=/^scale/.test(b)?1:0,e=g(l).transformcache[b];g(l).transformcache[b]!==d&&new regexp("^\\("+c+"[^.]").test(e)&&(n=!0,delete g(l).transformcache[b])}),f.mobileha&&(n=!0,delete g(l).transformcache.translate3d),n&&v.flushtransformcache(l),v.values.removeclass(l,"velocity-animating")}if(!b&&f.complete&&!f.loop&&j===k-1)try{f.complete.call(e,e)}catch(o){settimeout(function(){throw o},1)}h&&f.loop!==!0&&h(e),g(l)&&f.loop===!0&&!b&&(m.each(g(l).tweenscontainer,function(a,b){/^rotate/.test(a)&&360===parsefloat(b.endvalue)&&(b.endvalue=0,b.startvalue=360),/^backgroundposition/.test(a)&&100===parsefloat(b.endvalue)&&"%"===b.unittype&&(b.endvalue=0,b.startvalue=100)}),t(l,"reverse",{loop:!0,delay:f.delay})),f.queue!==!1&&m.dequeue(l,f.queue)}t.state.calls[a]=!1;for(var p=0,q=t.state.calls.length;q>p;p++)if(t.state.calls[p]!==!1){i=!0;break}i===!1&&(t.state.isticking=!1,delete t.state.calls,t.state.calls=[])}var m,n=function(){if(c.documentmode)return c.documentmode;for(var a=7;a>4;a--){var b=c.createelement("div");if(b.innerhtml="",b.getelementsbytagname("span").length)return b=null,a}return d}(),o=function(){var a=0;return b.webkitrequestanimationframe||b.mozrequestanimationframe||function(b){var c,d=(new date).gettime();return c=math.max(0,16-(d-a)),a=d+c,settimeout(function(){b(d+c)},c)}}(),p={isstring:function(a){return"string"==typeof a},isarray:array.isarray||function(a){return"[object array]"===object.prototype.tostring.call(a)},isfunction:function(a){return"[object function]"===object.prototype.tostring.call(a)},isnode:function(a){return a&&a.nodetype},isnodelist:function(a){return"object"==typeof a&&/^\[object (htmlcollection|nodelist|object)\]$/.test(object.prototype.tostring.call(a))&&a.length!==d&&(0===a.length||"object"==typeof a[0]&&a[0].nodetype>0)},iswrapped:function(a){return a&&(a.jquery||b.zepto&&b.zepto.zepto.isz(a))},issvg:function(a){return b.svgelement&&a instanceof b.svgelement},isemptyobject:function(a){for(var b in a)return!1;return!0}},q=!1;if(a.fn&&a.fn.jquery?(m=a,q=!0):m=b.velocity.utilities,8>=n&&!q)throw new error("velocity: ie8 and below require jquery to be loaded before velocity.");if(7>=n)return void(jquery.fn.velocity=jquery.fn.animate);var r=400,s="swing",t={state:{ismobile:/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.useragent),isandroid:/android/i.test(navigator.useragent),isgingerbread:/android 2\.3\.[3-7]/i.test(navigator.useragent),ischrome:b.chrome,isfirefox:/firefox/i.test(navigator.useragent),prefixelement:c.createelement("div"),prefixmatches:{},scrollanchor:null,scrollpropertyleft:null,scrollpropertytop:null,isticking:!1,calls:[]},css:{},utilities:m,redirects:{},easings:{},promise:b.promise,defaults:{queue:"",duration:r,easing:s,begin:d,complete:d,progress:d,display:d,visibility:d,loop:!1,delay:!1,mobileha:!0,_cachevalues:!0},init:function(a){m.data(a,"velocity",{issvg:p.issvg(a),isanimating:!1,computedstyle:null,tweenscontainer:null,rootpropertyvaluecache:{},transformcache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};b.pageyoffset!==d?(t.state.scrollanchor=b,t.state.scrollpropertyleft="pagexoffset",t.state.scrollpropertytop="pageyoffset"):(t.state.scrollanchor=c.documentelement||c.body.parentnode||c.body,t.state.scrollpropertyleft="scrollleft",t.state.scrollpropertytop="scrolltop");var u=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0,l=1e-4,m=.016;for(a=parsefloat(a)||500,b=parsefloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*m):g=m;;)if(h=c(h||i,g),j.push(1+h.x),k+=16,!(math.abs(h.x)>l&&math.abs(h.v)>l))break;return f?function(a){return j[a*(j.length-1)|0]}:k}}();t.easings={linear:function(a){return a},swing:function(a){return.5-math.cos(a*math.pi)/2},spring:function(a){return 1-math.cos(4.5*a*math.pi)*math.exp(6*-a)}},m.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeinsine",[.47,0,.745,.715]],["easeoutsine",[.39,.575,.565,1]],["easeinoutsine",[.445,.05,.55,.95]],["easeinquad",[.55,.085,.68,.53]],["easeoutquad",[.25,.46,.45,.94]],["easeinoutquad",[.455,.03,.515,.955]],["easeincubic",[.55,.055,.675,.19]],["easeoutcubic",[.215,.61,.355,1]],["easeinoutcubic",[.645,.045,.355,1]],["easeinquart",[.895,.03,.685,.22]],["easeoutquart",[.165,.84,.44,1]],["easeinoutquart",[.77,0,.175,1]],["easeinquint",[.755,.05,.855,.06]],["easeoutquint",[.23,1,.32,1]],["easeinoutquint",[.86,0,.07,1]],["easeinexpo",[.95,.05,.795,.035]],["easeoutexpo",[.19,1,.22,1]],["easeinoutexpo",[1,0,0,1]],["easeincirc",[.6,.04,.98,.335]],["easeoutcirc",[.075,.82,.165,1]],["easeinoutcirc",[.785,.135,.15,.86]]],function(a,b){t.easings[b[0]]=i.apply(null,b[1])});var v=t.css={regex:{ishex:/^#([a-f\d]{3}){1,2}$/i,valueunwrap:/^[a-z]+\((.*)\)$/i,wrappedvaluealreadyextracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valuesplit:/([a-z]+\(.+\))|(([a-z0-9#-.]+?)(?=\s|$))/gi},lists:{colors:["fill","stroke","stopcolor","color","backgroundcolor","bordercolor","bordertopcolor","borderrightcolor","borderbottomcolor","borderleftcolor","outlinecolor"],transformsbase:["translatex","translatey","scale","scalex","scaley","skewx","skewy","rotatez"],transforms3d:["transformperspective","translatez","scalez","rotatex","rotatey"]},hooks:{templates:{textshadow:["color x y blur","black 0px 0px 0px"],boxshadow:["color x y blur spread","black 0px 0px 0px 0px"],clip:["top right bottom left","0px 0px 0px 0px"],backgroundposition:["x y","0% 0%"],transformorigin:["x y z","50% 50% 0px"],perspectiveorigin:["x y","50% 50%"]},registered:{},register:function(){for(var a=0;a=n)switch(a){case"name":return"filter";case"extract":var d=c.tostring().match(/alpha\(opacity=(.*)\)/i);return c=d?d[1]/100:1;case"inject":return b.style.zoom=1,parsefloat(c)>=1?"":"alpha(opacity="+parseint(100*parsefloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){9>=n||t.state.isgingerbread||(v.lists.transformsbase=v.lists.transformsbase.concat(v.lists.transforms3d));for(var a=0;ae&&(e=1),f=!/(\d)$/i.test(e);break;case"skew":f=!/(deg|\d)$/i.test(e);break;case"rotate":f=!/(deg|\d)$/i.test(e)}return f||(g(c).transformcache[b]="("+e+")"),g(c).transformcache[b]}}}();for(var a=0;a=n||3!==f.split(" ").length||(f+=" 1"),f;case"inject":return 8>=n?4===e.split(" ").length&&(e=e.split(/\s+/).slice(0,3).join(" ")):3===e.split(" ").length&&(e+=" 1"),(8>=n?"rgb":"rgba")+"("+e.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},names:{camelcase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.touppercase()})},svgattribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(n||t.state.isandroid&&!t.state.ischrome)&&(b+="|transform"),new regexp("^("+b+")$","i").test(a)},prefixcheck:function(a){if(t.state.prefixmatches[a])return[t.state.prefixmatches[a],!0];for(var b=["","webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e;if(e=0===c?a:b[c]+a.replace(/^\w/,function(a){return a.touppercase()}),p.isstring(t.state.prefixelement.style[e]))return t.state.prefixmatches[a]=e,[e,!0]}return[a,!1]}},values:{hextorgb:function(a){var b,c=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return a=a.replace(c,function(a,b,c,d){return b+b+c+c+d+d}),b=d.exec(a),b?[parseint(b[1],16),parseint(b[2],16),parseint(b[3],16)]:[0,0,0]},iscssnullvalue:function(a){return 0==a||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)},getunittype:function(a){return/^(rotate|skew)/i.test(a)?"deg":/(^(scale|scalex|scaley|scalez|alpha|flexgrow|flexheight|zindex|fontweight)$)|((opacity|red|green|blue|alpha)$)/i.test(a)?"":"px"},getdisplaytype:function(a){var b=a&&a.tagname.tostring().tolowercase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b)?"inline":/^(li)$/i.test(b)?"list-item":/^(tr)$/i.test(b)?"table-row":/^(table)$/i.test(b)?"table":/^(tbody)$/i.test(b)?"table-row-group":"block"},addclass:function(a,b){a.classlist?a.classlist.add(b):a.classname+=(a.classname.length?" ":"")+b},removeclass:function(a,b){a.classlist?a.classlist.remove(b):a.classname=a.classname.tostring().replace(new regexp("(^|\\s)"+b.split(" ").join("|")+"(\\s|$)","gi")," ")}},getpropertyvalue:function(a,c,e,f){function h(a,c){function e(){j&&v.setpropertyvalue(a,"display","none")}var i=0;if(8>=n)i=m.css(a,c);else{var j=!1;if(/^(width|height)$/.test(c)&&0===v.getpropertyvalue(a,"display")&&(j=!0,v.setpropertyvalue(a,"display",v.values.getdisplaytype(a))),!f){if("height"===c&&"border-box"!==v.getpropertyvalue(a,"boxsizing").tostring().tolowercase()){var k=a.offsetheight-(parsefloat(v.getpropertyvalue(a,"bordertopwidth"))||0)-(parsefloat(v.getpropertyvalue(a,"borderbottomwidth"))||0)-(parsefloat(v.getpropertyvalue(a,"paddingtop"))||0)-(parsefloat(v.getpropertyvalue(a,"paddingbottom"))||0);return e(),k}if("width"===c&&"border-box"!==v.getpropertyvalue(a,"boxsizing").tostring().tolowercase()){var l=a.offsetwidth-(parsefloat(v.getpropertyvalue(a,"borderleftwidth"))||0)-(parsefloat(v.getpropertyvalue(a,"borderrightwidth"))||0)-(parsefloat(v.getpropertyvalue(a,"paddingleft"))||0)-(parsefloat(v.getpropertyvalue(a,"paddingright"))||0);return e(),l}}var o;o=g(a)===d?b.getcomputedstyle(a,null):g(a).computedstyle?g(a).computedstyle:g(a).computedstyle=b.getcomputedstyle(a,null),"bordercolor"===c&&(c="bordertopcolor"),i=9===n&&"filter"===c?o.getpropertyvalue(c):o[c],(""===i||null===i)&&(i=a.style[c]),e()}if("auto"===i&&/^(top|right|bottom|left)$/i.test(c)){var p=h(a,"position");("fixed"===p||"absolute"===p&&/top|left/i.test(c))&&(i=m(a).position()[c]+"px")}return i}var i;if(v.hooks.registered[c]){var j=c,k=v.hooks.getroot(j);e===d&&(e=v.getpropertyvalue(a,v.names.prefixcheck(k)[0])),v.normalizations.registered[k]&&(e=v.normalizations.registered[k]("extract",a,e)),i=v.hooks.extractvalue(j,e)}else if(v.normalizations.registered[c]){var l,o;l=v.normalizations.registered[c]("name",a),"transform"!==l&&(o=h(a,v.names.prefixcheck(l)[0]),v.values.iscssnullvalue(o)&&v.hooks.templates[c]&&(o=v.hooks.templates[c][1])),i=v.normalizations.registered[c]("extract",a,o)}if(!/^[\d-]/.test(i))if(g(a)&&g(a).issvg&&v.names.svgattribute(c))if(/^(height|width)$/i.test(c))try{i=a.getbbox()[c]}catch(p){i=0}else i=a.getattribute(c);else i=h(a,v.names.prefixcheck(c)[0]);return v.values.iscssnullvalue(i)&&(i=0),t.debug>=2&&console.log("get "+c+": "+i),i},setpropertyvalue:function(a,c,d,e,f){var h=c;if("scroll"===c)f.container?f.container["scroll"+f.direction]=d:"left"===f.direction?b.scrollto(d,f.alternatevalue):b.scrollto(f.alternatevalue,d);else if(v.normalizations.registered[c]&&"transform"===v.normalizations.registered[c]("name",a))v.normalizations.registered[c]("inject",a,d),h="transform",d=g(a).transformcache[c];else{if(v.hooks.registered[c]){var i=c,j=v.hooks.getroot(c);e=e||v.getpropertyvalue(a,j),d=v.hooks.injectvalue(i,d,e),c=j}if(v.normalizations.registered[c]&&(d=v.normalizations.registered[c]("inject",a,d),c=v.normalizations.registered[c]("name",a)),h=v.names.prefixcheck(c)[0],8>=n)try{a.style[h]=d}catch(k){t.debug&&console.log("browser does not support ["+d+"] for ["+h+"]")}else g(a)&&g(a).issvg&&v.names.svgattribute(c)?a.setattribute(c,d):a.style[h]=d;t.debug>=2&&console.log("set "+c+" ("+h+"): "+d)}return[h,d]},flushtransformcache:function(a){function b(b){return parsefloat(v.getpropertyvalue(a,b))}var c="";if((n||t.state.isandroid&&!t.state.ischrome)&&g(a).issvg){var d={translate:[b("translatex"),b("translatey")],skewx:[b("skewx")],skewy:[b("skewy")],scale:1!==b("scale")?[b("scale"),b("scale")]:[b("scalex"),b("scaley")],rotate:[b("rotatez"),0,0]};m.each(g(a).transformcache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),d[a]&&(c+=a+"("+d[a].join(" ")+") ",delete d[a])})}else{var e,f;m.each(g(a).transformcache,function(b){return e=g(a).transformcache[b],"transformperspective"===b?(f=e,!0):(9===n&&"rotatez"===b&&(b="rotate"),void(c+=b+e+" "))}),f&&(c="perspective"+f+" "+c)}v.setpropertyvalue(a,"transform",c)}};v.hooks.register(),v.normalizations.register(),t.hook=function(a,b,c){var e=d;return a=f(a),m.each(a,function(a,f){if(g(f)===d&&t.init(f),c===d)e===d&&(e=t.css.getpropertyvalue(f,b));else{var h=t.css.setpropertyvalue(f,b,c);"transform"===h[0]&&t.css.flushtransformcache(f),e=h}}),e};var w=function(){function a(){return h?b.promise||null:i}function e(){function a(){function a(a,b){var c=d,e=d,g=d;return p.isarray(a)?(c=a[0],!p.isarray(a[1])&&/^[\d-]/.test(a[1])||p.isfunction(a[1])||v.regex.ishex.test(a[1])?g=a[1]:(p.isstring(a[1])&&!v.regex.ishex.test(a[1])||p.isarray(a[1]))&&(e=b?a[1]:j(a[1],h.duration),a[2]!==d&&(g=a[2]))):c=a,b||(e=e||h.easing),p.isfunction(c)&&(c=c.call(f,y,x)),p.isfunction(g)&&(g=g.call(f,y,x)),[c||0,e,g]}function l(a,b){var c,d;return d=(b||"0").tostring().tolowercase().replace(/[%a-z]+$/,function(a){return c=a,""}),c||(c=v.values.getunittype(a)),[d,c]}function n(){var a={myparent:f.parentnode||c.body,position:v.getpropertyvalue(f,"position"),fontsize:v.getpropertyvalue(f,"fontsize")},d=a.position===i.lastposition&&a.myparent===i.lastparent,e=a.fontsize===i.lastfontsize;i.lastparent=a.myparent,i.lastposition=a.position,i.lastfontsize=a.fontsize;var h=100,i={};if(e&&d)i.emtopx=i.lastemtopx,i.percenttopxwidth=i.lastpercenttopxwidth,i.percenttopxheight=i.lastpercenttopxheight;else{var j=g(f).issvg?c.createelementns("http://www.w3.org/2000/svg","rect"):c.createelement("div");t.init(j),a.myparent.appendchild(j),m.each(["overflow","overflowx","overflowy"],function(a,b){t.css.setpropertyvalue(j,b,"hidden")}),t.css.setpropertyvalue(j,"position",a.position),t.css.setpropertyvalue(j,"fontsize",a.fontsize),t.css.setpropertyvalue(j,"boxsizing","content-box"),m.each(["minwidth","maxwidth","width","minheight","maxheight","height"],function(a,b){t.css.setpropertyvalue(j,b,h+"%")}),t.css.setpropertyvalue(j,"paddingleft",h+"em"),i.percenttopxwidth=i.lastpercenttopxwidth=(parsefloat(v.getpropertyvalue(j,"width",null,!0))||1)/h,i.percenttopxheight=i.lastpercenttopxheight=(parsefloat(v.getpropertyvalue(j,"height",null,!0))||1)/h,i.emtopx=i.lastemtopx=(parsefloat(v.getpropertyvalue(j,"paddingleft"))||1)/h,a.myparent.removechild(j)}return null===i.remtopx&&(i.remtopx=parsefloat(v.getpropertyvalue(c.body,"fontsize"))||16),null===i.vwtopx&&(i.vwtopx=parsefloat(b.innerwidth)/100,i.vhtopx=parsefloat(b.innerheight)/100),i.remtopx=i.remtopx,i.vwtopx=i.vwtopx,i.vhtopx=i.vhtopx,t.debug>=1&&console.log("unit ratios: "+json.stringify(i),f),i}if(h.begin&&0===y)try{h.begin.call(o,o)}catch(r){settimeout(function(){throw r},1)}if("scroll"===c){var u,w,z,a=/^x$/i.test(h.axis)?"left":"top",d=parsefloat(h.offset)||0;h.container?p.iswrapped(h.container)||p.isnode(h.container)?(h.container=h.container[0]||h.container,u=h.container["scroll"+a],z=u+m(f).position()[a.tolowercase()]+d):h.container=null:(u=t.state.scrollanchor[t.state["scrollproperty"+a]],w=t.state.scrollanchor[t.state["scrollproperty"+("left"===a?"top":"left")]],z=m(f).offset()[a.tolowercase()]+d),i={scroll:{rootpropertyvalue:!1,startvalue:u,currentvalue:u,endvalue:z,unittype:"",easing:h.easing,scrolldata:{container:h.container,direction:a,alternatevalue:w}},element:f},t.debug&&console.log("tweenscontainer (scroll): ",i.scroll,f)}else if("reverse"===c){if(!g(f).tweenscontainer)return void m.dequeue(f,h.queue);"none"===g(f).opts.display&&(g(f).opts.display="auto"),"hidden"===g(f).opts.visibility&&(g(f).opts.visibility="visible"),g(f).opts.loop=!1,g(f).opts.begin=null,g(f).opts.complete=null,s.easing||delete h.easing,s.duration||delete h.duration,h=m.extend({},g(f).opts,h);var e=m.extend(!0,{},g(f).tweenscontainer);for(var f in e)if("element"!==f){var g=e[f].startvalue;e[f].startvalue=e[f].currentvalue=e[f].endvalue,e[f].endvalue=g,p.isemptyobject(s)||(e[f].easing=h.easing),t.debug&&console.log("reverse tweenscontainer ("+f+"): "+json.stringify(e[f]),f)}i=e}else if("start"===c){var e;g(f).tweenscontainer&&g(f).isanimating===!0&&(e=g(f).tweenscontainer),m.each(q,function(b,c){if(regexp("^"+v.lists.colors.join("$|^")+"$").test(b)){var e=a(c,!0),f=e[0],g=e[1],h=e[2];if(v.regex.ishex.test(f)){for(var i=["red","green","blue"],j=v.values.hextorgb(f),k=h?v.values.hextorgb(h):d,l=0;ll;l++){var m={delay:e.delay,progress:e.progress};l===k-1&&(m.display=e.display,m.visibility=e.visibility,m.complete=e.complete),w(o,"reverse",m)}return a()}};t=m.extend(w,t),t.animate=w;var x=b.requestanimationframe||o;return t.state.ismobile||c.hidden===d||c.addeventlistener("visibilitychange",function(){c.hidden?(x=function(a){return settimeout(function(){a(!0)},16)},k()):x=b.requestanimationframe||o}),a.velocity=t,a!==b&&(a.fn.velocity=w,a.fn.velocity.defaults=t.defaults),m.each(["down","up"],function(a,b){t.redirects["slide"+b]=function(a,c,e,f,g,h){var i=m.extend({},c),j=i.begin,k=i.complete,l={height:"",margintop:"",marginbottom:"",paddingtop:"",paddingbottom:""},n={};i.display===d&&(i.display="down"===b?"inline"===t.css.values.getdisplaytype(a)?"inline-block":"block":"none"),i.begin=function(){j&&j.call(g,g);for(var c in l){n[c]=a.style[c];var d=t.css.getpropertyvalue(a,c);l[c]="down"===b?[d,0]:[0,d]}n.overflow=a.style.overflow,a.style.overflow="hidden"},i.complete=function(){for(var b in n)a.style[b]=n[b];k&&k.call(g,g),h&&h.resolver(g)},t(a,l,i)}}),m.each(["in","out"],function(a,b){t.redirects["fade"+b]=function(a,c,e,f,g,h){var i=m.extend({},c),j={opacity:"in"===b?1:0},k=i.complete;i.complete=e!==f-1?i.begin=null:function(){k&&k.call(g,g),h&&h.resolver(g)},i.display===d&&(i.display="in"===b?"auto":"none"),t(this,j,i)}}),t}(window.jquery||window.zepto||window,window,document)});