var Noize = new Class({
	extensions:{},
	
	initialize: function(options) {
	
		// Setup highlighting links
		$$('.highlight_id').each(function(el) {
			var config = el.get('rel') && JSON.decode(el.get('rel'));
			
			el.addEvent('click', function(e) {
				e.stop();
				
				if ($(config.id)) {
					var id = $(config.id);
					id.set('tween', {duration:500});
					id.highlight(config.color);
					id.setFocus();
				}
			});
		});
		
	},
	
	addModule: function(name, module) {
		if ( $type(name) === 'string' && $type(module) ==='object' ) {
			this.extensions[name] = module;
		} else {
			throw new Error('Noize.addModule: The paramaters data for adding modules where incorrect.');
		}
	},
	
	getModule: function(name) {
		if ( this.extensions[name] ) {
			return this.extensions[name];
		} else {
			throw new Error('Noize.getModule: The module "'+name+'" has not been initialized,');			
		}
	}
});