//
// protogenLabs.com General Runtime Scripts
//
function overg()
{
	document.getElementById("bioimgg").style.background = "url(/images/gM_on.jpg) no-repeat center #000";
}
function overj()
{
	document.getElementById("bioimgj").style.background = "url(/images/jK_on.jpg) no-repeat center #000";
}
function outg()
{
	document.getElementById("bioimgg").style.background = "url(/images/gM_off.jpg) no-repeat center #444";
}
function outj()
{
	document.getElementById("bioimgj").style.background = "url(/images/jK_off.jpg) no-repeat center #444";
}

// Javascript getElementsByStyleClass
//
function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
}


// Javascript Open in New Window
//
function externalLinks() {
 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";
 }
}

// Javascript Reflection.js
//
function wetfloor() {
	Reflection.add(document.getElementById("hexorb1"), { height: 1/2, opacity: 1/5 });
	Reflection.add(document.getElementById("hexorb2"), { height: 1/2, opacity: 1/5 });
	Reflection.add(document.getElementById("hexorb3"), { height: 1/2, opacity: 1/5 });
	Reflection.add(document.getElementById("rssfooticon"), { height: 1/2, opacity: 1/5 });
}
function hwetfloor() {
	Reflection.add(document.getElementById("rssfooticon"), { height: 1/2, opacity: 1/5 });
	Reflection.add(document.getElementById("thumbgif"), { height: 1/4, opacity: 0.3 });
}


// jQuery Effects: smooth link scrolling / sidebar toggles

$(document).ready(
	function() {
		$.localScroll();
		$("a#togglerblog").click(function () {
			$("div#togblog").slideToggle("slow");
			return false;
		});
		$("a#togglersearch").click(function () {
			$("div#togsearch").slideToggle("slow");
			return false;
		});
		$("a#togglerport").click(function () {
			$("div#portfolio_sidebar").slideToggle("slow");
			return false;
		});
	}
);
	function togglediv(whichdiv) {
		$(whichdiv).slideToggle("slow");
	}
