﻿
var enableNavigationRollovers = {	

	init : function( matrix ) {		
		
		//setup our BG image
		var menuBGOn = new Image();
        menuBGOn.src = '/img/quoteBGon.gif';
        var menuBGOff = new Image();
        menuBGOff.src = '/img/quoteBG.gif';
		
		// first grab the section image that we're going to change on hovers
		var sectionImage = $E( '.sectionImage' );
		// need to save path to active section image
		var currentSectionImageSrc = sectionImage.src;
						
		for( var i = 0; i < matrix.length; i++ )
		{			
			var listitem = document.getElementById( matrix[ i ][ 0 ] );
			// create our expando property to store image src			
			listitem.ImageSrc = matrix[ i ][ 1 ].src;

			$( listitem ).addEvent( 'mouseover', function() {				
				sectionImage.src = this.ImageSrc;
				this.style.background = 'url(/img/quoteBGon.gif)';
			} );
			
			$( listitem ).addEvent( 'mouseout', function() {
				sectionImage.src = currentSectionImageSrc;
				this.style.background = 'url(/img/quoteBG.gif)';
			} );

		}		
	}	
}


