     @currentPage.style.display = "block"
     @targetPage.style.left = "0%"
     @currentPage.style.left = "100%"
-
-    @removeClass(@currentPage, 'visible')
-    @addClass(@targetPage, 'visible')
     @isTransitioning = false
-      
-  # fits viewport to content height
-  fitHeightToContent: ->
-    flightViewport = document.getElementById 'flight'
-    content = document.getElementsByClassName('visible')[0].getElementsByClassName('content')[0]
-    if flightViewport? and content?
-      flightViewport.style.height = content.offsetHeight + "px"
-    else
-      throw new Error "#flight or .content not found."
   
   # detects user agent being used
   detectUserAgent: ->

     
  # 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) =>      

    
    if not @currentPage
      # No current panel set, app just started, make start panel visible
      @targetPage.style.display = "block"
      @pageHistory = [window.location.hash];
      @startPage = [window.location.hash];
      @currentPage = @targetPage
      return    
    
    # if already transitioning then return   
    if @isTransitioning is true then return else @isTransitioning = true    
    
    if @targetPage is @startPage
      @back = true
