var Yc = {};
var offsetX = 10;
var offsetY = 20;

$(function(){

	$('.ftb-center img').hover(function(){
		currentPath = $(this).attr('src');
		tmp = currentPath.split('_');
		activePath = tmp[0]+'_hover'+tmp[1];

		$(this).attr('src', activePath);
	}, function(){
		$(this).attr('src', currentPath);

	});
	Yc.tooltip('a.tooltip');
});

Yc.tooltip = function(elm){	
	
	$(elm).hover(function(e){											  
		this.t = this.title;
		this.title = '';									  
		$("body").append('<p id="tooltip">'+ this.t +'</p>');
		$("#tooltip")
		.css("top",(e.pageY - offsetX) + "px")
		.css("left",(e.pageX + offsetY) + "px")
		.fadeIn("fast");		
	},
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
	});	
	$(elm).mousemove(function(e){
		$("#tooltip")
		.css("top",(e.pageY - offsetX) + "px")
		.css("left",(e.pageX + offsetY) + "px");
	});			
};
