Added javascript animation
Some cleaning in the javascript