     @
 
   _onResize: (event) =>
+    getWindowSize()
     image = @images[@current]
     @updateDimensions image.width, image.height
 


      addClass image, 'choco-item'
      addHandler image, 'click', (event) ->
        showFirstImage event, cid

      preload = new Image()

      @dimensions.thumbnail = toInt @_outerWidth after

    offset = after.offsetLeft + after.offsetWidth / 2
    thumb = @thumbnails.offsetWidth
    offset = env.w / 2 - offset
    if offset > 0
      offset = 0
    if thumb + offset < env.w
      offset = env.w - thumb
    console.log offset

    translate @thumbnails, offset
    @
