     else
       throw new Error "#flight or .content not found."
 
+  # detects user agent being used
   detectUA: ->
     userAgent = window.navigator.userAgent
     @os.webkit = (if userAgent.match(/WebKit\/([\d.]+)/) then true else false)

      if options.targetPanel?
        @targetPanel = options.targetPanel
        @pageHistory.push(@targetPanel)
        @targetPanel = document.querySelector(options.targetPanel)
        transitionType = @targetPanel.getAttribute("data-transition")
      else

          @back = options.back
          if @back is true
            if @pageHistory.length > 1
              # get target panel from history
              @targetPanel = @pageHistory[@pageHistory.length - 2]
              @targetPanel = document.querySelector(@targetPanel)
              transitionType = @targetPanel.getAttribute("data-transition")
