window.addEvent('domready', function() {
	
	var swatch = new Tips('.color_chart a',{
		className: 'swatch',
		 hideDelay: 20,  
		 showDelay: 20,
		offsets: {'x': 40, 'y': -150}, 
		 onShow: function(swatch) {
			 swatch.fade('in');
		 },
	
		onHide: function(swatch) {
			swatch.fade('out');
		}	
	});
	
	$$('.color_chart a').each(function(tip){ 
		
		tip.addEvent('click', function(e) { 
			e = new Event(e).stop();
		});
		
		var imgSrc = tip.retrieve('tip:text');
		var imgAlt = tip.retrieve('tip:title');
		tip.store('tip:text', new Element('img',{'src':imgSrc,'alt':imgAlt}));		
	});
	

});

