title: Google maps InfoWindow not opening on click event
body: <p>I am having some problems with google maps api (v3) and InfoWindows no opening on the marker's click event that they are attached to.  When I debug the javascript the Markers and InfoWindows look to have been created correctly, so I am assuming that I am doing something wrong when adding the click event listener.</p>
  
  <p>Below is where the adding of Markers etc happens.  Can anyone see what the problem may be?</p>
  
  <pre><code>$.post("/Club/SearchClubsByLocation", { latitude: searchLat, longitude: searchLng },
              function (clubs) {
                  $.each(clubs, function (i, club) {
                      var LL = new google.maps.LatLng(club.Latitude, club.Longitude);
                      pointArray.push(LL);
  
                      var infoWindow = new google.maps.InfoWindow({
                          content: club.ClubName + " HELLO!!!"
                      });
  
                      var marker = new google.maps.Marker({
                          map: map,
                          position: LL
                      });
  
                      google.maps.event.addListener(marker, 'click', function () {
                          infowindow.open(map, marker);
                      });
  
                      markerArray.push(marker);
                  });
  
                  for (i in pointArray) {
                      bounds.extend(pointArray[i]);
                  }
  
                  map.fitBounds(bounds);
                  pointArray = [];
              },
              "json"
           );
  </code></pre>
  
  <p>Thanks for any suggestions,</p>
  
  <p>Rich</p>