hs.addEventListener(window, "load", function() {
var autoload = /[?&]autoload=([^&#]*)/.exec(window.location.href);
if (autoload) document.getElementById(autoload[1]).onclick();
});
hs.addEventListener(document, "ready", function() {
var autoload = /[?&]autoload=([^&#]*)/.exec(window.location.href);
if (autoload) document.getElementById(autoload[1]).focus();
});
function toggleDiv(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'block')
		e.style.display = 'none';
	else
		e.style.display = 'block';
}
hs.graphicsDir = 'res/graphics/';
hsp.stylesFile = 'res/common.css';
hs.marginBottom = 91;
hs.marginTop = 15;
hs.marginLeft = 84;
hs.marginRight = 84;
hs.dragByHeading = false;
hs.preserveContent = false;
hs.outlineType = 'rounded-white';
hs.lang.loadingTitle = 'Click to cancel';
hs.lang.previousTitle = 'Previous (left arrow)';
hs.lang.playTitle = 'Play slideshow (spacebar)';
hs.lang.pauseTitle = 'Pause slideshow (spacebar)';
hs.lang.nextTitle = 'Next (right arrow)';
hs.lang.moveTitle = 'Click and drag to move';
hs.lang.fullExpandTitle = 'Expand to actual size (up arrow)';
hs.lang.closeTitle = 'Close (ESC or Enter)';
hs.lang.previousText = 'Previous';
hs.lang.playText = 'Play';
hs.lang.pauseText = 'Pause';
hs.lang.nextText = 'Next';
hs.lang.fullExpandText = '1:1';
hs.lang.closeText = 'Close';
hs.lang.loadingText = 'Loading...';
hs.lang.restoreTitle = 'Click for next';
hs.lang.focusTitle = 'Click to bring to front';
hs.lang.resizeTitle = 'Resize';
hs.align = 'center';
hs.expandDuration = 350;
hs.restoreDuration = 350;
hs.showCredits = false;
hs.objectLoadTime = 'after';
hs.allowSizeReduction = true;
hs.dimmingOpacity = 0.85;
hs.dimmingDuration = 50;
hs.transitionDuration = 500;
hs.allowMultipleInstances = true;
hs.allowWidthReduction = true;
hs.blockRightClick = true;
hs.flushImgSize = false;
hs.numberOfImagesToPreload = 6;
hs.transitions = ['expand', 'crossfade'];
hs.easing = 'easeInBack';
hs.easingClose = 'easeOutBack';
hs.restoreCursor = null;
hs.Expander.prototype.onImageClick = function() {
	this.slideshow.pause();
	return hs.next();
}
hs.onKeyDown = function(sender, e) {
	if(e.keyCode == 40 || e.keyCode == 70) return false;
	if(e.keyCode == 38) {
		var exp = hs.getExpander();
		if(exp) exp.doFullExpand();
		return false;
	}
}
hs.addSlideshow({
	interval: 3000,
	repeat: false,
	thumbstrip: {
		position: 'top left',
		mode: 'vertical',
		relativeTo: 'viewport'
	},
	overlayOptions: {
		opacity: 0.8,
		position: 'bottom right',
		offsetY: -36,
		offsetX: 0,
		relativeTo: 'viewport',
		hideOnMouseOut: false
	},
	fixedControls: false,
	useControls: true
});
