function imageviewer()
{
	this.show = function(photo_path, photo_group, photo_titles)
	{
		//window.open(photo_path);
		//alert(photo_path +"\nnum: "+ this.findInGroup(photo_path, photo_group));
		this.initViewer(photo_path, photo_group, photo_titles);
		this.showViewer();
	}
	
	this.findInGroup = function(str, photos_array) 
	{
		return jQuery.inArray( str, photos_array );
	}
	this.showViewer = function()
	{ 
		$(".imageviewer").animate({height:"730px"});
		//$(".imageviewer").css("height", 730) 
	}
	this.hideViewer = function()
	{ 
		$(".imageviewer").animate({height:"1px"});
		//$(".imageviewer").css("height", 1);
	}
	this.initViewer = function(photo_path, photo_group, photo_titles)
	{
		$(".flashviewer").each(function(){ this.showPhoto(photo_path, photo_group, photo_titles); });
	}
}

/////////////////////// HELPERS ////////////////////////
function showPhoto(photo_path, photo_group, photo_titles)
{
	if(typeof photo_titles == "undefined") {
		//photo_titles = [];
	}
	new imageviewer().show(photo_path, photo_group, photo_titles);
}
function hidePhotoViewer()
{
	new imageviewer().hideViewer();
}
$(document).ready(function(){
	//$(".imageviewer").click(function(){ hidePhotoViewer(); })
})
