/**
 * MarkerInfo
 *
 * @extends GOverlay
 */
var MarkerInfo = function(marker, html) {
    this.marker    = marker;
    this.html      = html;
};

MarkerInfo.prototype = new GOverlay();

MarkerInfo.prototype.initialize = function(map) {
    this.map = map;

    this.container = new Element('div', {
        'class': 'google-maps-hover',
        'html': this.html
    });

    this.map.getPane(G_MAP_FLOAT_PANE).appendChild(this.container);

    var close = this.container.getElement('a.close');
    if (close) {
        var thisObject = this;
        close.addEvent('click', function(event) {
            event.stop();

            thisObject.remove()
        });
    }
};
MarkerInfo.prototype.remove = function() {
    this.container.parentNode.removeChild(this.container);
};
MarkerInfo.prototype.copy = function() {
};
MarkerInfo.prototype.redraw = function() {
    var point = this.map.fromLatLngToDivPixel(this.marker.getLatLng());

    this.container.setStyles({
        'left': point.x + 14,
        'top': point.y - 34
    })
};

