         on_cancel: @cancel
         on_success: @capture
       @submit_soon = _.debounce(@submit, 500)
-      @bindInputs() if @_options.fast
+      @bindInputs(@_options.fast) if @_options.fast
       @_form.bind 'refresh', @changed
       if @_options.auto
-        @submit() 
+        @submit()
       else
         @bindLinks()
       if @_historical

      @_container.find('a.cancel').click(@revert)
      @_container.find('.pagination a').click @page

    bindInputs: () =>
      @_form.find('input[type="search"]').bind 'keyup', @changed
      @_form.find('input[type="search"]').bind 'change', @changed
      # @_form.find('input[type="search"]').bind 'click', @changed  # for the clear-box control in webkit search fields
      @_form.find('input[type="text"]').bind 'keyup', @keyed
      @_form.find('input[type="text"]').bind 'change', @changed
      @_form.find('select').bind 'change', @changed
      @_form.find('input[type="radio"]').bind 'click', @clicked
      @_form.find('input[type="checkbox"]').bind 'click', @clicked

    keyed: (e) =>
      k = e.which

  #
  $.fn.suggestion_form = (options) ->
    @each ->
      new CaptiveForm @,
        fast: true
        auto: false
        into: "#suggestion_box"
        history: false
    @

  $.fn.faceting_search = (options) ->
    defaults = 
      fast: ".facet"
      history: true
      threshold: 4
    @each ->
      new CaptiveForm @, _.extend(defaults, options)
    @


  class CaptiveForm
    @default_options: {
