 
       choose: ->
         $li = @$el.find ".cur"
-        str = ""
-        if $li.lenght > 0
-          "#{@at.query.text} "
-        else
-          $li.attr(@at.get_opt("choose")) + " "
-
-        @at.replace_str(str)
+        @at.replace_str($li.data("value") || "") if $li.length > 0
         this.hide()
 
       reposition: ->

      ENTER: 13

    DEFAULT_CALLBACKS =

      matcher: (flag, subtext) ->
        regexp = new RegExp flag+'([A-Za-z0-9_\+\-]*)$|'+flag+'([^\\x00-\\xff]*)$','gi'
        match = regexp.exec subtext

        ## so that we could append different value to the input other than the value we searched in
        data: null
        search_key: "name"
        callbacks: {}
        cache: yes
        limit: 5
