$(document).ready(function(){
			
$('.shadowboxsecondary').click(function(){$('#shadowboxinitializer').trigger('click'); return false;});

Shadowbox.init({
			   handleOversize:'resize',
			   slideshowDelay:'3',
			   continuous:true
			   });
});

/*
function historyslide(prevnext, rotatecount, rotatemax) {
	$('#history-sidebar-pic li').each( function(){
	$(this).fadeOut("slow");															
	});
	if(prevnext == 'prev') {
		var targetslide = rotatecount-1;
		if(targetslide<0 || targetslide==0) {
			targetslide = rotatemax+1;
		}
	}
	else if(prevnext == 'next') {
		var targetslide = rotatecount+1;
		if(targetslide>rotatemax) {
			targetslide = 1;
		}
	}
	
	rotatecount = targetslide;
	targetslide--;
	$('#history-sidebar-pic li:eq('+targetslide+')').fadeIn("slow");
	
	// change the title showing in the #history-sidebar-caption div using the title attribute of the image. 
	var newtitle = $('#history-sidebar-pic li:eq('+targetslide+') a img').attr('title');
	$('#history-sidebar-caption').html(newtitle);
	
	// change the top-padding of the LI item so that image is middle-aligned. 
	var imageheight = $('#history-sidebar-pic li:eq('+targetslide+') a img').height();
	var liheight = $('#history-sidebar-pic li:eq('+targetslide+')').height();
	var topmargin = (liheight-imageheight)/2;
	if(topmargin>0) {
	$('#history-sidebar-pic li:eq('+targetslide+') img').css('margin-top',topmargin);
	}
	
	return rotatecount;
}


$(document).ready(function(){

var rotatecount = 0;
var rotatemax = $('#history-sidebar-pic li').length;
rotatemax--;

$('#history-sidebar-pic li').each( function(){
	$(this).find('a').click(function(){
	rotatecount = historyslide('next', rotatecount, rotatemax);
	return false;
	});														
	});

$('#slidernext').click(function(){
	rotatecount = historyslide('next', rotatecount, rotatemax);
	return false;
});

$('#sliderprev').click(function(){
	rotatecount = historyslide('prev', rotatecount, rotatemax);
	return false;
});

// run first instance of teh historyslide function to get the first one up!
rotatecount = historyslide('next', rotatecount, rotatemax);

});*/
