If I open a dialog like so:
$(\'\').dialog({ autoOpen: true
Simply calling the following worked for me:
window.parent.$('#externalSite').dialog('close');