var productSelector = new Class ({ 	
	data : new Hash ({		
			'cw' : {	
				'product'	    : 'coachweb',
				'heading'		: 'CoachWeb',
				'description'   : 'Online Coaching Development Software'
			},
			'qe' : {	
				'product'	    : 'quickenrol',
				'heading'		: 'QuickEnrol',
				'description'   : 'Online camper enrollment system'
			},			
			'cx' : {	
				'product'	    : 'contractiva',
				'heading'		: 'Contractiva',
				'description'   : 'Online contract timesheet management systems'
			},
			'sw' : {	
				'product'	    : 'skillsweb',
				'heading'		: 'SkillsWeb',
				'description'   : 'Registration, profiling and professional development'
			}	
	}),	
 	/**
 	 * Initialise the class
 	 * 
 	 */
 	initialize : function () 
 	{	
		var productsContainer = $('productBadge');
		var badge			  = $('desccriptions');
		var productshow		  = productsContainer.getElements('ul li a').addEvent('mouseover', this.switchProduct.bind(this));							
	},		
	switchProduct : function (e)
	{			
		var product = e.target.getProperty('id');
		var summary =  $('descriptions').empty();	
		var data = null;
		$each(this.data, function(d, key) {
			if (key == product) data = d;
		});		
		var h2	= new Element('h2').set('text', data.heading)
		var p   = new Element('p', {'class' : 'title'}).set('text', data.description);
		var div = new Element('div', {'class' : 'product- ' + data.product});
		h2.inject(div);
		p.inject(div);		
		div.inject(summary);
 	}
});
