     $(document).on 'click', '.js-gallery-thumbnail', @switchPreview
 
     $(document).on 'turbolinks:before-cache', ->
-      $('.pswp--open').remove()
+      $('.js-gallery--container').remove()
 
 
   initiateOpen: (e) =>



  open: ({galleryId, index}) =>
    pswp = new PhotoSwipe @container[0],
      PhotoSwipeUI_Default
      @data galleryId
      showHideOpacity: true

      timeToIdle: null

    if _.startsWith(galleryId, 'contest-')
      new _exported.GalleryContest(container, pswp)

    pswp.init()

