Check for data-gallery presence before adding li click handlers for gallery