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

    @storage = new ChocolateStorage @options.repeat

    template = templates.overlay
    template = template.replace '{{spinner}}', templates.spinner
    template = template.replace '{{thumbnails}}', if @options.thumbnails then templates.thumbnails else ''

    @overlay = beforeend(document.body, template)[0]

    containers = ['container', 'leftside', 'rightside', 'slider']
    containers.push 'thumbnails' if @options.thumbnails

    for container in containers
      @[container] = @overlay.querySelector ".choco-#{container}"

    @add images if images





  updateSides: (item) ->
    if not item.size
      item.size = item.slide.querySelector(".#{choco}-slide-container").offsetWidth
    @leftside.style.width = (env.w - item.size) / 2 + 'px'
    @rightside.style.width = (env.w - item.size) / 2 + 'px'




  initTouch: -> true


