         window.scrollTo 0, 1
       ), 50
 
-  hasClass: (ele, cls) ->
-    ele.className.match new RegExp("(\\s|^)" + cls + "(\\s|$)")
-
-  addClass: (ele, cls) ->
-    ele.className += " " + cls  unless @hasClass(ele, cls)
-
-  removeClass: (ele, cls) ->
-    if @hasClass(ele, cls)
-      reg = new RegExp("(\\s|^)" + cls + "(\\s|$)")
-      ele.className = ele.className.replace(reg, " ")
-
 root           = this
 previousFlight = root.Flight
 

     
  # call on transition end
  finishTransition: =>
    @removeClass @currentPage, 'visible'
    @currentPage.style.display = "none"
    @addClass @targetPage, 'visible'    
    @currentPage.removeEventListener "webkitTransitionEnd", @finishTransition, false
    
   resetState: =>
    @back = false
    @isTransitioning = false   
    
   # translate page on secified axis. Duration defaults to speed property when not passed. Delay defaults to 0.
   translate: (page, axis, distance, duration) =>      

    @currentPage.style.display = "block"
    @targetPage.style.left = "0%"
    @currentPage.style.left = "100%"
    @isTransitioning = false
  
  # detects user agent being used
  detectUserAgent: ->
