/*
 jQuery Transit - CSS3 transitions and transformations
 (c) 2011-2014 Rico Sta. Cruz
 MIT Licensed.

 http://ricostacruz.com/jquery.transit
 http://github.com/rstacruz/jquery.transit
*/
(function(d,m){"function"===typeof define&&define.amd?define(["jquery"],m):"object"===typeof exports?module.exports=m(require("jquery")):m(d.jq)})(this,function(d){function m(a){if(a in q.style)return a;var b=["Moz","Webkit","O","ms"];a=a.charAt(0).toUpperCase()+a.substr(1);for(var c=0;c<b.length;++c){var g=b[c]+a;if(g in q.style)return g}}function r(a){"string"===typeof a&&this.parse(a);return this}function z(a,b,c){!0===b?a.queue(c):b?a.queue(b,c):a.each(function(){c.call(this)})}function D(a){var b=
[];d.each(a,function(c){c=d.camelCase(c);c=d.transit.propertyMap[c]||d.cssProps[c]||c;c=A(c);e[c]&&(c=A(e[c]));-1===d.inArray(c,b)&&b.push(c)});return b}function B(a,b,c,g){a=D(a);d.cssEase[c]&&(c=d.cssEase[c]);var h=""+w(b)+" "+c;0<parseInt(g,10)&&(h+=" "+w(g));var n=[];d.each(a,function(t,f){n.push(f+" "+h)});return n.join(", ")}function k(a,b){b||(d.cssNumber[a]=!0);d.transit.propertyMap[a]=e.transform;d.cssHooks[a]={get:function(c){return d(c).css("transit:transform").get(a)},set:function(c,g){var h=
d(c).css("transit:transform");h.setFromString(a,g);d(c).css({"transit:transform":h})}}}function A(a){return a.replace(/([A-Z])/g,function(b){return"-"+b.toLowerCase()})}function l(a,b){return"string"!==typeof a||a.match(/^[\-0-9\.]+$/)?""+a+b:a}function w(a){"string"!==typeof a||a.match(/^[\-0-9\.]+/)||(a=d.fx.speeds[a]||d.fx.speeds._default);return l(a,"ms")}d.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",
paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:!0,useTransitionEnd:!1};var q=document.createElement("div"),e={},E=-1<navigator.userAgent.toLowerCase().indexOf("chrome");e.transition=m("transition");e.transitionDelay=m("transitionDelay");e.transform=m("transform");e.transformOrigin=m("transformOrigin");e.filter=m("Filter");q.style[e.transform]="";q.style[e.transform]="rotateY(90deg)";e.transform3d=""!==q.style[e.transform];var x=e.transitionEnd={transition:"transitionend",
MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"}[e.transition]||null,u;for(u in e)e.hasOwnProperty(u)&&"undefined"===typeof d.support[u]&&(d.support[u]=e[u]);q=null;d.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",
easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",
easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};d.cssHooks["transit:transform"]={get:function(a){return d(a).data("transform")||new r},set:function(a,b){b instanceof r||(b=new r(b));a.style[e.transform]=
"WebkitTransform"!==e.transform||E?b.toString():b.toString(!0);d(a).data("transform",b)}};d.cssHooks.transform={set:d.cssHooks["transit:transform"].set};d.cssHooks.filter={get:function(a){return a.style[e.filter]},set:function(a,b){a.style[e.filter]=b}};"1.8">d.fn.jquery&&(d.cssHooks.transformOrigin={get:function(a){return a.style[e.transformOrigin]},set:function(a,b){a.style[e.transformOrigin]=b}},d.cssHooks.transition={get:function(a){return a.style[e.transition]},set:function(a,b){a.style[e.transition]=
b}});k("scale");k("scaleX");k("scaleY");k("translate");k("rotate");k("rotateX");k("rotateY");k("rotate3d");k("perspective");k("skewX");k("skewY");k("x",!0);k("y",!0);r.prototype={setFromString:function(a,b){b="string"===typeof b?b.split(","):b.constructor===Array?b:[b];b.unshift(a);r.prototype.set.apply(this,b)},set:function(a){var b=Array.prototype.slice.apply(arguments,[1]);this.setter[a]?this.setter[a].apply(this,b):this[a]=b.join(",")},get:function(a){return this.getter[a]?this.getter[a].apply(this):
this[a]||0},setter:{rotate:function(a){this.rotate=l(a,"deg")},rotateX:function(a){this.rotateX=l(a,"deg")},rotateY:function(a){this.rotateY=l(a,"deg")},scale:function(a,b){void 0===b&&(b=a);this.scale=a+","+b},skewX:function(a){this.skewX=l(a,"deg")},skewY:function(a){this.skewY=l(a,"deg")},perspective:function(a){this.perspective=l(a,"px")},x:function(a){this.set("translate",a,null)},y:function(a){this.set("translate",null,a)},translate:function(a,b){void 0===this._translateX&&(this._translateX=
0);void 0===this._translateY&&(this._translateY=0);null!==a&&void 0!==a&&(this._translateX=l(a,"px"));null!==b&&void 0!==b&&(this._translateY=l(b,"px"));this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var a=(this.scale||"1,1").split(",");a[0]&&(a[0]=parseFloat(a[0]));a[1]&&(a[1]=parseFloat(a[1]));return a[0]===a[1]?a[0]:a},rotate3d:function(){for(var a=(this.rotate3d||"0,0,0,0deg").split(","),
b=0;3>=b;++b)a[b]&&(a[b]=parseFloat(a[b]));a[3]&&(a[3]=l(a[3],"deg"));return a}},parse:function(a){var b=this;a.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(c,g,h){b.setFromString(g,h)})},toString:function(a){var b=[],c;for(c in this)this.hasOwnProperty(c)&&(e.transform3d||"rotateX"!==c&&"rotateY"!==c&&"perspective"!==c&&"transformOrigin"!==c)&&"_"!==c[0]&&(a&&"scale"===c?b.push(c+"3d("+this[c]+",1)"):a&&"translate"===c?b.push(c+"3d("+this[c]+",0)"):b.push(c+"("+this[c]+")"));return b.join(" ")}};
d.fn.transition=d.fn.transit=function(a,b,c,g){var h=this,n=0,t=!0,f=d.extend(!0,{},a);"function"===typeof b&&(g=b,b=void 0);"object"===typeof b&&(c=b.easing,n=b.delay||0,t="undefined"===typeof b.queue?!0:b.queue,g=b.complete,b=b.duration);"function"===typeof c&&(g=c,c=void 0);"undefined"!==typeof f.easing&&(c=f.easing,delete f.easing);"undefined"!==typeof f.duration&&(b=f.duration,delete f.duration);"undefined"!==typeof f.complete&&(g=f.complete,delete f.complete);"undefined"!==typeof f.queue&&(t=
f.queue,delete f.queue);"undefined"!==typeof f.delay&&(n=f.delay,delete f.delay);"undefined"===typeof b&&(b=d.fx.speeds._default);"undefined"===typeof c&&(c=d.cssEase._default);b=w(b);var F=B(f,b,c,n),v=d.transit.enabled&&e.transition?parseInt(b,10)+parseInt(n,10):0;if(0===v)return z(h,t,function(p){h.css(f);g&&g.apply(h);p&&p()}),h;var G={},H=function(p){var C=!1,y=function(){C&&h.off(x,y);0<v&&h.each(function(){this.style[e.transition]=G[this]||null});"function"===typeof g&&g.apply(h);"function"===
typeof p&&p()};0<v&&x&&d.transit.useTransitionEnd?(C=!0,h.on(x,y)):window.setTimeout(y,v);h.each(function(){0<v&&(this.style[e.transition]=F);d(this).css(f)})};z(h,t,function(p){this.offsetWidth=this.offsetWidth;H(p)});return this};d.transit.getTransitionValue=B;return d});
