add javascript lines to head of application layout file