(function($){$.fn.digits=function(){return this.each(function(){$(this).text($(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"));})}
$.fn.liveCounter=function(options){var defaults={'start_date':'June 4, 1985','start_cnt':1000,'wait_secs':10,'increase_by':1,'divided_by':1,};return this.each(function(){settings=$.extend({},defaults,options);var start_date=settings['start_date'];var start_cnt=settings['start_cnt'];var wait_secs=settings['wait_secs'];var increase_by=settings['increase_by'];var divided_by=settings['divided_by'];var element=this;var date=Math.round(new Date(start_date).getTime()/1000);var today=Math.round(new Date().getTime()/1000);start_cnt+=Math.round((today- date)/wait_secs);$(element).text(Math.round(start_cnt*divided_by)/divided_by).digits();function updateCnt(){start_cnt=start_cnt+ increase_by;$(element).text(Math.round(start_cnt*divided_by)/divided_by).digits();}
setInterval(updateCnt,wait_secs*1000);})}})(jQuery);
