$(document).ready(
	function()
	{
		initPageOnClient();
		
		ImageIndex = 0;
		
		setImage( ImageIndex );
	}
)

function setImage( index )
{
	ImageIndex = index;
	
	$('#big-img').attr( {
		src: bigImgUrl[ImageIndex],
		alt: alt[ImageIndex],
		width: bigImgWidth[ImageIndex],
		height: bigImgHeight[ImageIndex]
	} ); 
	$('#original-img').attr( {
		href: originalImgUrl[ImageIndex],
		title: alt[ImageIndex]
	} ); 
	$('#original-img1').attr( {
		href: originalImgUrl[ImageIndex]
	} );
	$('#img-title').text( alt[ImageIndex] );
}


function prevShow() 
{
	if( ImageIndex == 0 )
		ImageIndex = maxNumberOfImages - 1;
	else
		ImageIndex--;

	setImage( ImageIndex );
};

function nextShow() 
{
	if( ImageIndex == maxNumberOfImages - 1 )
		ImageIndex = 0;
	else
		ImageIndex++;
		
	setImage( ImageIndex );
};

	
	
