Restrict “Content Gallery” Lightboxes to Individual Groups

The following script can be used to group each Content Gallery individually when displayed inside the lightbox.

The script can be added to the slider's API/JavaScript section: