move jquery out of template