1window.requestAnimFrame = function(){
2 return (
3 window.requestAnimationFrame ||
4 window.webkitRequestAnimationFrame ||
5 window.mozRequestAnimationFrame ||
6 window.oRequestAnimationFrame ||
7 window.msRequestAnimationFrame ||
8 function(/* function */ callback){
9 window.setTimeout(callback, 1000 / 60);
10 }
11 );
12}();