$(document).ready(function(){
	// remove the label for the search box - put it into the search box itself

	$("#searchForm label[@for=searchText]").hide();
	helptext = $("#searchForm label").text();
	$("#searchForm #searchText").val(helptext);
	$("#searchForm #searchText").click(function(){
		if (helptext == $("#searchForm #searchText").val()) 
			$("#searchForm #searchText").val("");
	});
	$("#searchForm").submit(function(){
		//  Remove the searchMatch class from all elements.
		$('.searchMatch').removeClass("searchMatch");
		//  Clean up interface (close all items and reset class to collapsed).
		var hits = new Array();
		searchValue = $('#searchText').val();
		$.post("KeepingTrackSearch.php", {search_term : searchValue}, function(data){
			$("#search_results").html(data);
		});
	});
});