New JS that handles opening and closing map infowindows