fix javascript and make it work with turbolinks

don't need to include jquery in the application layout, it's already
included in application.js.

make javascript load after the turbolinks page:load event