Added fold mechanism to popups.