Moved javascript into haml for heroku