 
     enableSearch: ->
       @$el.find('.searchbar > .fa').
-      removeClass('fa-spinner fa-spin load-search').
+      removeClass('fa-times-circle clear-search').
       addClass('fa-search')
 
     handleSearch: ->

      'keydown .book-nav a.nav': 'changePageWithKeyboard'
      'click .toggle.btn': 'toggleContents'
      'click .back-to-top > a': 'backToTop'
      'keydown .searchbar input': 'handleSearchInput'
      'click .searchbar > .clear-search': 'clearSearch'
      'click .searchbar > .fa-search': 'handleSearch'


        if not @tocIsOpen
          @toggleContents()
        @model.set('searchResults', data.results)
        @enableClearSearch()
      ).fail((err) ->
        console.error("Search failed:", err)
      )
      
    handleSearchInput: (event) ->
      if event.target.value == '' && @$el.find('.searchbar > .clear-search').length > 0
        @enableSearch()
      if event.keyCode == 13
        event.preventDefault()
        @handleSearch()
