     i = @getLinkIndex ev.srcElement.parentElement
 
     @lightbox = new Lightbox(@, i)
+    window.currentLightbox = @lightbox
 
   getLinkIndex: (elem) ->
     # Given a link return it's index in the galleryLinks array

  close: =>
    # Unfreeze scrolling
    document.body.style.position = "static"
    document.body.scrollTop = @scrollTop

    # Remove blur
    @blur.classList.remove('lightbox-blur--show')

    window.disable_keyboard_nav = true

    # Freeze scrolling
    @scrollTop = $(document).scrollTop()
    document.body.style.position = "fixed"
    document.body.style.top = "-#{@scrollTop}px"

