// JavaScript Document

$(document).ready(function(){
	
	
	Cufon.replace($("h1, h2"));
	
	/* --------------------------------------------------------------------   Search box    --------------------------------------------------------------------*/
	/* Put text in the text box, and hide it when the user clicks it */
	
	var startingText = "Search OC";
	
	$("#box:input").attr("value", startingText).focus(function () {
		var currentText = $(this).attr("value");
		if (currentText == startingText){
			$(this).attr("value", '');
		}
		
	}).blur(function () {
		var currentText = $(this).attr("value");
		if (currentText == undefined){
			$(this).attr("value", startingText);
		}
	});
	
	/* Don't let people search with the default text in the input box */
	$("#go").click(function(e){
		var currentsearch = $("#box").attr("value");
		if (currentsearch == startingText){
			alert ("Please enter a search term");
			e.preventDefault();
		}
	});
	
});
