 
   hide: ->
     $(@selector).modal("hide")
-
-  highlight: (str, phrases) ->
-    str.toString().replace(new RegExp('('+phrases.join('|')+')', 'gi'), '<strong>$1</strong>')
 
   markActiveResult: ->
     if @active_result?

  KEY_DOWN: 40
  KEY_ENTER: 13
  KEY_ESC: 27
  
  constructor: (@parent, @selector, @result_callback) ->
    @active_result = null
    self = this

      result = @results[index]
      @result_callback.apply(null, [result])

  getActiveResult: ->
    if @active_result?
      all = $(@selector+" .result")
