// JavaScript Document

$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({
			height: "750px"
		}, "fast");

	
	});	
	
   $("div#hide_button").click(function(){
		$("div#panel").animate({
			height: "0px"
		}, "fast");
		
	
   });	
	
});

//functions to clear and load form inputs on blur and focus
	function erase() {
		if (document.searchform.s.value == "Search this site...") {document.searchform.s.value = " ";}
	}
	function restore() {
		if (document.searchform.s.value == " ") {document.searchform.s.value = "Search this site..."; }
	}
	function eraseAuthor() {
		if (document.commentform.author.value == "Name (required)") {document.commentform.author.value = " ";}
	}
	function restoreAuthor() {
		if (document.commentform.author.value == " ") {document.commentform.author.value = "Name (required)"; }
	}
	function eraseEmail() {
		if (document.commentform.email.value == "Email (required)") {document.commentform.email.value = " ";}
	}
	function restoreEmail() {
		if (document.commentform.email.value == " ") {document.commentform.email.value = "Email (required)"; }
	}
	function eraseUrl() {
		if (document.commentform.url.value == "Website (optional)") {document.commentform.url.value = " ";}
	}
	function restoreUrl() {
		if (document.commentform.url.value == " ") {document.commentform.url.value = "Website (optional)"; }
	}
	function eraseComment() {
		if (document.commentform.comment.value == "Type your comment here...") {document.commentform.comment.value = " ";}
	}
	function restoreComment() {
		if (document.commentform.comment.value == " ") {document.commentform.comment.value = "Type your comment here..."; }
	}

//make sure the form is not empty before sending

function notEmpty() {
	eraseAuthor();
	eraseEmail();
	eraseUrl();
	eraseComment();

}

