
hs.graphicsDir 		= '/_scripts/pmpup/graphics/';
hs.showCredits = 0;
hs.padToMinWidth = true;
hs.outlineType 		= 'rounded-white';
//hs.captionEval = 'this.thumb.alt';

// langue

hs.lang = {
	cssDirection: 'ltr',
	loadingText : 'Chargement...',
	loadingTitle : 'Click to cancel',
	focusTitle : 'Click to bring to front',
	fullExpandTitle : 'Expand to actual size (f)',
	previousText : 'Previous',
	nextText : 'Next', 
	moveText : 'Move',
	closeText : 'Close', 
	closeTitle : 'Close (esc)', 
	resizeTitle : 'Resize',
	playText : 'Play',
	playTitle : 'Play slideshow (spacebar)',
	pauseText : 'Pause',
	pauseTitle : 'Pause slideshow (spacebar)',
	previousTitle : 'Previous (arrow left)',
	nextTitle : 'Next (arrow right)',
	moveTitle : 'Move',
	fullExpandText : 'Full size',
	number: 'Image %1 of %2',
	restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
};


//hs.align = 'center';
if (hs.registerOverlay) {
	// The white controlbar overlay
	hs.registerOverlay({
		thumbnailId: 'thumb3',
    	overlayId: 'controlbar',
    	position: 'top right',
    	hideOnMouseOut: true
	});
	// The simple semitransparent close button overlay
	hs.registerOverlay({
		thumbnailId: 'thumb2',
		overlayId: 'closebutton',
		position: 'top right',
		fade: 2 // fading the semi-transparent overlay looks bad in IE
	});
}

// ONLY FOR THIS EXAMPLE PAGE!
// Initialize wrapper for rounded-white. The default wrapper (drop-shadow)
// is initialized internally.
if (hs.addEventListener && hs.Outline) hs.addEventListener(window, 'load', function () {
	new hs.Outline('rounded-white');
	//new hs.Outline('glossy-dark');
});

// The gallery example on the front page
var galleryOptions = {
	slideshowGroup: 'gallery',
	wrapperClassName: 'glossy-dark',
	outlineType: 'glossy-dark',
	dimmingOpacity: 0.6,
	align: 'center',
	transitions: ['expand', 'crossfade']
};


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


// centree
var zoomphoto = {
	captionEval: 'this.thumb.alt',
	slideshowGroup: 'zoomphoto',
	wrapperClassName: 'rounded-white',
	outlineType: 'rounded-white',
	//dimmingOpacity: 0.6,
	//align: 'center',
	transitions: ['expand', 'crossfade']
};


window.onload = function()
{
	hs.preloadImages(5);
}

function changeInfosImage(zoom, image, titre)
{
	if(navigator.appName == 'Microsoft Internet Explorer')
		var index = 0;
	else
		var index = 1;

	if(document.getElementById('caption-for-thumb_0'))
		document.getElementById('caption-for-thumb_0').childNodes[index].innerHTML = titre;
	else if(document.getElementById('caption-for-thumb_0-hsOrig')) 
		document.getElementById('caption-for-thumb_0-hsOrig').childNodes[index].innerHTML = titre;
	document.getElementById('thumb_0').childNodes[index].src.alt = titre; 
	document.getElementById('thumb_0').childNodes[index].style.backgroundImage = 'url('+image+')'; 
	document.getElementById('thumb_0').href = zoom;
}
