/**
 * @author john
 */
function resultItem(properties) {
	this.properties = properties;
	var iObj = this;
	
	this.getListHTML = function() {
		return this.parent.functions["list"](iObj);
	}
	
	this.deleteProperties = function() {
		for(var prop in this.properties) {
			delete(this.properties[prop]);
		}
		delete(this.properties);
		if(this.marker) {
			delete(this.marker.iObj);
			delete(this.marker);
		}
	}
	
	this.renderMarker = function() {
		return this.parent.functions["rendermarker"](this);
	}
	
	this.iconClick = function() {
		hidePreviewBubble();
		iObj.parent.functions["mapclick"](iObj);
	}
	
	this.listClick = function() {
		hidePreviewBubble();
		iObj.parent.functions["listclick"](iObj);
	}
	
	this.addToItinerary = function() {
		hidePreviewBubble();
		iObj.parent.functions["addtoitinerary"](iObj);
	}
	
	this.openTab = function() {
		iObj.parent.functions["tab"](iObj);
	}
	
	this.onMouseOver = function() {
		if(iObj.parent.functions["onmouseover"]) {
			iObj.parent.functions["onmouseover"](iObj);
		}
	}
	
	this.onMouseOut = function() {
		if(iObj.parent.functions["onmouseout"]) {
			iObj.parent.functions["onmouseout"](iObj);
		}
	}
}