jQuery(document).ready(function(){
	$().mousemove(function(e){
		$('#status').html(e.pageX +', '+ e.pageY);			
		$('#status').html(e.clientX +', '+ e.clientY);
	}); 
})

$(function() {
	$('.linkPopup').mouseover(function(e){
		var id    = this.id;
		var right = id.length-5;
		var idtag  = "#" + id.slice(-(right));

/*		console.log(id);		
		console.log(idtag);		
		console.log(right);		
		console.log(idtag);		
*/

		var posx = 0;
		var posy = 0;
		posx = e.clientX+10;
		if (e.clientY > '250' ) {
			posy = e.clientY-225;
		} else {
			posy = e.clientY+5;
		}

/*
		posy = e.clientY+10;							
		$('#status2').html(posx +', '+ posy);
*/

		$(idtag).css('left', posx + 'px');
		$(idtag).css('top',  posy + 'px');
		$(idtag).fadeIn(750);
	});

	$('#container .linkPopup').mouseout(function(){
		var id    = this.id;
		var right = id.length-5;
		var idtag  = "#" + id.slice(-(right));
		$(idtag).fadeOut(750);
	});
});

