//<![CDATA[
google.load("search", "1");
 
$(document).ready(function() {
	$("#search").blur(function () {
		if($(this).val() == ""){
			$(this).val("Google...");
			
		}
	});
 
	$("#search").focus(function () {
		if ($(this).val() == "Google...") {
			$(this).val("");
			$('#vert-navbar li a').removeClass('current');
			$("#content2").children("*:not('.googleheader,#googlesearch')").remove();
			$('#content2').slideUp(200);

		}
	});
 
	$("#search").keyup(function () {
		
		$("#content2").css("display", ""); 
		$(".siteheader").html('Loading Results from Site...');
		$(".googleheader").html('<img src="images/loading.gif" width="16" height="16" style="margin-right:8px; vertical-align:-15%;" />Loading Results from Google...');
 
		
 
		/* === Google Search === */
		var sc = new GSearchControl();
 
		sc.addSearcher(new GwebSearch());
		sc.addSearcher(new GvideoSearch());
		sc.addSearcher(new GblogSearch());
		sc.addSearcher(new GnewsSearch());
 
		var drawOptions = new GdrawOptions();
		drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
 
		var foo;
		sc.setSearchCompleteCallback(foo, function(){
			$(".googleheader").html('Results from Google:');
		});
 
		sc.setNoResultsString(GSearchControl.NO_RESULTS_DEFAULT_STRING);
 
	    sc.draw(document.getElementById("googlesearch"), drawOptions);
		sc.execute(document.getElementById("search").value);
		/* === End Search === */
 
		if($(this).val() == ""){
			$("#content2").slideUp(300, function(){	
			
			});
		}
	});
});
//]]>