Breaking up the JS to use animations and stuff