/**
 * JQuery Plugin to ....
 * http://jqueryui.com/demos/position/
 */
(function($) {

	//var html = '<div style="position: absolute; z-index:97" class="tooltipDetailsContainer"><div class="tooltip"></div></div>';
	var html = '<div style="position: absolute; z-index:97" class="tooltipContainer"><div class="tooltip"></div></div>';
	
	$.fn.detailTooltip = function() {
		var template = $(html);
		//$('.tooltip',template).html($(this).attr('title'));
		$('.tooltip',template).html($(this).next().html());
		$('body').append(template);
		template.position({
			//my: 'bottom center',
			my: 'center bottom',
			//at: 'right top',
			at: 'right top',
			of: $(this),
			offset: '-7px 0px',
			collision: 'none'
		});
		template.hide();
		$(this).hover(function(e) {
			template.show();
		},function(e) {
			template.hide();
		});
	};	
	
})(jQuery);
