Altered lightbox js function