 
     @_hideLess() if @length is 1
 
-    addHandler window, 'resize', =>
-      image = @images[@current]
-      @updateDimensions image.width, image.height
+    addHandler window, 'resize', @_onResize
 
     @open cid
     @

    width += parseFloat css style for style in styles
    width


getTarget = (element, selector) ->
  if selector?

      throw "You don't have defaultOptions or templates variables"
      return false

    @options = merge defaultOptions, options

    ###
     Подготовка шаблонов
