Added new popup close event (click anywhere outside the popup and it will close).