!function(t,e,n,a){"use strict";function o(t,e){return t.toFixed(e.decimals)}t.fn.countTo=function(e){return e=e||{},t(this).each(function(){function n(){s+=l,f++,a(s),"function"==typeof o.onUpdate&&o.onUpdate.call(i,s),f>=r&&(c.removeData("countTo"),clearInterval(d.interval),s=o.to,"function"==typeof o.onComplete&&o.onComplete.call(i,s))}function a(t){var e=o.formatter.call(i,t,o);c.text(e)}var o=t.extend({},t.fn.countTo.defaults,{from:t(this).data("from"),to:t(this).data("to"),speed:t(this).data("speed"),refreshInterval:t(this).data("refresh-interval"),decimals:t(this).data("decimals")},e),r=Math.ceil(o.speed/o.refreshInterval),l=(o.to-o.from)/r,i=this,c=t(this),f=0,s=o.from,d=c.data("countTo")||{};c.data("countTo",d),d.interval&&clearInterval(d.interval),d.interval=setInterval(n,o.refreshInterval),a(s)})},t.fn.countTo.defaults={from:0,to:0,speed:2e3,refreshInterval:100,decimals:0,formatter:o,onUpdate:null,onComplete:null}}(jQuery,window,document);