$(document).ready(function(){
	var distance = 10;
	var hideDelay = 500;
	var theInfo = null;
	var hideDelayTimer = null;
	var beingShown = false;
	var shown = false;
	var yOffset = 10;
	var theEl = null;

	$('.trigger').mouseover(function(e){
		if (hideDelayTimer)
			clearTimeout(hideDelayTimer);
		if (beingShown || shown || ( this.title != null && this.title.length == 0) ) {
			return;
		} else {
			theEl = this;
			theInfo = this.title;
			theEl.title = null;
			beingShown = true;
			$('#dpop').find('table').find('td').html( theInfo.replace( /\.\.\./g, "<br />" ) );
			$('#dpop').css({
				top: (e.pageY - ( $('#dpop').height() + yOffset ) ) + "px",
				left: (e.pageX - ( $('#dpop').width() / 2 ) ) + "px",
				display: 'block'
			}).animate({
				opacity: 1
			}, 500, 'swing', function() {
				beingShown = false;
				shown = true;
			});
		}
		return false;
	}).mouseout(function () {
		theEl.title = theInfo;	
		
		if (hideDelayTimer) 
			clearTimeout(hideDelayTimer);
		hideDelayTimer = setTimeout(function () {
			hideDelayTimer = null;
			$('#dpop').animate({
				opacity: 0
			}, 250, 'swing', function () {
				shown = false;
				$('#dpop').css('display', 'none');
			});
		}, hideDelay);
		return false;
	});/*.mousemove(function(e){
		if ( beingShown )
			return;
		if ( shown )
			$("#dpop").css({
				top: (e.pageY - ( $('#dpop').height() + yOffset ) ) + "px",
				left: (e.pageX - ( $('#dpop').width() / 2 ) ) + "px",
			});
	});	-- moving part */	

});