$(document).ready(function() {
	
	$('button').mouseover( function() { $(this).addClass('hover'); } )
			   .mouseout( function() { $(this).removeClass('hover'); } );
	
	//
	// Put some niceness on the search form.
	//
	
	// Make the input text brighter if the value is searchable.
	if ( $(".search input").val() != '' && $(".search input").val() != 'Search' ) {
		$(".search input").addClass("active");
	}
	// Do stuff when selecting the input field.
	$(".search input").focus(
		function()
		{
			$(this).attr("rel", $(this).val())
					.val("")
					.addClass("active");
		}
	).blur(
		function()
		{
			if ( $(this).val() == '' ) {
				var relValue = $(this).attr("rel");
				$(this).val($(this).attr("rel")).removeAttr("rel");
			}
			if ( $(this).val() == '' || $(this).val() == 'Search' ) {
				$(this).removeClass("active");
			}
		}
	);
	
});

function validateSearch( el )
{
	if ( el.find("input").val() == '' || el.find("input").val() == 'Search' ) {
		return false;
	}
	return true;
}
