Using requestAnimationFrame for animations
Fixing example for IE7