Script for carousel.