var MenuRollovers = Class.create();
MenuRollovers.prototype = {
	initialize: function(ids,image_src,active) {
		this.id = ids;
		this.sr = image_src;
		this.ac = active;
    document.observe("dom:loaded", function() {
  		$(this.id).each(function(s) { 
  			Event.observe(s, 'mouseover', this.rollovers.bindAsEventListener(this));
  			Event.observe(s, 'mouseout', this.rollout.bindAsEventListener(this));
  		}.bind(this));
    }.bind(this));
	},
	rollovers: function(event) { 
		Event.element(event).src=this.sr+Event.element(event).readAttribute('id')+this.ac+'.jpg';
	},
	rollout: function(event) { 
		Event.element(event).src=this.sr+Event.element(event).readAttribute('id')+'.jpg';
	}
}

var menu_items = [
	'home',
	'about',
	'technology',
	'products',
	'investors',
	'news',
	'contact'
];

var menu_src = "../images/structure/nav/";
var menu_active = "-active";
var nav = new MenuRollovers(menu_items,menu_src,menu_active);