move js script to application.js from index.html.erb