Close popup when links are clicked