CSS3 Animation framework in Javascript