var _oEntry;

function Photo(oEntry) {
	this._oEntry = oEntry; 
}

Photo.prototype.getCaption = function() {
	return this._oEntry.summary.$t;
}

/**
 * Returns content object {url:String,height:String,width:String,type:String,medium:String}
 */
Photo.prototype.getImage = function() {
	return this._oEntry.media$group.media$content[0];
}

/**
 * Returns Array of thumbnail objects {url:String, width:String, height: String}
 */
Photo.prototype.getThumbnails = function() {
	return this._oEntry.media$group.media$thumbnail;
}

Photo.prototype.getYear = function() {
	var caption = this.getCaption();
	var pattern = /\(([0-9\/]{4})/;
	return (caption.match(pattern))?Number(pattern.exec(caption)[1]):null;
}
