[ALLI-2028] Removed hardcoded HTML id attributes from carousel, cleaned up code and moved javascript outside the template.