Tweaked the condition for the gallery lightbox