CSS3 Animation - native javascript  helper