!function(a,b){var c;return c=function(b){return a===this?new c(b):(this._collection=c.fn._getMoonCollection(b),this._callback=void 0,this._stack=[],this._step=-1,this._loop=1,this._direction=!0,this)},c.fn=c.prototype={config:{duration:1e3,delay:0,easing:"ease",before:void 0,after:void 0},_prefixes:{},_cssPrefixes:{},_vendorPrefixes:["webkit-","moz-","ms-","O-"],_getMoonCollection:function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(d=[],a instanceof Array||(c=a,a=[],a.push(c)),h=0,l=a.length;l>h;h++)if(g=a[h],g instanceof NodeList||g instanceof HTMLCollection)for(i=0,m=g.length;m>i;i++)e=g[i],d.push(e);else if("string"==typeof g)for(f=b.querySelectorAll(g),j=0,n=f.length;n>j;j++)e=f[j],d.push(e);else if(g instanceof Array)for(k=0,o=g.length;o>k;k++)e=g[k],d.push(e);else d.push(g);return d},_getPrefix:function(a){var d,e,f,g,h;if(null!=c.fn._prefixes[a])return c.fn._prefixes[a];if(a=c.fn._camelize(a),null!=b.documentElement.style[a])return c.fn._prefixes[a]=a,a;for(h=c.fn._vendorPrefixes,f=0,g=h.length;g>f;f++)if(d=h[f],e=c.fn._camelize(d+a),null!=b.documentElement.style[e])return c.fn._prefixes[a]=e,e},_camelize:function(a){return a.replace(/-([\D])/g,c.fn._camelizeReplaceCallback)},_camelizeReplaceCallback:function(a){return a.charAt(1).toUpperCase()},_getCssPrefix:function(a){var d,e,f,g,h,i,j;if(null!=c.fn._cssPrefixes[a])return c.fn._cssPrefixes[a];if(e=c.fn._camelize(a),null!=b.documentElement.style[e])return c.fn._cssPrefixes[a]=a,a;for(j=c.fn._vendorPrefixes,h=0,i=j.length;i>h;h++)if(d=j[h],f="-"+d+a,g=c.fn._camelize(d+a),null!=b.documentElement.style[g])return c.fn._cssPrefixes[a]=f,f},animate:function(a){var b,d,e;b={duration:c.fn.config.duration,delay:c.fn.config.delay,easing:c.fn.config.easing,before:c.fn.config.before,after:c.fn.config.after};for(d in a)e=a[d],b[d]=e;return this._stack.push(b),this},play:function(a){return this._callback=a||this._callback,this._play(),this},_play:function(){var a,b,c,d,e,f,g,h,i,j,k,l,m=this;if(e=function(a){return m._direction||(a=m._stack.length-1-m._step),m._stack[a]},a=void 0,null!=this._paused?(a=e(this._step),g=this._paused-this._lastTimePlayed,h=a.delay+a.duration,b=h-g-a.duration,c=h-g,a.delay=0>b?0:b,cj;j++){d=l[j],d.style[this._getPrefix("transition")]=""+a.duration+"ms all "+a.easing+" "+a.delay+"ms";for(f in a)i=a[f],"duration"!==f&&"delay"!==f&&"easing"!==f&&"before"!==f&&"after"!==f&&(d.style[this._getPrefix(f)]=i)}this._nextTimeout=setTimeout(function(){return clearTimeout(m._nextTimeout),"function"==typeof a.after&&a.after(),m._play()},a.delay+a.duration),this._lastTimePlayed=new Date}else this._step=-1,"number"==typeof this._loop?(this._loop-=1,this._loop>0?this._play():(null!=this._callback&&this._callback(),this.reset())):"string"==typeof this._loop&&(null!=this._callback&&this._callback(),"alternate"===this._loop?(this._direction=!this._direction,this._play()):"infinite"===this._loop&&this._play());return this},set:function(a){var b,c,d,e,f,g;for(g=this._collection,e=0,f=g.length;f>e;e++){b=g[e];for(c in a)d=a[c],b.style[this._getPrefix(c)]=d}return this},pause:function(){var b,c,d,e,f,g,h,i;for(this._paused=new Date,h=this._collection,f=0,g=h.length;g>f;f++){c=h[f],b=a.getComputedStyle(c),i=this._stack[this._step];for(d in i)e=i[d],"duration"!==d&&"delay"!==d&&"easing"!==d&&"before"!==d&&"after"!==d&&(c.style[this._getPrefix(d)]=b.getPropertyValue(this._getCssPrefix(d)));c.style[this._getPrefix("transition")]=""}return clearTimeout(this._nextTimeout),this},loop:function(a){return this._loop=a,this},reset:function(){return this._callback=void 0,this._step=-1,this._stack=[],this._loop=1,this._direction=!0,this.set({transition:null}),this}},a.Moon=c}(window,document);