function morph(elem,className) {
	var myEffect = new Fx.Morph(elem, {duration: 500, transition: Fx.Transitions.Sine.easeOut});
	myEffect.start(className);
}


function swapImg(el,which){
 	el.src=el.getAttribute(which||"origsrc");
}

function swapImgSetup(){
	var x = document.getElementsByTagName("img");
	for (var i=0;i<x.length;i++){
		var origsrc = x[i].getAttribute("origsrc");
		if (!origsrc) x[i].setAttribute("origsrc",x[i].src);
		var oversrc = x[i].getAttribute("oversrc");
		if (!oversrc) continue;
		// preload image
		x[i].oversrc_img = new Image();
		x[i].oversrc_img.src=oversrc;
		// set event handlers
		x[i].onmouseover =function() { swapImg(this,'oversrc'); }// new Function("swapImg(this,'oversrc');");
		x[i].onmouseout = function() { swapImg(this,'origsrc'); }//new Function("");
	}
}

var PreswapImgOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreswapImgOnload(); swapImgSetup();}


