hs.graphicsDir = 'javascript/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.outlineType = 'rounded-white';
hs.headingEval = 'this.a.title';
hs.numberPosition = 'heading';
hs.showCredits = false;
hs.dimmingOpacity = 0.8;	
hs.expandDuration = 250;
hs.transitionDuration = 0;
hs.easing = 'easeInCirc';
hs.easingClose = 'easeInCirc';
hs.wrapperClassName = 'controls-in-heading';
hs.numberOfImagesToPreload = 15;
hs.loadingText = 'Laster inn...';
hs.loadingTitle = 'Klikk for å avbryte';
hs.previousText = 'Forrige';
hs.nextText = 'Neste'; 
hs.closeText = 'Lukk';
hs.closeTitle = 'Lukk (esc)'; 
hs.playText = 'Spill';
hs.playTitle = 'Spill slideshow (spacebar)';
hs.pauseText = 'Pause';
hs.pauseTitle = 'Pause slideshow (spacebar)';
hs.previousTitle = 'Forrige (venstre pil)';
hs.nextTitle = 'Neste (høyre pil)';
hs.number = 'Bilde %1 of %2';
hs.restoreCursor = 'hand';
hs.restoreTitle = 'Klikk for å vise neste bilde. Bruk piltastene for neste og forrige.';

// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	interval: 4000,
	repeat: true,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		position: 'top right',
		relativeTo: 'expander'
	},
	thumbstrip: {
		position: 'below',
		mode: 'horizontal',
		relativeTo: 'expander'
	}
});

hs.Expander.prototype.onImageClick = function (sender) {
   return hs.next();
}

// show banners when image gallery is hidden
hs.Expander.prototype.onBeforeClose = function (sender) {
	if(document.getElementById('topAd')!=null) 
   		document.getElementById('topAd').style.visibility = "visible";
   	if(document.getElementById('adFixedWrapper')!=null) 
		document.getElementById('adFixedWrapper').style.visibility = "visible";
	if(document.getElementById('bottomSuperBoard')!=null) 
		document.getElementById('bottomSuperBoard').style.visibility = "visible";
		
	return true;
}

// hide banners when image gallery is shown
hs.Expander.prototype.onAfterExpand = function (sender) {
	if(document.getElementById('topAd')!=null) 
   		document.getElementById('topAd').style.visibility = "hidden";
   	if(document.getElementById('adFixedWrapper')!=null) 
		document.getElementById('adFixedWrapper').style.visibility = "hidden";
	if(document.getElementById('bottomSuperBoard')!=null) 
		document.getElementById('bottomSuperBoard').style.visibility = "hidden";

	return true;
}

hs.skin.controls = 
		'<div class="highslide-controls"><ul>'+
			'<li class="highslide-previous">'+
				'<a href="javascript:return hs.previous(this)" title="{hs.lang.previousTitle}">'+
				'<span>{hs.lang.previousText}</span></a>'+
			'</li>'+
			'<li class="highslide-play">'+
				'<a href="javascript:void(0)" title="{hs.lang.playTitle}">'+
				'<span>{hs.lang.playText}</span></a>'+
			'</li>'+
			'<li class="highslide-pause">'+
				'<a href="javascript:void(0)" title="{hs.lang.pauseTitle}">'+
				'<span>{hs.lang.pauseText}</span></a>'+
			'</li>'+
			'<li class="highslide-next">'+
				'<a href="javascript:return hs.close(this)" title="{hs.lang.nextTitle}">'+
				'<span>{hs.lang.nextText}</span></a>'+
			'</li>'+
			'<li class="highslide-move">'+
				'<a href="#" title="{hs.lang.moveTitle}">'+
				'<span>{hs.lang.moveText}</span></a>'+
			'</li>'+
			'<li class="highslide-full-expand">'+
				'<a href="#" title="{hs.lang.fullExpandTitle}">'+
				'<span>{hs.lang.fullExpandText}</span></a>'+
			'</li>'+
			'<li class="highslide-close">'+
				'<a href="javascript:return hs.close(this)" title="{hs.lang.closeTitle}" >'+
				'<span>{hs.lang.closeText}</span></a>'+
			'</li>'+
		'</ul></div>';

hs.skin.contentWrapper = 
		'<div class="highslide-header"><ul>'+
			'<li class="highslide-previous">'+
				'<a href="javascript:return hs.previous(this)" title="{hs.lang.previousTitle}" >'+
				'<span>{hs.lang.previousText}</span></a>'+
			'</li>'+
			'<li class="highslide-next">'+
				'<a href="return hs.next(this)" title="{hs.lang.nextTitle}" >'+
				'<span>{hs.lang.nextText}</span></a>'+
			'</li>'+
			'<li class="highslide-move">'+
				'<a href="javascript:return false" title="{hs.lang.moveTitle}" >'+
				'<span>{hs.lang.moveText}</span></a>'+
			'</li>'+
			'<li class="highslide-close">'+
				'<a href="javascript:return hs.close(this)" title="{hs.lang.closeTitle}" >'+
				'<span>{hs.lang.closeText}</span></a>'+
			'</li>'+
		'</ul></div>'+
		'<div class="highslide-body"></div>'+
		'<div class="highslide-footer"><div>'+
			'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+
		'</div></div>';

