Fixed jQuery references in templates