       else if offset > element
         offset = 1
 
-    $(@thumbnails).get(0).scrollLeft = offset
+    @thumbnails.scrollLeft = offset
     @
 
 


      preload = new Image()
      preload.onload = ->
        $(image).after templates['image-hover'].replace '{{cid}}', cid

        popover = document.querySelector "[data-pid=\"#{cid}\"]"
        setStyle popover,


      if @options.thumbnails
        @thumbnails.innerHTML = ''
        removeHandler @overlay, 'click', '.choc-thumbnails-toggle'

      removeHandler window, 'resize'

      @current = null

