popup not closing

popup not closing

Hi I have a popup defined in one page and I have links generated to show in an iframe that show in this popup.

I did this by calling $(id).popup("open")

The problem is when I try to close the popup you have to do so more than once. (Open the same popup more than once)
The iframe seems to close first.

I have an example here


Not sure what's going on.

Thanks