Moved JS call for carousel to template