 
     thumbnails = if not @options.thumbnails or @thumbnails.css('display') is 'none' then 0 else @thumbnails.height()
 
-    horizontal = parseInt(@overlay.css('padding-left'), 10) + parseInt(@overlay.css('padding-right'), 10)
-    vertical   = parseInt(@overlay.css('padding-top'), 10) + parseInt(@overlay.css('padding-bottom'), 10)
+    horizontal = toInt(@overlay.css('padding-left')) + toInt(@overlay.css('padding-right'))
+    vertical   = toInt(@overlay.css('padding-top')) + toInt(@overlay.css('padding-bottom'))
 
     innerWidth   = window.innerWidth
     windowWidth  = innerWidth - horizontal


existActions = ['next', 'prev', 'close']

isHistory    = not not (window.history and history.pushState)
# isFullscreen = document.webkitRequestFullScreen || document.mozRequestFullScreen
# test = document.getElementById 'choco-overlay'
# if test.webkitRequestFullScreen

    else
      after.call @, cid


  ###
   Обновление размеров блока с главным изображением
  ###
