public function addEvent($marker, $infoWindow, $open = false) {
		$this->map .= "
			google.maps.event.addListener(gMarkers" . static::$mapCount . "[{$marker}], 'click', function() {
				gInfoWindows" . static::$mapCount . "[$infoWindow].open(" . $this->name() . ", this);
			});
		";
		if ($open) {
			$event = 'gInfoWindows' . static::$mapCount . "[$infoWindow].open(" . $this->name() .
				', gMarkers' . static::$mapCount . '[' . $marker . ']);';
			$this->addCustom($event);
		}
	}