!function(t){t.fn.countTo=function(e){return e=t.extend({},t.fn.countTo.defaults,e||{}),t(this).each(function(){var a=t.extend({},e,{from:parseFloat(t(this).attr("data-from")||e.from),to:parseFloat(t(this).attr("data-to")||e.to),speed:parseInt(t(this).attr("data-speed")||e.speed,10),refreshInterval:parseInt(t(this).attr("data-refresh-interval")||e.refreshInterval,10),decimals:parseInt(t(this).attr("data-decimals")||e.decimals,10)}),r=Math.ceil(a.speed/a.refreshInterval),n=(a.to-a.from)/r,o=this,l=0,s=a.from,f=setInterval(function(){l++,d(s+=n),"function"==typeof a.onUpdate&&a.onUpdate.call(o,s);l>=r&&(clearInterval(f),s=a.to,"function"==typeof a.onComplete&&a.onComplete.call(o,s))},a.refreshInterval);function d(e){var r=a.formatter.call(o,e,a);t(o).html(r)}d(s)})},t.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);