function impressionTick() { // create randomness to the counter estimate // +1 to make sure the base always increases by at least 1, (random range starts at 0) // increment*2 because we want the range to have a midpoint of the actual increment (to keep in line with real server-side values) baseCount = baseCount + 1 + Math.floor(Math.random()*increment*2); $(".JQFEText").html(addCommas(baseCount)); $(".JQFEShadow").html(addCommas(baseCount)); } function addCommas(number) { arr = number.toString().split("").reverse(); var n = 0; var commaString = ''; for (var i=0; i