function Photo() {

	this.photo_id = 0;
	this.url = '';
	this.thumb = '';
	this.data = {
		'photo_id' : false,
		'filename' : "",
		'stream_id' : false
	};

	this.template = new Template(
			'<li class="photo"><a href="${data.url}" class="tooltip {tooltip: \'${data.username}\'}"><img src="${data.thumb}" alt="" width="105" height="105" /></a></li>');

	this.initialize = function(data) {
		this.data = data;
		this.data.username = jQuery.base64Encode(this.data.username);
		this.photo_id = data.photo_id;
		this.data.url = ($dev ? '/frontend_dev.php' : '') + '/p/'
				+ data.photo_id + '/' + data.stream_id;
		this.data.thumb = ($dev ? '/frontend_dev.php' : '') + '/thumb/sq/105/'
				+ data.filename
		jQuery('<img />').attr('src', this.data.thumb).load(function() {
			// pre-loading
		});
	};

	this.toString = function() {
		this.template.set('data', this.data);
		return this.template.render();
	};

	this.initialize.apply(this, arguments);
}

