     window.setTimeout =>
       @targetPage.addEventListener "webkitTransitionEnd", @finishTransition, false
     , 20
-    @resetState()
+    @back = false
+    @isTransitioning = false
 
-  # Public: Perform a slide out transition for the menu.
+  # Private: Perform a slide out transition for the menu.
   #
   # Returns nothing.
   slideOutMenu: =>

    window.setTimeout =>
      @translate(@targetPage, "X", "0%")
      @currentPage.addEventListener "webkitTransitionEnd", @finishTransition, false
      @resetState()
    , 5

  # Public: Perform a slide from bottom transition.
  #
  # Returns nothing.
  slideFromBottom: ->

      @translate(@currentPage, "X", "250px", "0.3s")
      @menuOpen = true
      
  # Private: Finish any transitions.
  #
  # Returns nothing.
  finishTransition: =>
    @currentPage.style.display = "none"
    @currentPage.removeEventListener "webkitTransitionEnd", @finishTransition, false
    @currentPage = @targetPage

  # Private: Translate page on a specified axis.
  #
  # page     - An Element of the page.
  # axis     - A String of the axis.
  # distance - A String of the distance.
  # duration - A String of the duration, defaults to speed.
  #
  # Returns nothing.
  translate: (page, axis, distance, duration) =>
    duration = @speed unless duration?
    page.style.webkitTransition = "#{duration} ease"
    page.style.webkitTransform = "translate#{axis}(#{distance})"

  # Private: Display the current page.
  #
  # Returns nothing.
  displayPage: =>
    @targetPage.style.display = "-webkit-box"
    @currentPage.style.display = "-webkit-box"
    @targetPage.style.left = "0%"
    @currentPage.style.left = "100%"
    @isTransitioning = false

  # Private: Get a Hash of browser user agent information.
  #
  # Returns a Hash of user agent information.
  detectUserAgent: ->
