// Copyright (c) 2006 Jay Jones
// 
// Big Hover
// 
// Searches a passed element name for specified class, and converts 
// that element into an <a href>... giving the element a new class name as well.
//
// format is: clickArea(tagName, className, hoverClass)
//
// Example: 
// window.onload=function(){
//    clickArea("div", "bybiglink", "mybighover");
// 	 if(!NiftyCheck())
//     return;
// 		Rounded("div#footer-note","all","#00659e","#127cb8");
// }
// 

/*--------------------------------------------------------------------------*/

function clickArea(tagName, className, hoverClass) {
	var els = document.getElementsByTagName(tagName);
	for (var i = 0; i < els.length; i++) if (els[i].className.indexOf(className)>=0) {
		els[i].onmouseover=function() {
			this.className+=" " + hoverClass;
			window.status = this.getElementsByTagName("a")[0].href;
			return true;
		}
		els[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" " + hoverClass + "\\b"), "");
			window.status = "";
			return true;
		}
		els[i].onclick = function () {location.href = this.getElementsByTagName("a")[0].href}
   }
}
