function searchLink() {
	$("#form-search input.textfield").after("<a href=''></a>");
	$("#form-search a").click(function() {
		this.parentNode.submit();
		return false;
	});
}

// Return the value of all textfields to their default in the case where a they are blank onBlur
function swapDefault() {
	$("input[@type=text]").each(
		function() {
			$(this).focus(
				function() {
					$(this).addClass("focus");
					if(this.defaultValue && this.value == this.defaultValue) this.value = "";
				}
			).blur(function() {
				$(this).removeClass("focus");
				if(this.defaultValue && !this.value.length) this.value = this.defaultValue;
			}
		);
	});
}

// Remove useless whitespace from all unordered lists in a page
function cleanLists() {
	$("ul").each(function() {
		var node	= this.firstChild;
		while(node) {
			var nextNode	= node.nextSibling;
			if(node.nodeType == 3 && !/\S/.test(node.nodeValue))
			this.removeChild(node);
			node	= nextNode;
		}
		return this;
	});
}

// Add various cosmetic elements to the UI and keep the HTML clean of unneccessary code

function layOut() {
	$("div#main").after('<div id="main-foot" />');
//	$("ul#subnav a").prepend("&raquo; ");
}