var IE = document.all;
var aniMenu = Class.create();

aniMenu.prototype = {

	initialize: function() {
		
		var els = document.getElementById('topNav').getElementsByTagName('LI');
		var idCount = '1', el;
		for(var i=0; i<els.length; i++) {
			el = $(els[i]);
			if (el.hasClassName('top')) {
				if (IE) {
					els[i].onmouseover = this.animChange;
					els[i].onmouseout = this.animRestore;
				}
				if (els[i].id == '') {
					els[i].id = 'el' + idCount;
					idCount = parseInt(idCount) + parseInt('1');
				}
			}
		}
	},
	
	animChange: function() {
		this.className+=" over";
	},
	animRestore: function() {
		this.className=this.className.replace(" over", "");
	}
};

document.observe('dom:loaded', function () { new aniMenu(); });