function OnLoad() {
  new CSEOverlay("000722809056366249533:sewuis2dgzi",
                 document.getElementById("searchbox_000722809056366249533:sewuis2dgzi"),
                 document.getElementById("results_000722809056366249533:sewuis2dgzi"));
}
GSearch.setOnLoadCallback(OnLoad);
function populateElement(selector, defvalue) {
	jQuery(selector).each(function() {
		if(jQuery.trim(this.value) == "") {
			this.value = defvalue;
			this.addClass('placeholderText');
		}
	});
  
	jQuery(selector).focus(function() {
		if(this.value == defvalue) {
			this.value = "";
			this.removeClass('placeholderText');
		}
	});
	
	jQuery(selector).blur(function() {
		if(jQuery.trim(this.value) == "") {
			this.value = defvalue;
			this.addClass('placeholderText');
		}
	});
}

jQuery(document).ready(function() {
	if(jQuery.browser.webkit) {
		// Nice HTML 5 Search Box
		jQuery('#q').attr('autosave', 'lhc_srch');
		jQuery('#q').attr('results', '5');
		if(window.outerWidth > 480) {
			document.getElementById('q').style.width = '200px'
		}
		jQuery('#q').removeClass('gsearchbox');
		jQuery('.gsearchbutton').hide();
	}
	else {
		// Still nice but kind of hacked together Search Box
		populateElement('#q', 'Search...');
		jQuery('#q').css('background-image', 'url(images/srch_bg_lrg.jpg)');
		jQuery('#q').css('width', '162px');
		jQuery('.gsearchbutton').hide();
	}
});