add script for carousel control and transition