handling external links in galleries properly with lightbox