re-added the js for carousel switch