changed popup adjustment function to include map click popups, and to include popups that are really close to the sidebar.