     # Default settings
     defaults:
       debug: false  # set to true to log messages to the console
-      navSelector: 'a[rel=next]'
+      navSelector: null
+      nextSelector: 'a[rel=next]'
       buffer: 1000  # 1000px buffer by default
-      loading: null # optional callback when next-page request begins
       success: null # optional callback when next-page request finishes
       error:   null # optional callback when next-page request fails
       context: window # context to define the scrolling container
+      loading: null
+      ajax:
+        path: undefined
+        dataType: 'html'
+        method: 'html'
       state:
         paused:  false
         loading: false

        else
          @next() # load the next page

    # Load the next page
    next: ->
      if @options.state.done
        @_log "Loaded all pages"
      else
        @_loading()

        $container = @$container
        @requestAts.push +new Date # note when this request started
        $.getScript(@$container.find(@options.navSelector).attr('href'))
          .done(=> @_success($container))
          .fail(=> @_error($container))

    _loading: ->
      @options.state.loading = true
      @_log "Loading next page..."
      if typeof @options.loading is 'function'
        @$container.find(@options.navSelector).each(@options.loading)

    _success: ($container) ->
      # ignore any requests for elements that are no longer on the page
      return unless $.contains(document, $container[0])
      @options.state.loading = false
      @_log "New page loaded!"
      if typeof @options.success is 'function'
        $container.find(@options.navSelector).each(@options.success)

    _error: ($container) ->
      # ignore any requests for elements that are no longer on the page
      return unless $.contains(document, $container[0])
      @options.state.loading = false
      @_log "Error loading new page :("
      if typeof @options.error is 'function'
        $container.find(@options.navSelector).each(@options.error)

    # Pause firing of events on scroll
    pause: ->

      @$container = $(container)
      @$table = $(container).find('table')
      @$context = $(@options.context)
      @instanceId = @constructor._nextInstanceId()
      @init()

    # Setup and bind to related events
