
//rounding function

$(document).ready(function(){

window.setInterval(function(){function roundNumber(num, dec) {
	var result = Math.round( Math.round( num * Math.pow( 10, dec + 1 ) ) / Math.pow( 10, 1 ) ) / Math.pow(10,dec);
	return result;
}

// copyright Stephen Chapman 24th March 2006, 22nd August 2008
// permission to use this function is granted provided
// that this copyright notice is retained intact
function formatNumber(num,dec,thou,pnt,curr1,curr2,n1,n2) {var x = Math.round(num * Math.pow(10,dec));if (x >= 0) n1=n2='';var y = (''+Math.abs(x)).split('');var z = y.length - dec; if (z<0) z--; for(var i = z; i < 0; i++) y.unshift('0'); if (z<0) z = 1; y.splice(z, 0, pnt); if(y[0] == pnt) y.unshift('0'); while (z > 3) {z-=3; y.splice(z,0,thou);}var r = curr1+n1+y.join('')+n2+curr2;return r;}
//end of format function

var total_jackpots=0;
for (i=0;i<Jackpots.length;i++)
{
total_jackpots =total_jackpots+Jackpots[i].current_value;
} 
//document.write("TOTAL="+roundNumber(total_jackpots,2));
//document.write("<BR>TOTALDISPLAY="+formatNumber(total_jackpots,2,',','.','€','','-',''));

$("div.jackpotHeader span.total").text(formatNumber(total_jackpots,2,',','.','€','','-',''));
},(1000))});