google.load("jquery", "1.3.2");

google.setOnLoadCallback(function()
{
	//setNoConflict();
	// Safely inject CSS3 and give the search results a shadow
	var cssObj = { 'box-shadow' : '#888 5px 10px 10px', // Added when CSS3 is standard
				'-webkit-box-shadow' : '#888 5px 10px 10px', // Safari
				'-moz-box-shadow' : '#888 5px 10px 10px'}; // Firefox 3.5+
				jQuery("#suggestions").css(cssObj);

	// Fade out the suggestions box when not active
	 jQuery("input").blur(function(){
	 	jQuery('#suggestions').fadeOut();
	 });

});

function lookup(inputString) {
	if(inputString.length <= 2) {
		jQuery('#suggestions').hide();
		jQuery('#suggestions').fadeOut(); // Hide the suggestions box
	} else {
		jQuery.post("/legals/ajax/LocationSearch.cfm", {keyword: ""+inputString+""}, function(data) { // Do an AJAX call
			if (data.indexOf('None') == -1) {
				jQuery('#suggestions').fadeIn(); // Show the suggestions box
				jQuery('#suggestions').html(data); // Fill the suggestions box
			}
			else{
				//jQuery('#suggestions').html(''); // Fill the suggestions box
				jQuery('#suggestions').hide();
			}
		});
	}
}
