   if support is false
     support = true for prefix in prefixes when element.style[prefix + 'AnimationName'] isnt undefined
 
-  $('html').addClass 'cssanimations' if support is true
+  addClass document.querySelector('html'), 'cssanimations' if support is true
   support
 
 # Экспорт в глобальное пространство

      isElement = if typeof HTMLElement is 'object' then object instanceof HTMLElement else typeof object is 'object' and object.nodeType is 1 and typeof object.nodeName is 'string'

      if isElement
        image  = $ object
        object =
          source:    image.attr('data-src') or image.parent().attr('href')
          title:     image.attr('data-title') or image.attr('title')
          thumbnail: image.attr('src')

      @_addToGallery object, image
    @

    throw 'Image not found' unless @images[cid]?

    @createThumbnails cid
    addClass document.body, 'choco-body'
    addClass @overlay, 'choco-show'

    @_hideLess() if @length is 1

    addHandler window, 'resize', =>
      image = @images[@current]
      @updateDimensions image.width, image.height

