 
     addHandler @overlay, 'click', =>
       @close()
-    , '.choco-close'
+    , ".#{choco}-close"
 
 
     for container in ['overlay', 'leftside', 'rightside']

    loading = hasClass item.slide, class_loading
    if loading
      loadImage item, (success) =>
        item.size = item.slide.querySelector('.choco-slide-container').offsetWidth
        console.log item.size
        @leftside.style.width = (env.w - item.size) / 2 + 'px'
        @rightside.style.width = (env.w - item.size) / 2 + 'px'

    true


    data = chocolate.storage.add data
    return unless data

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

    data.slide = beforeend(chocolate.slider, mustache templates['slide'], data)[0]
    data.slide.classList.add class_loading

    data.img = data.slide.querySelector ".#{choco}-slide-image"

    method = chocolate.options.actions.container if chocolate.options.actions.container in existActions

    if method
      addHandler data.slide, 'click', ->
        chocolate[method]()
      , ".#{choco}-slide-container"


    if image

