/* Configurtion for High Slide image library */

hs.graphicsDir = '/javascript/highslide/graphics/';
hs.outlineType = 'glossy-dark';
hs.showCredits = false;
hs.dimmingOpacity = 0.75;
hs.dimmingDuration = 200;
hs.align = 'center';

hs.addSlideshow({
	interval: 2500,
	repeat: false,
	useControls: true,
	fixedControls: true,
	overlayOptions: {
	opacity: .6,
	position: 'bottom center',
	hideOnMouseOut: true
}
});

hs.transitions = ['expand', 'crossfade'];

var baseName = /([Pp])ages\/(.*?)\.html/; 
hs.onSetClickEvent = function ( sender, e ) {
	
	e.element.onclick = function () {
		imgPage = e.element.href;
		match = baseName.exec(imgPage);
		imgBase = match[2];
		pagePrefix = match[1];
		imgPrefix = "i";
		if (pagePrefix == "P")
			imgPrefix = "I";
		else
			imgPrefix = "i";
		imgFile = imgPrefix + "mages/" + imgBase + ".jpg";
		return hs.expand(this, { src: imgFile });
	}
	// return false to prevent the onclick being set once again
	return false;
}
