Moves javascripts to the head of story