         @thumbnails.innerHTML = ''
         $(@overlay.querySelector('.choco-thumbnails-toggle')).off 'click'
 
+      # jQuery
       $(window).off 'resize'
 
       @current = null

      throw "You don't have defaultOptions or templates variables"
      return false

    @options = $.extend defaultOptions, options

    ###

      content += template.replace('{{selected}}', selected)
                         .replace('{{cid}}', cid)
                         .replace('{{image}}', image.thumbnail)
                         .replace('{{title}}', if image.title then " title=\"#{image.title}\"" else '')

    $(@thumbnails).html(content).find('.choco-thumbnail').each ->
      thumbnail = $ @
      image = @getAttribute 'data-image'

      thumbnail.on 'click', -> _this.open toInt thumbnail.attr 'data-cid'
      setStyle @, "background-image": "url(#{image})"

    addHandler @overlay, 'click', ->
      current = _this.images[_this.current]
