//when the dom is ready
window.addEvent('domready', function() {
	
	
	//store titles and text
	$$('a.tooltip').each(function(element,index) {
		var content = element.get('title').split('::');
		element.store('tip:title','');
		element.store('tip:text',  content[0]);
	});
	
	//create the tooltips
	var tipz = new Tips('.tooltip',{
		className: 'tooltip',
		fixed: true,
		hideDelay: 50,
		showDelay: 50,
		offsets:{
			x:30,
			y:30
		}
	});
	
	tipz.addEvents({
		'show': function(tip) {
			//var effect = new Fx.Morph(tip, {duration:500, wait:false});
		/*	effect.start({
						 'opacity':[0,1],
						 'width':[0,210],
						 'height':[0,50]
						 });*/
			tip.fade('in');
			
		},
		'hide': function(tip) {
			tip.fade('out');
		/*	var effect = new Fx.Morph(tip, {duration:500, wait:false});
			effect.start({
						 'opacity':[1,0],
						 'width':[210,0],
						 'height':[50,0]
						 });*/
			
		}
	});
		
	
});
