$(document).click(function(e)
{
  //getting height and width of the message box
  
  var height = $('#popuup_div').height();
  var width = $('#popuup_div').width();
  
  //calculating offset for displaying popup message
  
  leftVal=e.pageX-(width/2)+"px";
  topVal=e.pageY-(height/2)+"px";
  
  //show the popup message and hide with fading effect
  
  $('#popuup_div').css({left:leftVal,top:topVal}).show().fadeOut(1500);
});