var cot;

function doCalc(){
 var unit = 100000000 / 31556926;

 var start = new Date();
 start.setMonth(0);
 start.setDate(1);
 start.setHours(0,0,0,0);
 
 var d1 = start.getTime() / 1000;
 
 var end = new Date();
 var d2 = end.getTime() / 1000;
 var d3 = d2 - d1;
 
 var w = unit * d3;
 
 t=setTimeout("doCalc()",1000);
 
 jQuery(".cotwocounter").text(addCommas(Math.round(w)) + " kg");
 Cufon.replace(".cotwocounter");
}

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

jQuery(document).ready(function(){

  doCalc();

});
