Gallery Lightbox DB fix in ajax