/**
	hs gallery setup
*/

hs.graphicsDir = './images/highslide/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.dimmingOpacity = 0.8;
hs.outlineType = 'rounded-white';
hs.captionEval = 'this.a.title';
hs.marginBottom = 165; // make room for the thumbstrip and the controls
hs.numberPosition = 'caption';
hs.showCredits = false;

// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	interval: 3000,
	repeat: true,
	useControls: true,
	overlayOptions: {
		className: 'text-controls',
		position: 'bottom center',
		relativeTo: 'viewport',
		offsetY: -120
	},
	thumbstrip: {
		position: 'bottom center',
		mode: 'horizontal',
		relativeTo: 'viewport'
	}
});


document.observe('dom:loaded', function () {
	$$('a[rel^=hsgallery]').each(function (el) {
		el.onclick = function () { return hs.expand(this, { slideshowGroup: this.rel }); };
	});
});
