document.observe("dom:loaded", function() {
  new Ajax.Autocompleter("short_products", "short_autocomplete_choices", "/autocomplete/products", {
    minChars: 1, 
    frequency: 0.01
  });

  ['products', 'keyword', 'county_or_state', 'entity_type'].each( function(name, idx) {
    var short_name = 'short_' + name;
    if ($(short_name) && $(name)) {
      new Form.Element.Observer(short_name, 0.4, function(el, value) { $(name).value = value; });
    }
  });
  
});