The popup plugin has the following custom event:
closed
$( ".selector" ).popup({ closed: function(event, ui) { ... } });