Adding animation and basic js code