function numroll(){$.fn.countto=function(options){options=options||{};return $(this).each(function(){var settings=$.extend({},$.fn.countto.defaults,{from:$(this).data("from"),to:$(this).data("to"),speed:$(this).data("speed"),refreshinterval:$(this).data("refresh-interval"),decimals:$(this).data("decimals")},options);var loops=math.ceil(settings.speed/settings.refreshinterval),increment=(settings.to-settings.from)/loops;var self=this,$self=$(this),loopcount=0,value=settings.from,data=$self.data("countto")||{};$self.data("countto",data);if(data.interval){clearinterval(data.interval)}data.interval=setinterval(updatetimer,settings.refreshinterval);render(value);function updatetimer(){value+=increment;loopcount++;render(value);if(typeof(settings.onupdate)=="function"){settings.onupdate.call(self,value)}if(loopcount>=loops){$self.removedata("countto");clearinterval(data.interval);value=settings.to;if(typeof(settings.oncomplete)=="function"){settings.oncomplete.call(self,value)}}}function render(value){var formattedvalue=settings.formatter.call(self,value,settings);$self.html(formattedvalue)}})};$.fn.countto.defaults={from:0,to:0,speed:1000,refreshinterval:100,decimals:0,formatter:formatter,onupdate:null,oncomplete:null};function formatter(value,settings){return value.tofixed(settings.decimals)}$(".timer").data("counttooptions",{formatter:function(value,options){return value.tofixed(options.decimals).replace(/\b(?=(?:\d{3})+(?!\d))/g,",")}});$(".timer").each(count);function count(options){var $this=$(this);options=$.extend({},options||{},$this.data("counttooptions")||{});$this.countto(options)}}var flag=false;var scroll=$(".timer").offset().top-window.innerheight;$(window).scroll(function(){var height=$(window).scrolltop();if(height>=scroll&&false===flag){flag=true;numroll()}if(height