move js into application.js, change php to html