     os = @detectUserAgent()
     @transitionAnimation = false if os.android and os.version <= '2.1'
 
-    if @hideUrlBar is true then @hideUrlBar()
+    @hideUrlBar() if @hideUrlBar
 
   # Public: Go to a specific page.
   #

    window.setTimeout =>
      @targetPage.addEventListener "webkitTransitionEnd", @finishTransition, false
    , 20
    @resetState()

  # Public: Perform a slide out transition for the menu.
  #
  # Returns nothing.
  slideOutMenu: =>

class Flight

  isTransitioning: false
  currentPage: ''
  targetPage: ''
  pageHistory: []
  os: {}
  hideUrlBar: false
  noClickDelay: true
  menuOpen: false
  back: false

  transitionAnimation: true
  speed: '0.4s'
  mainMenu: '#slide-out-menu'

  # Public: Instantiate Flight and set any options.
  #
  # options - A Hash of options for flight.
  #
  # Returns nothing.
  constructor: (options = {}) ->
    if options.transitionAnimation?
      @transitionAnimation = options.transitionAnimation

    @speed = options.speed if options.speed?

    @mainMenu = options.mainMenu if options.mainMenu?
    @mainMenu = document.querySelector @mainMenu if typeof @mainMenu is "string"
