 isHistory = not not (window.history and history.pushState)
 isStorage = 'localStorage' of window and window['localStorage']?
 isIE8     = document.documentMode? and document.documentMode is 8
-
-getTarget = (element, selector) ->
-  if selector?
-    target = element.querySelector selector
-  else
-    target = element
-  target
-
-addHandler = (element, event, listener, selector) ->
-  target = getTarget element, selector
-  if target?
-    unless event instanceof Array
-      event = [event]
-    for ev in event
-      target.addEventListener ev, listener, false
-
-addClass = (element, className, selector) ->
-  target = getTarget element, selector
-  if target.hasOwnProperty 'classList'
-    target.classList.add className
-
-removeClass = (element, className, selector) ->
-  target = getTarget element, selector
-  if target.hasOwnProperty 'classList'
-    target.classList.remove className
-
-toggleClass = (element, className, selector) ->
-  target = getTarget element, selector
-  if target.hasOwnProperty 'classList'
-    target.classList.toggle className
-
-hasClass = (element, className, selector) ->
-  target = getTarget element, selector
-  if target.hasOwnProperty 'classList'
-    target.classList.contains className
 
 class Chocolate
   images: {}

    width


toInt = (string) -> parseInt string, 10

cssAnimationsSupport = ->

    $(@rightside).css style

    if title
      addClass @header, 'choco-show'
      $(@header).css
        'width':       toInt width
        'margin-left': '-' + toInt(left) + 'px'
        'margin-top':  '-' + toInt(top + headerHeight) + 'px'
