/* 

	Created by: Sean Downey, downeywebdev.com
	Changes the status bar to the title of the link instead of the url just by setting a class name
	
*/

this.setHoverEvents = function(){
	
	// CONFIG
		
	
	/*
	 * css class of images that you want to apply this script to
	 * if you want to apply this script to all images inside anchor tags, leave this string blank
	 */
	var linkClass = "";


	// END CONFIG
	
	var anchorTags = document.getElementsByTagName("a");
	for (var i=0;i<anchorTags.length;i++){		
		if(anchorTags[i].className == linkClass || linkClass == ""){
			anchorTags[i].onmouseover = function(){
				window.status = this.title;
				return true;
			};
			anchorTags[i].onmouseout = function(){
				window.status = '';
				return true;
			};		
		};
	};

};



// script initiates on page load. 

this.addEvent = function(obj,type,fn){
	if(obj.attachEvent){
		obj['e'+type+fn] = fn;
		obj[type+fn] = function(){obj['e'+type+fn](window.event );}
		obj.attachEvent('on'+type, obj[type+fn]);
	} else {
		obj.addEventListener(type,fn,false);
	};
};
addEvent(window,"load",setHoverEvents);
addEvent(window,"resize",setHoverEvents);