Turley: moving some js out of the haml