
$(document).ready(pgControls);

function pgControls() {
		
	/* Tab switching */
	$("#t1").click(function() {
		$("#s1").show();
		$("#s2").hide();
		$("#s3").hide();
		$("#s4").hide();
		$("#s5").hide();
		$("#s6").hide();
		});
	$("#t2").click(function() {
		$("#s1").hide();
		$("#s2").show();
		$("#s3").hide();
		$("#s4").hide();
		$("#s5").hide();
		$("#s6").hide();
		});
	$("#t3").click(function() {
		$("#s1").hide();
		$("#s2").hide();
		$("#s3").show();
		$("#s4").hide();
		$("#s5").hide();
		$("#s6").hide();
		});
	$("#t4").click(function() {
		$("#s1").hide();
		$("#s2").hide();
		$("#s3").hide();
		$("#s4").show();
		$("#s5").hide();
		$("#s6").hide();
		});
	$("#t5").click(function() {
		$("#s1").hide();
		$("#s2").hide();
		$("#s3").hide();
		$("#s4").hide();
		$("#s5").show();
		$("#s6").hide();
		});
	$("#t6").click(function() {
		$("#s1").hide();
		$("#s2").hide();
		$("#s3").hide();
		$("#s4").hide();
		$("#s5").hide();
		$("#s6").show();
		});

}

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function imgSwitch(pic) {
	var src=pic.getAttribute("href");
	var title=pic.getAttribute("title");
	var cap=pic.getAttribute("rel");
	var placeholder=document.getElementById("placeholder");
	placeholder.setAttribute("src", src);
	placeholder.setAttribute("title", title);
	var captitle=document.getElementById("captitle");
	var caption=document.getElementById("cap");
	captitle.firstChild.nodeValue=title;
	caption.firstChild.nodeValue=cap;
	}

































