jQuery.fn.gMapAutocomplete = function(customOptions)
{
    var options = {};
    
    jQuery.extend(options, customOptions); 
    
    return this.each(function(index) 
    {
        jQuery(this).legacyautocomplete(
            gMapAutocompleteUrl,
            {
                'minChars': 2,
                'delay': 500,
                'matchCase': false,
                'max': 10
            }
        ).result(function(event, item) 
        {
            jQuery(this).trigger('focus');
            
            return false;
        });
    });
}

