var Photoalbum = new Class({
	
	open : function(id, ctx) {
		switch(ctx) {
			case('place'):
				//view-place
				if($('photos')) {
					var itemid = $('photos').get('placeid');
				//list-places
				} else {
					var itemid = $('photo[' + id + ']').get('placeid');
				}
			break;
			default:
				var itemid = null;
			break;
		}
		LightboxGuru.viewPhotoalbum(id, ctx, itemid);
	},
	
	next : function(id, ctx) {
		switch(ctx) {
			case('place'):
				//view-place
				if($('photos')) {
					var itemid = $('photos').get('placeid');
				//list-places
				} else {
					var itemid = $('photo[' + id + ']').get('placeid');
				}
			break;
			default:
				var itemid = null;
			break;
		}
		LightboxGuru.viewPhotoalbum(id, ctx);
	},
	
	previous : function(id, ctx) {
		switch(ctx) {
			case('place'):
				//view-place
				if($('photos')) {
					var itemid = $('photos').get('placeid');
				//list-places
				} else {
					var itemid = $('photo[' + id + ']').get('placeid');
				}
			break;
			default:
				var itemid = null;
			break;
		}
		LightboxGuru.viewPhotoalbum(id, ctx);
	}
	
});
