   startPage: ''
   os: ''
   iScroll: {}
-  moved: false
 
   isTransitioning: false
   menuOpen: false

        window.scrollTo 0, 1
    , 50

  handleEvents: (e) =>
    switch e.type
      when 'touchstart' then @onTouchStart(e)
      when 'touchmove' then @onTouchMove(e)
      when 'touchend' then @onTouchEnd(e)  
      when 'click' then @onTouchEnd(e)  

  onTouchStart: (e) ->
    @moved = false
    e.target.addEventListener('touchend', @onTouchEnd, false)
    e.target.addEventListener('touchmove', @onTouchMove, false)

  onTouchMove: (e) ->
    @moved = true

  onTouchEnd: (e) ->
    e.target.removeEventListener('touchmove', @onTouchMove, false)
    e.target.removeEventListener('touchend', @onTouchEnd, false)
    e.preventDefault()
    e.stopPropagation()
    
    if not @moved 
      e.target.focus()
      theEvent = document.createEvent('MouseEvents')
      theEvent.initEvent('click', true, true)
      e.target.dispatchEvent(theEvent) 

  fixInput: (e) =>
    if not @os.android
      return
    target = e.touches[0].target

    if target and target.type != undefined
      tagname = target.tagName.toLowerCase()

      if tagname is "select" or tagname is "input" or tagname is "textarea"
        flight.prevClick = target

    # think this is for if you move onto a form element
    document.addEventListener('touchmove', this, true)
    document.addEventListener('touchend', this, true) 

window.Flight = Flight

    @transitionAnimation = false if @os.android and @os.version <= '2.1'

    @hideUrlBar() if options.hideUrlbar

  # Public: Go to a specific page.
  #
