       event.stopPropagation()
       @product_images.classList.toggle('zoomed')
       # @sharer.toggleClass('hidden')
+
+    @init()
 
     if @product_thumbnails
       @product_thumbnails.addEventListener 'click', @goToSlide


    @main_image_wrapper.children.item(@current_slide_index).classList.add('current')


document.addEventListener "DOMContentLoaded", ->
  if(document.querySelector('#product-images') != null)

    @product_thumbnails = @product_images.querySelector('#product-thumbnails')
    @zoom = @main_image_wrapper.querySelector('#zoom')
    @sharer = $('#social.product')
    @current_slide_index = 0

    @slideshow_length = @main_image_wrapper.querySelectorAll('img').length

