!function(e){var t=function(e){return e.split("").reverse().join("")},n={numberStep:function(t,n){var r=Math.floor(t),o=e(n.elem);o.text(r)}},r=function(e){var t=e.elem;if(t.nodeType&&t.parentNode){var r=t._animateNumberSetter;r||(r=n.numberStep),r(e.now,e)}};e.Tween&&e.Tween.propHooks?e.Tween.propHooks.number={set:r}:e.fx.step.number=r;var o=function(e,t){for(var n,r,o,a=e.split("").reverse(),u=[],i=0,p=Math.ceil(e.length/t);p>i;i++){for(n="",o=0;t>o&&(r=i*t+o,r!==e.length);o++)n+=a[r];u.push(n)}return u},a=function(e){var n=e.length-1,r=t(e[n]);return e[n]=t(parseInt(r,10).toString()),e};e.animateNumber={numberStepFactories:{append:function(t){return function(n,r){var o=Math.floor(n),a=e(r.elem);a.prop("number",n).text(o+t)}},separator:function(n,r,u){return n=n||" ",r=r||3,u=u||"",function(i,p){var m=0>i,f=Math.floor((m?-1:1)*i),c=f.toString(),l=e(p.elem);if(c.length>r){var h=o(c,r);c=a(h).join(n),c=t(c)}l.prop("number",i).text((m?"-":"")+c+u)}}}},e.fn.animateNumber=function(){for(var t=arguments[0],r=e.extend({},n,t),o=e(this),a=[r],u=1,i=arguments.length;i>u;u++)a.push(arguments[u]);if(t.numberStep){var p=this.each(function(){this._animateNumberSetter=t.numberStep}),m=r.complete;r.complete=function(){p.each(function(){delete this._animateNumberSetter}),m&&m.apply(this,arguments)}}return o.animate.apply(o,a)}}(jQuery);