wait for javascript to finish setting up the popups