changed requestAnimFrame to Paul Irish's version