Wrap carousel JS code