Repository URL to install this package:
Version:
0.6.0.beta1 ▾
|
/*!
* Velocity.js: Accelerated JavaScript animation.
* @version 0.0.0
* @requires jQuery.js
* @docs VelocityJS.org
* @license Copyright 2014 Julian Shapiro. MIT License: http://en.wikipedia.org/wiki/MIT_License
*/
!function(e,t,a,r){function o(e){for(var t=-1,a=e?e.length:0,r=[];++t<a;){var o=e[t];o&&r.push(o)}return r}function i(e){return"[object Function]"===Object.prototype.toString.call(e)}function n(t){if(t)for(var a=(new Date).getTime(),o=0,i=e.velocity.State.calls.length;i>o;o++)if(e.velocity.State.calls[o]){var s=e.velocity.State.calls[o],g=s[0],d=s[2],f=s[3];f||(f=e.velocity.State.calls[o][3]=a-16);for(var y=Math.min((a-f)/d.duration,1),m=0,h=g.length;h>m;m++){var v=g[m],x=v.element;if(e.data(x,c)){var P=!1;d.display&&"none"!==d.display&&(p.setPropertyValue(x,"display",d.display),e.velocity.State.calls[o][2].display=!1);for(var b in v)if("element"!==b){var V=v[b],S=V.currentValue,k;if(k=1===y?V.endValue:V.startValue+(V.endValue-V.startValue)*e.easing[V.easing](y),V.currentValue=k,p.Hooks.registered[b]){var w=p.Hooks.getRoot(b),C=e.data(x,c).rootPropertyValueCache[w];C&&(V.rootPropertyValue=C)}var T=p.setPropertyValue(x,b,V.currentValue+("auto"===k?"":V.unitType),V.rootPropertyValue,V.scrollContainer);p.Hooks.registered[b]&&(e.data(x,c).rootPropertyValueCache[w]=p.Normalizations.registered[w]?p.Normalizations.registered[w]("extract",null,T[1]):T[1]),"transform"===T[0]&&(P=!0)}d.mobileHA&&(e.data(x,c).transformCache.translate3d===r?(e.data(x,c).transformCache.translate3d="(0, 0, 0)",P=!0):1===y&&(delete e.data(x,c).transformCache.translate3d,P=!0)),P&&p.flushTransformCache(x)}}1===y&&l(o)}e.velocity.State.isTicking&&u(n)}function l(t){for(var a=e.velocity.State.calls[t][0],o=e.velocity.State.calls[t][1],i=e.velocity.State.calls[t][2],n=!1,l=0,s=a.length;s>l;l++){var u=a[l].element;"none"===i.display&&i.loop===!1&&p.setPropertyValue(u,"display",i.display),e.queue(u)[1]!==r&&/\$\.velocity\.queueEntryFlag/i.test(e.queue(u)[1])||e.data(u,c)&&(e.data(u,c).isAnimating=!1,e.data(u,c).rootPropertyValueCache={}),e.dequeue(u)}e.velocity.State.calls[t]=!1;for(var g=0,d=e.velocity.State.calls.length;d>g;g++)if(e.velocity.State.calls[g]!==!1){n=!0;break}n===!1&&(e.velocity.State.isTicking=!1,delete e.velocity.State.calls,e.velocity.State.calls=[]),i.complete&&i.complete.call(o)}var s=function(){if(a.documentMode)return a.documentMode;for(var e=7;e>4;e--){var t=a.createElement("div");if(t.innerHTML="<!--[if IE "+e+"]><span></span><![endif]-->",t.getElementsByTagName("span").length)return t=null,e}return r}(),u=t.requestAnimationFrame||function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var a=(new Date).getTime(),r;return r=Math.max(0,16-(a-e)),e=a+r,setTimeout(function(){t(a+r)},r)}}();if(7>=s)return void(e.fn.velocity=e.fn.animate);if(e.velocity!==r||e.fn.velocity!==r)return void console.log("Velocity is already loaded or its namespace is occupied.");!function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,a){t[a]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,a=4;e<((t=Math.pow(2,--a))-1)/11;);return 1/Math.pow(4,3-a)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,a){e.easing["easeIn"+t]=a,e.easing["easeOut"+t]=function(e){return 1-a(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?a(2*e)/2:1-a(-2*e+2)/2}}),e.easing.spring=function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}}();var c="velocity";e.velocity={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),prefixElement:a.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollProperty:null,isTicking:!1,calls:[]},CSS:{},Sequences:{},animate:function(){},debug:!1},t.pageYOffset!==r?(e.velocity.State.scrollAnchor=t,e.velocity.State.scrollProperty="pageYOffset"):(e.velocity.State.scrollAnchor=a.documentElement||a.body.parentNode||a.body,e.velocity.State.scrollProperty="scrollTop");var p=e.velocity.CSS={RegEx:{valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Hooks:{templates:{color:["Red Green Blue Alpha","255 255 255 1"],backgroundColor:["Red Green Blue Alpha","255 255 255 1"],borderColor:["Red Green Blue Alpha","255 255 255 1"],outlineColor:["Red Green Blue Alpha","255 255 255 1"],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% 0%"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){var e,t,a;if(s)for(e in p.Hooks.templates){t=p.Hooks.templates[e],a=t[0].split(" ");var r=t[1].match(p.RegEx.valueSplit);"Color"===a[0]&&(a.push(a.shift()),r.push(r.shift()),p.Hooks.templates[e]=[a.join(" "),r.join(" ")])}for(e in p.Hooks.templates){t=p.Hooks.templates[e],a=t[0].split(" ");for(var o in a){var i=e+a[o],n=o;p.Hooks.registered[i]=[e,n]}}},getRoot:function(e){var t=p.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return p.RegEx.valueUnwrap.test(t)&&(t=t.match(p.Hooks.RegEx.valueUnwrap)[1]),p.Values.isCSSNullValue(t)&&(t=p.Hooks.templates[e][1]),t},extractValue:function(e,t){var a=p.Hooks.registered[e];if(a){var r=a[0],o=a[1];return t=p.Hooks.cleanRootPropertyValue(r,t),t.toString().match(p.RegEx.valueSplit)[o]}return t},injectValue:function(e,t,a){var r=p.Hooks.registered[e];if(r){var o=r[0],i=r[1],n,l;return a=p.Hooks.cleanRootPropertyValue(o,a),n=a.toString().match(p.RegEx.valueSplit),n[i]=t,l=n.join(" ")}return a}},Normalizations:{registered:{clip:function(e,t,a){switch(e){case"name":return"clip";case"extract":var r;return p.RegEx.wrappedValueAlreadyExtracted.test(a)?r=a:(r=a.toString().match(p.RegEx.valueUnwrap),r&&(r=r[1].replace(/,(\s+)?/g," "))),r;case"inject":return"rect("+a+")"}},opacity:function(e,t,a){if(8>=s)switch(e){case"name":return"filter";case"extract":var r=a.toString().match(/alpha\(opacity=(.*)\)/i);return a=r?r[1]/100:1;case"inject":return t.style.zoom=1,"alpha(opacity="+parseInt(100*a)+")"}else switch(e){case"name":return"opacity";case"extract":return a;case"inject":return a}}},register:function(){function t(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r;return e=e.replace(t,function(e,t,a,r){return t+t+a+a+r+r}),r=a.exec(e),r?"rgb("+(parseInt(r[1],16)+" "+parseInt(r[2],16)+" "+parseInt(r[3],16))+")":"rgb(0 0 0)"}var a=["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"];9>=s||(a=a.concat(["translateZ","scaleZ","rotateX","rotateY"]));for(var o=0,i=a.length;i>o;o++)!function(){var t=a[o];p.Normalizations.registered[t]=function(a,o,i){switch(a){case"name":return"transform";case"extract":return e.data(o,c).transformCache[t]===r?/^scale/i.test(t)?1:0:e.data(o,c).transformCache[t].replace(/[()]/g,"");case"inject":var n=!1;switch(t.substr(0,t.length-1)){case"translate":n=!/(%|px|em|rem|\d)$/i.test(i);break;case"scale":n=!/(\d)$/i.test(i);break;case"skew":n=!/(deg|\d)$/i.test(i);break;case"rotate":n=!/(deg|\d)$/i.test(i)}return n||(e.data(o,c).transformCache[t]="("+i+")"),e.data(o,c).transformCache[t]}}}();for(var n=["color","backgroundColor","borderColor","outlineColor"],o=0,l=n.length;l>o;o++)!function(){var e=n[o];p.Normalizations.registered[e]=function(a,o,i){switch(a){case"name":return e;case"extract":var n;if(p.RegEx.wrappedValueAlreadyExtracted.test(i))n=i;else{var l,u={aqua:"rgb(0, 255, 255);",black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",fuchsia:"rgb(255, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",lime:"rgb(0, 255, 0)",maroon:"rgb(128, 0, 0)",navy:"rgb(0, 0, 128)",olive:"rgb(128, 128, 0)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",silver:"rgb(192, 192, 192)",teal:"rgb(0, 128, 128)",white:"rgb(255, 255, 255)",yellow:"rgb(255, 255, 0)"};/^[A-z]+$/i.test(i)?l=u[i]!==r?u[i]:u.black:/^#([A-f\d]{3}){1,2}$/i.test(i)?l=t(i):/^rgba?\(/i.test(i)||(l=u.black),n=(l||i).toString().match(p.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=s||3!==n.split(" ").length||(n+=" 1"),n;case"inject":return 8>=s?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=s?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},prefixCheck:function(t){if(e.velocity.State.prefixMatches[t])return[e.velocity.State.prefixMatches[t],!0];for(var a=["","Webkit","Moz","ms","O"],r=0,o=a.length;o>r;r++){var i;if(i=0===r?t:a[r]+t.replace(/^\w/,function(e){return e.toUpperCase()}),"string"==typeof e.velocity.State.prefixElement.style[i])return e.velocity.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|opacity|alpha|fillOpacity|flexGrow|flexHeight|zIndex|fontWeight)$)|color/i.test(e)?"":"px"}},getPropertyValue:function(a,o,i,n){function l(a,o){if(!n){if("height"===o&&"border-box"!==p.getPropertyValue(a,"boxSizing").toLowerCase())return a.offsetHeight-(parseFloat(p.getPropertyValue(a,"borderTopWidth"))||0)-(parseFloat(p.getPropertyValue(a,"borderBottomWidth"))||0)-(parseFloat(p.getPropertyValue(a,"paddingTop"))||0)-(parseFloat(p.getPropertyValue(a,"paddingBottom"))||0);if("width"===o&&"border-box"!==p.getPropertyValue(a,"boxSizing").toLowerCase())return a.offsetWidth-(parseFloat(p.getPropertyValue(a,"borderLeftWidth"))||0)-(parseFloat(p.getPropertyValue(a,"borderRightWidth"))||0)-(parseFloat(p.getPropertyValue(a,"paddingLeft"))||0)-(parseFloat(p.getPropertyValue(a,"paddingRight"))||0)}var i=0;if(8>=s)i=e.css(a,o);else{var u;u=e.data(a,c)===r?t.getComputedStyle(a,null):e.data(a,c).computedStyle?e.data(a,c).computedStyle:e.data(a,c).computedStyle=t.getComputedStyle(a,null),s&&"borderColor"===o&&(o="borderTopColor"),i=9===s&&"filter"===o?u.getPropertyValue(o):u[o],""===i&&(i=a.style[o])}if("auto"===i&&/^(top|right|bottom|left)$/i.test(o)){var g=l(a,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(o))&&(i=e(a).position()[o]+"px")}return i}var u;if(p.Hooks.registered[o]){var g=o,d=p.Hooks.getRoot(g);i===r&&(i=p.getPropertyValue(a,p.Names.prefixCheck(d)[0])),p.Normalizations.registered[d]&&(i=p.Normalizations.registered[d]("extract",a,i)),u=p.Hooks.extractValue(g,i)}else if(p.Normalizations.registered[o]){var f,y;f=p.Normalizations.registered[o]("name",a),"transform"!==f&&(y=l(a,p.Names.prefixCheck(f)[0]),p.Values.isCSSNullValue(y)&&p.Hooks.templates[o]&&(y=p.Hooks.templates[o][1])),u=p.Normalizations.registered[o]("extract",a,y)}return/^[\d-]/.test(u)||(u=l(a,p.Names.prefixCheck(o)[0])),p.Values.isCSSNullValue(u)&&(u=0),e.velocity.debug>=2&&console.log("Get "+o+": "+u),u},setPropertyValue:function(a,r,o,i,n){var l=r;if("scroll"===r)n?n.scrollTop=o:t.scrollTo(null,o);else if(p.Normalizations.registered[r]&&"transform"===p.Normalizations.registered[r]("name",a))p.Normalizations.registered[r]("inject",a,o),l="transform",o=e.data(a,c).transformCache[r];else{if(p.Hooks.registered[r]){var u=r,g=p.Hooks.getRoot(r);i=i||p.getPropertyValue(a,g),o=p.Hooks.injectValue(u,o,i),r=g}if(p.Normalizations.registered[r]&&(o=p.Normalizations.registered[r]("inject",a,o),r=p.Normalizations.registered[r]("name",a)),l=p.Names.prefixCheck(r)[0],8>=s)try{a.style[l]=o}catch(d){console.log("Error setting ["+l+"] to ["+o+"]")}else a.style[l]=o;e.velocity.debug>=2&&console.log("Set "+r+" ("+l+"): "+o)}return[l,o]},flushTransformCache:function(t){var a="",r,o;for(r in e.data(t,c).transformCache)o=e.data(t,c).transformCache[r],9===s&&"rotateZ"===r&&(r="rotate"),a+=r+o+" ";p.setPropertyValue(t,"transform",a)}};p.Hooks.register(),p.Normalizations.register(),e.fn.velocity=e.velocity.animate=function(){function t(){var t=this,l=e.extend({},e.fn.velocity.defaults,g),m={};if("stop"===y)return e.queue(t,"string"==typeof g?g:"",[]),!0;switch(e.data(t,c)===r&&e.data(t,c,{isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}}),l.duration.toString().toLowerCase()){case"fast":l.duration=200;break;case"normal":l.duration=400;break;case"slow":l.duration=600;break;default:l.duration=parseFloat(l.duration)||parseFloat(e.fn.velocity.defaults.duration)||400}e.easing[l.easing]||(l.easing=e.easing[e.fn.velocity.defaults.easing]?e.fn.velocity.defaults.easing:"swing"),/^\d/.test(l.delay)&&e.queue(t,l.queue,function(t){e.velocity.queueEntryFlag=!0,setTimeout(t,parseFloat(l.delay))}),l.display&&(l.display=l.display.toLowerCase()),l.mobileHA=l.mobileHA&&e.velocity.State.isMobile,e.queue(t,l.queue,function(h){function P(a){var o=r,n=r,s=r;return"[object Array]"===Object.prototype.toString.call(a)?(o=a[0],/^[\d-]/.test(a[1])||i(a[1])?s=a[1]:"string"==typeof a[1]&&(e.easing[a[1]]!==r&&(n=a[1]),a[2]&&(s=a[2]))):o=a,n=n||l.easing,i(o)&&(o=o.call(t,f,d)),i(s)&&(s=s.call(t,f,d)),[o||0,n,s]}function b(e,t){var a,r;return r=(t||0).toString().toLowerCase().replace(/[%A-z]+$/,function(e){return a=e,""}),a||(a=p.Values.getUnitType(e)),[r,a]}function V(){var r={parent:t.parentNode,position:p.getPropertyValue(t,"position"),fontSize:p.getPropertyValue(t,"fontSize")},o=r.position===v.lastPosition&&r.parent===v.lastParent,i=r.fontSize===v.lastFontSize;v.lastParent=r.parent,v.lastPosition=r.position,v.lastFontSize=r.fontSize,null===v.remToPxRatio&&(v.remToPxRatio=parseFloat(p.getPropertyValue(a.body,"fontSize"))||16);var n={overflowX:null,overflowY:null,boxSizing:null,width:null,minWidth:null,maxWidth:null,height:null,minHeight:null,maxHeight:null,paddingLeft:null},l={},s=10;l.remToPxRatio=v.remToPxRatio,n.overflowX=p.getPropertyValue(t,"overflowX"),n.overflowY=p.getPropertyValue(t,"overflowY"),n.boxSizing=p.getPropertyValue(t,"boxSizing"),n.width=p.getPropertyValue(t,"width",null,!0),n.minWidth=p.getPropertyValue(t,"minWidth"),n.maxWidth=p.getPropertyValue(t,"maxWidth")||"none",n.height=p.getPropertyValue(t,"height",null,!0),n.minHeight=p.getPropertyValue(t,"minHeight"),n.maxHeight=p.getPropertyValue(t,"maxHeight")||"none",n.paddingLeft=p.getPropertyValue(t,"paddingLeft"),o?(l.percentToPxRatioWidth=v.lastPercentToPxWidth,l.percentToPxRatioHeight=v.lastPercentToPxHeight):(p.setPropertyValue(t,"overflowX","hidden"),p.setPropertyValue(t,"overflowY","hidden"),p.setPropertyValue(t,"boxSizing","content-box"),p.setPropertyValue(t,"width",s+"%"),p.setPropertyValue(t,"minWidth",s+"%"),p.setPropertyValue(t,"maxWidth",s+"%"),p.setPropertyValue(t,"height",s+"%"),p.setPropertyValue(t,"minHeight",s+"%"),p.setPropertyValue(t,"maxHeight",s+"%")),i?l.emToPxRatio=v.lastEmToPx:p.setPropertyValue(t,"paddingLeft",s+"em"),o||(l.percentToPxRatioWidth=v.lastPercentToPxWidth=(parseFloat(p.getPropertyValue(t,"width",null,!0))||1)/s,l.percentToPxRatioHeight=v.lastPercentToPxHeight=(parseFloat(p.getPropertyValue(t,"height",null,!0))||1)/s),i||(l.emToPxRatio=v.lastEmToPx=(parseFloat(p.getPropertyValue(t,"paddingLeft"))||1)/s);for(var u in n)p.setPropertyValue(t,u,n[u]);return e.velocity.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),t),l}if(e.velocity.queueEntryFlag=!0,"scroll"===y){var S=parseFloat(l.offset)||0,k,w;l.container?l.container.jquery||l.container.nodeType?(l.container=l.container[0]||l.container,k=l.container.scrollTop,w=k+e(t).position().top+S):l.container=null:(k=e.velocity.State.scrollAnchor[e.velocity.State.scrollProperty],w=e(t).offset().top+S),m={scroll:{rootPropertyValue:!1,startValue:k,currentValue:k,endValue:w,unitType:"",easing:l.easing,scrollContainer:l.container},element:t}}else if("reverse"===y){if(!e.data(t,c).tweensContainer)return void e.dequeue(t,l.queue);"none"===e.data(t,c).opts.display&&(e.data(t,c).opts.display="block"),e.data(t,c).opts.loop=!1,l=e.extend({},e.data(t,c).opts,g);var C=e.extend(!0,{},e.data(t,c).tweensContainer);for(var T in C)if("element"!==T){var H=C[T].startValue;C[T].startValue=C[T].currentValue=C[T].endValue,C[T].endValue=H,g&&(C[T].easing=l.easing)}m=C}else if("start"===y){var C;e.data(t,c).tweensContainer&&e.data(t,c).isAnimating===!0&&(C=e.data(t,c).tweensContainer);for(var R in u){var z=P(u[R]),N=z[0],q=z[1],A=z[2];R=p.Names.camelCase(R);var E=p.Hooks.getRoot(R),F=!1;if(p.Names.prefixCheck(E)[1]!==!1||p.Normalizations.registered[E]!==r){l.display&&"none"!==l.display&&/opacity|filter/.test(R)&&!A&&0!==N&&(A=0),l._cacheValues&&C&&C[R]?(A=C[R].endValue+C[R].unitType,F=e.data(t,c).rootPropertyValueCache[E]):p.Hooks.registered[R]?A===r?(F=p.getPropertyValue(t,E),A=p.getPropertyValue(t,R,F)):F=p.Hooks.templates[E][1]:A===r&&(A=p.getPropertyValue(t,R));var M,j,W,$;M=b(R,A),A=M[0],W=M[1],M=b(R,N),N=M[0].replace(/^([+-\/*])=/,function(e,t){return $=t,""}),j=M[1],A=parseFloat(A)||0,N=parseFloat(N)||0;var O;if("%"===j&&(/^(fontSize|lineHeight)$/.test(R)?(N/=100,j="em"):/^scale/.test(R)?(N/=100,j=""):/(Red|Green|Blue)$/i.test(R)&&(N=N/100*255,j="")),/[\/*]/.test($))j=W;else if(W!==j&&0!==A)if(0===N)j=W;else{O=O||V();var Y=/margin|padding|left|right|width|text|word|letter/i.test(R)||/X$/.test(R)?"x":"y";switch(W){case"%":A*="x"===Y?O.percentToPxRatioWidth:O.percentToPxRatioHeight;break;case"em":A*=O.emToPxRatio;break;case"rem":A*=O.remToPxRatio;break;case"px":}switch(j){case"%":A*=1/("x"===Y?O.percentToPxRatioWidth:O.percentToPxRatioHeight);break;case"em":A*=1/O.emToPxRatio;break;case"rem":A*=1/O.remToPxRatio;break;case"px":}}switch($){case"+":N=A+N;break;case"-":N=A-N;break;case"*":N=A*N;break;case"/":N=A/N}m[R]={rootPropertyValue:F,startValue:A,currentValue:A,endValue:N,unitType:j,easing:q},e.velocity.debug&&console.log("tweensContainer ("+R+"): "+JSON.stringify(m[R]),t)}else e.velocity.debug&&console.log("Skipping ["+E+"] due to a lack of browser support.")}m.element=t}m.element&&(x.push(m),e.data(t,c).tweensContainer=m,e.data(t,c).opts=l,e.data(t,c).isAnimating=!0,f===d-1?(e.velocity.State.calls.length>1e4&&(e.velocity.State.calls=o(e.velocity.State.calls)),e.velocity.State.calls.push([x,s,l]),e.velocity.State.isTicking===!1&&(e.velocity.State.isTicking=!0,n())):f++),""!==l.queue&&"fx"!==l.queue&&setTimeout(h,l.duration+l.delay)}),(l.queue===!1||(""===l.queue||"fx"===l.queue)&&"inprogress"!==e.queue(t)[0])&&e.dequeue(t)}var l,s,u,g;this.jquery?(l=!0,s=this,u=arguments[0],g=arguments[1]):(l=!1,s=arguments[0].jquery?arguments[0].get():arguments[0],u=arguments[1],g=arguments[2]);var d=s.length||1,f=0,y;switch(u){case"scroll":y="scroll";break;case"reverse":y="reverse";break;case"stop":y="stop";break;default:if(!e.isPlainObject(u)||e.isEmptyObject(u))return"string"==typeof u&&e.velocity.Sequences[u]?(e.each(s,function(t,a){e.velocity.Sequences[u].call(a,a,g||{},t,d)}),s):(e.velocity.debug&&console.log("First argument was not a property map, a known action, or a registered sequence. Aborting."),s);y="start"}if("stop"!==y&&"object"!=typeof g){var m=l?1:2;g={};for(var h=m;h<arguments.length;h++)/^\d/.test(arguments[h])?g.duration=parseFloat(arguments[h]):"string"==typeof arguments[h]?g.easing=arguments[h].replace(/^\s+|\s+$/g,""):i(arguments[h])&&(g.complete=arguments[h])}var v={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPxRatio:null},x=[];if(g&&!i(g.complete)&&(g.complete=null),l)s.each(t);else if(s.nodeType)t.call(s);else if(s[0]&&s[0].nodeType)for(var P in s)t.call(s[P]);var b=e.extend({},e.fn.velocity.defaults,g);if(b.loop=parseInt(b.loop),b.loop)for(var V=0;V<2*b.loop-1;V++)l?s.velocity("reverse",{delay:b.delay}):e.velocity.animate(s,"reverse",{delay:b.delay});return s}}(jQuery,window,document),jQuery.fn.velocity.defaults={queue:"",duration:400,easing:"swing",complete:null,display:null,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0};