
new Autocompleter.Local($('local','be_event'), be-event_produit, {
  delay: 100,
  filterTokens: function() {
    var regex = new RegExp('^' + this.queryValue.escapeRegExp(), 'i');
    return this.tokens.filter(function(token){
      return (regex.test(token[0]) || regex.test(token[1]));
    });
  },
  injectChoice: function(choice) {
    var el = new Element('li')
      .setHTML(this.markQueryValue(choice[0]))
      .adopt(new Element('span', {'class': 'example-info'}).setHTML(this.markQueryValue(choice[1])));
    el.inputValue = choice[0];
    this.addChoiceEvents(el).injectInside(this.choices);
  }
});