﻿/**
*	Site-specific configuration settings for Highslide JS
*/
// Getting Todays Year
var today = new Date();
var year = today.getYear();
if(year<1000) year+=1900;

// language strings
hs.lang = {
	cssDirection: 'ltr',
	loadingText : 'Loading...',
	loadingTitle : 'Click to cancel',
	focusTitle : 'Click to bring to front',
	fullExpandTitle : 'Expand to actual size (f)',
	creditsText : '&copy ' + year + ' <i>AKAMAV</i>',
	creditsTitle : 'Go to AKAMAV Homepage',
	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 : '1:1',
	number: 'Image %1 of %2',
	restoreTitle : 'Click to close image.'
};

var Startsequenz1 = {numberPosition : 'caption',
slideshowGroup: 'Startsequenz1',
restoreCursor : 'null'
};
var Florida1 = {numberPosition : 'caption',
slideshowGroup: 'Florida1',
restoreCursor : 'null'};
	

hs.graphicsDir = '../highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand','crossfade'];
hs.fadeInOut = true;
hs.dimmingOpacity = 0.8;
hs.outlineType = 'rounded-white';
hs.captionEval = 'this.thumb.title';
//hs.marginTop = 105 // make room for the thumbstrip and the controls
//hs.numberPosition = 'caption';
//hs.lang.restoreTitle = 'Zum nächsten Bild klicken.',
hs.blockRightClick = true;
hs.dragSensitivity = 9999;
hs.targetY = 'my-target 60px'; // follow the scrolling
hs.numberOfImagesToPreload = 5;



// Highslide fixed popup mod. Requires the "Events" component.
if (!hs.ie || hs.uaVersion > 6)  hs.extend ( hs.Expander.prototype, {
	fix: function(on) {
		var sign = on ? -1 : 1,
			stl = this.wrapper.style;

		if (!on) hs.getPageSize(); // recalculate scroll positions
		
		
		hs.setStyles (this.wrapper, {
			position: on ? 'fixed' : 'absolute',
			zoom: 1, // IE7 hasLayout bug,
			left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px',
			top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px'
		});

		if (this.outline) {
			stl = this.outline.table.style;
			hs.setStyles (this.outline.table, {
				position: on ? 'fixed' : 'absolute',
				zoom: 1, // IE7 hasLayout bug,
				left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px',
				top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px'
			});

		}
		this.fixed = on; // flag for use on dragging
	},
	onAfterExpand: function() {
    	this.fix(true); // fix the popup to viewport coordinates
	},

	onBeforeClose: function() {
		this.fix(false); // unfix to get the animation right
	},

    onDrop: function() {
    	this.fix(true); // fix it again after dragging
	},

	onDrag: function(sender, args) {
		//if (this.fixed) { // only unfix it on the first drag event
			this.fix(true);
		//}
	}

});



// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	slideshowGroup: ['Startsequenz1','Florida1','SIMAV2011'],
	interval: 5000,
	repeat: true,
	useControls: true,
	overlayOptions: {
		className: 'text-controls',
		position: 'bottom center',
		relativeTo: 'image',//'viewport'
		offsetY: -15,
		hideOnMouseOut: true


	},
	thumbstrip: {
		position: 'top left',
		mode: 'vertical',
		relativeTo: 'viewport'
	}
});

