$(function(){
	//homeSetHeight();
	setValue('q', 'Search IDEA.org');
});

function homeSetHeight(){
	var ki = $('#about_idea').outerHeight() + $('#whats_new').outerHeight() + 48;
	var ka = $('#explore_exhibits').outerHeight();
	
	if(ki > ka){
		$('#explore_exhibits').height(ki);
	}else{
		var ku = $('#content').outerHeight() - $('#about_idea').outerHeight();
		$('#whats_new').height(ku);
	}
}

function setValue(id, str){
	$('#'+id).bind('focus', function(){
		var val = $(this).val();
		if(trim(val) == str){
			$(this).val('');
		}
	});
	$('#'+id).bind('blur', function(){
		var val = $(this).val();
		if(trim(val) == ''){
			$(this).val(str);
		}
	});
}

function trim(str){
	return str.replace(/^\s+|\s+$/g,"")
}

