// for IE6 or below, load the ActiveX PNG transparency fix
if(Browser.Engine.trident4) Asset.javascript('js/pngfix.js');

window.addEvent('domready', function() {
	// if IE6 or below, skip the rollover (ActiveX prevents it from showing anyway)
	if(Browser.Engine.trident4) return;
	
	// find all linked menu items
	$$('a.menu-item img').each(function(item,index){
		// attach rollover events to their child img nodes
		//var item = link.getFirst();
		item.store('highlighted', false)
			.addEvent('mouseover', function(){
				if(this.retrieve('highlighted') == false) {
					this.store('highlighted', true);
					this.setProperty('src', this.getProperty('src').replace(/\.png/, '-highlight.png') );
				}
			})
			.addEvent('mouseout', function(){
				if(this.retrieve('highlighted') == true) {
					this.store('highlighted', false);
					this.setProperty('src', this.getProperty('src').replace(/-highlight\.png/, '.png') );
				}
			});
	});
});