     throw new Error('Requires an input field') unless @$input?
 
     @search = new Search
-      restrictType : @restrictType
-      mode         : @mode
-      fairId       : @fairId
+      restrictType: @restrictType
+      mode: @mode
+      fairId: @fairId
 
-    @on 'search:start',    @indicateLoading
+    @on 'search:start', @indicateLoading
     @on 'search:complete', @concealLoading
-    @on 'search:opened',   @displaySuggestions
-    @on 'search:closed',   @hideSuggestions
+    @on 'search:opened', @displaySuggestions
+    @on 'search:closed', @hideSuggestions
 
     @setupTypeahead()
 
   events:
-    'keyup input' : 'checkSubmission'
-    'focus input' : 'trackFocusInput'
+    'keyup input': 'checkSubmission'
+    'focus input': 'trackFocusInput'
 
   trackFocusInput: ->
     analytics.track.click "Focused on search input"


  setupBloodHound: ->
    @hound = new Bloodhound
      limit          : @limit
      datumTokenizer : Bloodhound.tokenizers.obj.whitespace 'value'
      queryTokenizer : Bloodhound.tokenizers.whitespace
      remote:
        url    : "#{@search._url()}&term=%QUERY"
        filter : (results) =>
          @trackSearchResults results
          @search._parse results
        ajax   :
          beforeSend: (xhr) =>
            xhr.setRequestHeader 'X-XAPP-TOKEN', sd.ARTSY_XAPP_TOKEN
            @trigger 'search:start', xhr

_ = require 'underscore'
Backbone = require 'backbone'
sd = require('sharify').data
Search = require './collections/search.coffee'
mediator = require '../../lib/mediator.coffee'
analytics = require '../../lib/analytics.coffee'
{ fill } = require '../../lib/resizer.coffee'
itemTemplate = -> require('./templates/item.jade') arguments...

module.exports = class SearchBarView extends Backbone.View
