function addhover(){
	var link = document.getElementsByTagName('a');
	var linklength = link.length;
	for(i=0; i < linklength; i++) {
		link[i].onmouseover = function() {
			this.className += this.className ? ' hover' : 'hover';
		}
		link[i].onmouseout = function() {
			var rep = this.className.match(' '+'hover') ? ' '+'hover' : 'hover';
			this.className=this.className.replace(rep,'');
		}
	}
}
addhover();