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

function lookup(inputString) {
	if(inputString.length == 0) {
		$('#suggestions').fadeOut();
	} else {
		$.post("/suggest.php", {queryString: ""+inputString+""}, function(data) { 
			$('#suggestions').fadeIn();
			$('#suggestions').html(data);
		});
	}
}
