(function () {
	window.addEvent('domready',function () {
		// Setup navigation menus..
		var navlist = $('navlist');
		
		if (typeOf(navlist) == "element") {
			var cssRule;
			var newSelector;
			
			for (var i = 0; i < document.styleSheets.length; i++) {
				for (var x = 0; x < document.styleSheets[i].rules.length ; x++) {
					cssRule = document.styleSheets[i].rules[x];
					if (cssRule.selectorText) {
						if (cssRule.selectorText.indexOf("LI:hover") != -1 && cssRule.style.cssText.length > 0) {
							newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
							document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
						}
					}
				}
			}
			
			var els = $('navlist').getElementsByTagName('li');
			//var els = $('navlist').getElements('li');
			
			if (els.length > 0) {
				Array.each(els,function (li) {
					if (li.addEvent) {
						li.addEvent('mouseover',function () { this.addClass('iehover'); });
						li.addEvent('mouseout',function () { this.removeClass('iehover'); });
					} else {
						li.onmouseover = function () {
							var c = (this.className ? this.className : '');
								c = (c.length > 0 ? c+' iehover' : 'iehover');
								this.className = c;
						};
						li.onmouseout = function () { this.className = this.className.replace('iehover',''); };
					}
				});
			}
		}
		
		// kill off editor-generated dashed borders
		var tables = $('page').getElements('table.mceItemTable td');
		
		if (tables.length > 0) {
			Array.each(tables,function (t) {
				t.setStyle('border','solid 0px');
			});
		}
	});
})();

(function () {
	window.addEvent('domready',function () {
		var page = $('page');
		
		if (typeOf(page) == "element") {
		}
	});
})();

