       if customHistory.length is 1
         console.warn "You are on the first panel."
         window.history.go -1
-        
+
       # Go back an arbitrary number of internal pages.
       if typeof toPage == 'number'
         if toPage > 0
           customHistory.splice 1, toPage
         else if toPage < 0
           customHistory.splice 1, customHistory.length + toPage - 1
-      
+
       # Go back to a specific page defined by a hash
       # independent of its place in history.
       else if /^#.+/.test toPage
         end = 0
-        
+
         for h, i in customHistory
           if h.hash == toPage
             end = i
             break
-            
+
         customHistory.splice 1, end - 1
 
       from = customHistory[0]
       to = customHistory[1]
-      
+
       return unless from? and to?
-      
+
       if doNavigation(from.page, to.page, from.animation, true)
         @
       else

    touchStartHandler = (e) ->
      $el = $(e.target)
      selectors = touchSelectors.join(", ")
      
      # Find the nearest tappable ancestor
      $el = $el.closest(selectors) unless $el.is(selectors)
      
      # Make sure we have a tappable element
      $el.addClass "active" if $el.length and $el.attr("href")
      
      # Remove our active class if we move
      $el.on (if support.touch then "touchmove" else "mousemove"), ->
        $el.removeClass "active"


    setHash = (hash) =>
      location.hash = "#" + hash.replace(/^#/, "") if @settings.updateHash

    submitHandler = (e, callback) =>
      $(":focus").trigger "blur"

      $form = (if (typeof (e) is "string") then $(e).eq(0) else ((if e.target then $(e.target) else $(e))))

      if $form.length and $form.is(@settings.formSelector) and $form.attr("action")
