motorola.controls.Header = new Class({
	rollovers: [],
	initialize: function(element) {		
		var utilityLinks = element.getElements('.utilityNav a');
		utilityLinks.each(function(link) {
			this.rollovers.push(new MOTO.Rollover(link));
		}.bind(this));
		
		var franchiseLinks = element.getElements('.links a');
		this.franchiseButtons = [];
		franchiseLinks.each(function(link) {
			this.franchiseButtons.push(new MOTO.Rollover(link));
		}.bind(this));
	},
	
	activate: function(state){
		this.franchiseButtons.each(function(button){
			if (button.element.hasClass(state)) {
				button.select();
			} else {
				button.deselect();
			}
		});
	},
	
	deactivate: function(){
		this.franchiseButtons.each(function(button){
			button.resetState();
		});
	},
	setInactiveButtons: function(){
		this.franchiseButtons.each(function(button){
			button.setInactiveState();
		});
	},
	destroy: function() {
		this.franchiseButtons = null;
		this.utilityLinks = null;
		var rollovers = this.rollovers;
		var i = rollovers.length;
		if (i > 0) {
			do {
				i = i - 1;
				rollovers[i].destroy();
			} while (i);
		}
	}
	
});