Il listener che dovresti aggiungere è questo:
codice:
  google.maps.event.addListener(marker, 'click', function() {
    infowindow.open(map,marker);
  });