// 500939d869bad09b1a02a5a1c6d34b8b

hs.graphicsDir   = 'javascript/graphics/';
hs.showCredits   = false;

hs.lang = {
   loadingText :     'Učitavam...',
   loadingTitle :    'Klikni za prekid',
   focusTitle :      'Klikom povuci naprijed',
   fullExpandTitle : 'Povečanje na stvarnu veličinu (f)',
   fullExpandText :  'Puna veličina',
   creditsText :     'Kreirano pomoću <i>Highslide JS</i>',
   creditsTitle :    'Idi na Highslide JS naslovnicu',
   previousText :    'Prethodno',
   previousTitle :   'Prethodno (strelica lijevo)',
   nextText :        'Slijedeće',
   nextTitle :       'Slijedeće (strelica desno)',
   moveTitle :       'Pomakni',
   moveText :        'Pomakni',
   closeText :       'Zatvori',
   closeTitle :      'Zatvori (esc)',
   resizeTitle :     'Promjena veličine',
   playText :        'Pokreni',
   playTitle :       'Pokreni prikaz slika (razmaknica)',
   pauseText :       'Pauza',
   pauseTitle :      'Pauziraj prikaz slika (razmaknica)',   
   number :          'Slika %1 od %2',
   restoreTitle :    'Klikni za zatvaranje slike!'
   
};

hs.targetX = 'FotoAlbum 20px';
hs.targetY = 'FotoAlbum';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.restoreCursor = null;
hs.captionEval = 'this.a.title';
hs.numberPosition = 'caption';
hs.wrapperClassName = 'controls-in-heading wide-border in-page';
hs.outlineType = 'rounded-white';
//hs.dimmingOpacity = 0.01;
//hs.useBox = true;
//hs.width = 490;
//hs.height = 400;
allowMultipleInstances = false;

hs.registerOverlay({
	html: '<div class="closebutton" onclick="return hs.close(this)" title="Zatvori"></div>',
	position: 'top right',
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});

hs.Expander.prototype.onDrag = function() {
	if (/in-page/.test(this.wrapper.className))	return false;
}


// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	slideshowGroup: 'pix',
	interval: 5000,
	repeat: true,
	useControls: true,
	usebox: true,
	width: 490,
	height: 400,
	overlayOptions: {
		position: 'bottom right',
		offsetY: 50
	},
	thumbstrip: {
		position: 'above',
		mode: 'horizontal',
		relativeTo: 'expander'
	}
});
	
// Keep the position after window resize
  hs.addEventListener(window, 'resize', function() {
	var i, exp;
	hs.page = hs.getPageSize();

	for (i = 0; i < hs.expanders.length; i++) {
		exp = hs.expanders[i];
		if (exp) {
			var x = exp.x,
				y = exp.y;

			// get new thumb positions
			exp.tpos = hs.getPosition(exp.el);
			x.calcThumb();
			y.calcThumb();

			// calculate new popup position
	 		x.pos = x.tpos - x.cb + x.tb;
			x.scroll = hs.page.scrollLeft;
			x.clientSize = hs.page.width;
			y.pos = y.tpos - y.cb + y.tb;
			y.scroll = hs.page.scrollTop;
			y.clientSize = hs.page.height;
			exp.justify(x, true);
			exp.justify(y, true);

			// set new left and top to wrapper and outline
			exp.moveTo(x.pos, y.pos);
		}
	}
});
