improved lightbox hook