/**
 * Prototype javascript effects for filtering
 *
 * @package Templates
 * @author  Andreas Goetz   <cpuidle@gmx.de>
 * $Id: index.js,v 1.9 2008/10/19 10:45:28 andig2 Exp $
 */

/**
 * Clean pre-populated text from input controls
 */
/**
 * Prototype javascript effects for filtering
 *
 * @package Templates
 * @author  Andreas Goetz   <cpuidle@gmx.de>
 * $Id: index.js,v 1.9 2008/10/19 10:45:28 andig2 Exp $
 */
    /**
     * Quicksearch
     */
    $('quicksearch').focus();

    new Ajax.Autocompleter("quicksearch", "item_choices", "search.php", {paramName: "ajax_quicksearch", 
        minChars: 1, indicator: 'indicator1', frequency: 0.2,
        afterUpdateElement: function(text, li) {
            document.location = 'show.php?id='+li.id;
        }
    });

    /**
     * Enable disabled controls
     */
//    $$('.autoenable').invoke('writeAttribute', {disabled: false});
//    $('quicksearch').writeAttribute({disabled: false});
});
