move js code straight into application.html.erb; change conditional to IE 9