lightbox js more organized