/*
	Copyright (c) 2009 Elliot Swan (http://www.elliotswan.com)
	Version: 0.9 beta
*/
(function($) { 
jQuery.fn.infoTips = function(selector) {
	this.each(function (event) { 
		if($(this).attr("title") == "Blog") {
			var tooltip = '<span class="tooltip">' + $(this).attr("href") + '<span></span></span>';
		}
		else {
			var tooltip = '<span class="tooltip">' + $(this).attr("title") + '<span></span></span>';
		}
		$(this).removeAttr('title').addClass("toolrel").wrap('<span class="wrap"></span>').after(tooltip);
		$(".tooltip").hide();
	}); 
	this.hover(
		function (event) { 
			var width = "-" + $(this).next(".tooltip").width() / 2; // next(".tooltip")
			var height = $(this).next(".tooltip").height();
			$(this).next(".tooltip").css({'left' : width + 'px'});//, 'marginTop' : '-' + height + 'px'});
			$(this).next(".tooltip").animate({
				height: "toggle", 
				opacity: "toggle"
			}, 200);
		},
		function (event) {
			$(this).next(".tooltip").animate({
				height: "toggle", 
				opacity: "toggle"
			}, 300);
		}
	);
};
})(jQuery); 