
var jtip =
{
	showtip : function(e)
	{
		Event.stop(e);
		var a = $(Event.findElement(e, 'a'));
		if (!a) return;
		var tip = $(a.readAttribute('rel'));
		if(!tip) return;
		if (tip && tip.visible()) return;
		tip.setStyle( { zIndex : 100 }).show();
		
		
		/*
		new Effect.Parallel(
		[ 	new Effect.SlideDown(tip, 	{ sync: true, transition: Effect.Transitions.linear  }), 
		  	new Effect.Opacity(tip, 	{ sync: true, from: 0, to: 1 } ) ], 
		{ 	
			duration	: 	0.3,
			delay		: 	0,
			queue		:
			{	
				position	: 	'end', 
				scope		:	'jtipscope',
			},
		});
		*/
		
		tip.up('li').observe('mouseleave', jtip.hidetip);
	},
	
	hidetip : function(e)
	{
		Event.stop(e);
		var tip = $(Event.findElement(e, 'li')).down('div');
		//Event.stop(e);
		//Effect.Fade(tip, { duration: 0.2 });
		tip.hide();	
		/*
		new Effect.Parallel(
		[	new Effect.SlideUp(tip, { sync: true }), 
		 	new Effect.Opacity(tip, { sync: true, from: 1, to: 0 }) ],
		{	
			duration	: 	0.2, 
			delay		: 	0.2,
			queue		:
			{	
				position	: 	'end', 
				scope		:	'jtipscope',
			}
		});
		*/
		Event.stopObserving(tip.up('li'), 'mouseleave', jtip.hidetip);
		tip.up('li').observe('mouseenter', jtip.showtip);
	}
};