
// -----------------------------------------------------------------------
// Toggle images for the case history page
// the images filenames are in the format: prog_p1_a[_sm].jpg
// where 	p = project 1,2,3 (#gallery1,#gallery2,...)
//			a,b,c... = num of photograph
//			[_sm] = thumbnail
// Parameters:
// 	foto = new photo number (a,b,c...)
// 	slot = the number of thumbnail slot to toggle (#smallimg)
// -----------------------------------------------------------------------
function ChangeImage( foto,slot ) 
{
	var big = $('#bigimg').attr('src');
	var small = $('#smallimg'+slot).attr('src');
	
	var newbig = small.replace( '_sm','' );
	var newsmall = big.replace( '.jpg','_sm.jpg' );
	
	$('#bigimg').attr( 'src',newbig );
	$('#smallimg'+slot).attr('src',newsmall);
}
