window.onload = bar;
  function bar() {
	  var li = document.getElementById('bar').getElementsByTagName('LI');
	  
	  for( var i = 0; i < li.length; i++) {
		li[i].onmouseover = function() { 
		
			this.className = 'hover';
			this.getElementsByTagName('A')[0].className = 'hover';
			}
		li[i].onmouseout = function() { this.className = this.className.replace('hover', '' ); 
		this.getElementsByTagName('A')[0].className= this.getElementsByTagName('A')[0].className.replace('hover', '');
		}
		
	  }
  }
