Create CSS3 transitions dynamically with JavaScript