Moved animation code to index.