
function center(){
	// inner width of slide show DIV
	var slideDivWidth = $('.slide_thumbs').innerWidth();
	var pixCnt = $('.slide_thumbs').children().size();
	var pixWidth = $('.slide_thumbs a:first-child').innerWidth();
	// space width after accounting for images
	var e = slideDivWidth - ( pixCnt * pixWidth );
	var gapWidth = Math.round( (e / ( pixCnt - 1 ) - 0.7 ) );
	$('.slide_thumbs .thm_link:nth-child(1)').nextAll('.slide_thumbs .thm_link').css('padding-left', gapWidth + 'px');
}

$("a.thm_link").colorbox(  { maxHeight:'100%', photoScaling:true}  );
center();
$(window).resize( function(){ center(); });