$(document).ready(function(){

	// set search input text on load
	var input_text = $('#keyword').val();
	if(input_text=='') $('#keyword').val('search site');

	// hide search input text on focus
	$('#keyword').focus(
		function(){
			var input_text = $(this).val();
			if(input_text=='search site') $(this).val('');
		}
	);

	// show search input text on blur
	$('#keyword').blur(
		function(){
			var input_text = $(this).val();
			if(input_text=='') $(this).val('search site');
		}
	);
	
	// move footer to bottom of short pages
//	var windowHeight = getWindowHeight();
//	if(windowHeight>0)
//	{
//		var containerHeight = $('#container').get(0).offsetHeight;
//		var siteinfoHeight = $('#siteinfo').get(0).offsetHeight;
//		if(containerHeight<windowHeight)
//		{
//			$('#container').css('height',windowHeight-siteinfoHeight+'px');
//			$('#siteinfo').css('top',windowHeight-containerHeight-15+'px');
//		}
//	}

});

// window height
function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') windowHeight=window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight) windowHeight= document.documentElement.clientHeight;
	else if (document.body && document.body.clientHeight) windowHeight=document.body.clientHeight;
	return windowHeight;
}