
google.load('search', '1');

function inputFocus() {
	document.getElementById('query-input').value = '';
}

function inputBlur() {
	var queryInput = document.getElementById('query-input');
	if (!queryInput.value) {
	  queryInput.value = 'Search Our Site';
	}
}

function init() {
google.search.CustomSearchControl.attachAutoCompletion(
    '007575079463401621579:z_-bal2e2hw',
    document.getElementById('query-input'),
    'two-page-form');
	inputBlur();
}

function submitQuery() {
	window.location = '/search.php?q='
	    + encodeURIComponent(
	        document.getElementById('query-input').value);
	return false;
}

google.setOnLoadCallback(init);



$(document).ready(
	function() {
		$("#wrapper, .section.home .col, div.footer").corner("18px");
		$(".intro .gallery").corner("3px");
		//$(".header ul li").corner("14px");
		
		$('.spotlightcontainer').hide();
		
		
		$(".volspotlighthead").click(function(event){
			event.preventDefault();
			$(this).toggleClass("volspotlightheadactive").next().slideToggle("slow");
		});
		
		/*$(".volspotlighthead").toggle(
		    function () {
		        $(this).toggleClass("volspotlightheadactive");
		        $(this).siblings(".spotlightcontainer").slideDown("slow");
		    },
		    function () {
		        $(this).toggleClass("volspotlightheadactive").siblings(".spotlightcontainer").slideUp("slow");
		    }
		);
		*/


		
		/* Function for lavalamp navigation menu and dropdown */	
		$("#menu").lavaLamp({
			fx: "backout",
			speed: 700
		});
		
		$(" #menu ul ").css({display: "none"}); // Opera Fix
		$(" #menu li").hover(function(){
				$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
			},function(){
				$(this).find('ul:first').css({visibility: "hidden"});
			});
	
		/* if javascript disabled */
		$("body").removeClass("nojs").addClass("js");
		
		
		$(function() {
		    var H = 0;
		    $(".section.home .col").each(function(i){
		        var h = $(".section.home .col").eq(i).height();
		        if(h > H) H = h;
		    });
		    $(".section.home .col").height(H);
		});
		
		/*$("#siteSearchBtn").click(function(event){
			var query = $("#siteSearchQ").val();
			if(query.length > 0) {
				searchSite(query)
			}
		});
		
		$('#searchresultsdismisslink').click(function(event){
			 $('#searchcont').hide("slow");
		});
		*/
	});
	

	

