Cross-browser animation engine, using CSS transitions where possible