 
     data.slide = beforeend(chocolate.slider, mustache templates['slide'], data)[0]
     data.thumbnail = beforeend(chocolate.thumbnails, mustache templates['thumbnails-item'], data)[0]
+
+
+    addHandler data.thumbnail, 'click', -> chocolate.select data
+
 
     if image
 


    @options = merge defaultOptions, options

    #@storage = new ChocolateStorage @options.repeat
    @storage = new ChocolateStorage false

    template = templates['overlay']
    template = template.replace '{{spinner}}', templates['spinner']

  open: (cid, updateHistory) ->
    addClass @overlay, 'choco-show'
    addClass document.body, 'choco-body'
    getEnv() if env.shift is 0
    @updateDimensions()
    @select cid, updateHistory
    @
