!function(d){d.fn.countto=function(f){return f=d.extend({},d.fn.countto.defaults,f||{}),d(this).each(function(){var a=d.extend({},f,{from:parsefloat(d(this).attr("data-from")||f.from),to:parsefloat(d(this).attr("data-to")||f.to),speed:parseint(d(this).attr("data-speed")||f.speed,10),refreshinterval:parseint(d(this).attr("data-refresh-interval")||f.refreshinterval,10),decimals:parseint(d(this).attr("data-decimals")||f.decimals,10)}),t=math.ceil(a.speed/a.refreshinterval),e=(a.to-a.from)/t,r=this,n=0,o=a.from,l=setinterval(function(){n++,s(o+=e),"function"==typeof a.onupdate&&a.onupdate.call(r,o);t<=n&&(clearinterval(l),o=a.to,"function"==typeof a.oncomplete&&a.oncomplete.call(r,o))},a.refreshinterval);function s(t){var e=a.formatter.call(r,t,a);d(r).html(e)}s(o)})},d.fn.countto.defaults={from:0,to:0,speed:1e3,refreshinterval:100,decimals:0,formatter:function(t,e){return t.tofixed(e.decimals)},onupdate:null,oncomplete:null}}(jquery);