function pudMagick() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
   
		if (anchor.getAttribute("href") &&
			anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
			anchor.className = "external";
		}

		anchor.onfocus = function() { this.blur; }
	}

	var headers = document.getElementsByTagName("h1");
	if (headers[0]) {
		headers[0].onclick = function() { window.location="index.php" }
	}

}

window.onload = pudMagick; 

$(document).ready(function() {
  $('h2#quoteHeading').click(function() {
    $('#quoteForm').slideToggle('slow');
	$('#quoteSubmit').toggle(400);
    return false;
  });
});

function currentPage(which) {
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if ((node.nodeName=="LI") && (node.firstChild.innerHTML == ("<span>" + which + "</span>"))) {
			node.className="current";		
		}
	}

}
