/**
*	Site-specific configuration settings for Highslide JS
*/

hs.graphicsDir = 'highslide/graphics/';

hs.showCredits = false;

hs.outlineType = 'custom';

hs.dimmingOpacity = 0.85;

hs.fadeInOut = true;

hs.align = 'center';

hs.allowMultipleInstances = false;

hs.blockRightClick = true;

hs.captionEval = 'this.thumb.alt';

hs.dragByHeading = false;

hs.lang.restoreTitle = '';

hs.lang.previousText = '';

hs.lang.nextText = ''; 

hs.lang.moveText = '';

hs.lang.closeText = '';

hs.lang.closeTitle = '';

hs.lang.resizeTitle = '';

hs.lang.playText = '';

hs.lang.playTitle = '';

hs.lang.pauseText = '';

hs.lang.pauseTitle = '';

hs.lang.previousTitle = '';

hs.lang.nextTitle = '';

hs.lang.moveTitle = '';

hs.addSlideshow(
	{
		slideshowGroup: 'group',

		interval: 7500,

		repeat: true,

		useControls: true,

		overlayOptions: 
		{			
			opacity: '0.75',
			
			position: 'bottom right',
			
			offsetX: '-10',
			
			offsetY: '-10',
			
			relativeTo: 'viewport',
			
			hideOnMouseOut: false
		}
	}
);

var albumConfig = {

	slideshowGroup: 'group',
	
	autoplay: true,
	
	transitions: ['expand', 'crossfade']
};

var html = document.getElementsByTagName('html')[0];

var albumCurrent = null;

function repositionExpander()
{
	var x = (html.clientWidth - albumCurrent.wrapper.clientWidth) / 2;

	var y = (html.clientHeight - albumCurrent.wrapper.clientHeight) / 2;
	
	albumCurrent.moveTo(x, y);	
}

hs.Expander.prototype.onAfterExpand = function () 
{
	albumCurrent = this;	
}

hs.Expander.prototype.onAfterClose = function () 
{
	if (albumCurrent == this)
	{
		albumCurrent = null;
	}
}

window.onresize = function() 
{
	if ((html != null) && (albumCurrent != null))
	{		
		repositionExpander();
	}
};
