removing popup on window click event