var $popup = $(‘.popup’);
$(‘area’).on({
mouseover : function(e){
var $this = $(this),
$obj = $(‘#’+$this.prop(‘alt’));
$popup.text($obj.text()).css({
top: e.pageY + 25,
left: e.pageX – ($popup.width()/2),
}).show();
},
mouseout: function(){
var $this = $(this),
$obj = $(‘#’+$this.prop(‘alt’));
$popup.hide(0).empty();
}
});