added javascript at end of page to create animation