Added the code that alters lightbox behavior