﻿hs.registerOverlay({
	overlayId: 'closebutton',
	position: 'top right',
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});
hs.wrapperClassName = 'borderless';
hs.creditsHref = 'javascript:;';

hs.lang = {
	cssDirection: 'ltr',
	loadingText : 'Cargando...',
	loadingTitle : 'Clic para cancelar',
	focusTitle : 'Clic para traer al frente',
	fullExpandTitle : 'Tamaño completo (f)',
	creditsText : 'Powered by <i>Highslide JS</i>',
	creditsTitle : '',
	previousText : 'Anterior',
	nextText : 'Siguiente', 
	moveText : 'Mover',
	closeText : 'Cerrar', 
	closeTitle : 'Cerrar (esc)', 
	resizeTitle : 'Cambiar tamaño',
	playText : 'Presentación',
	playTitle : 'Presentación (espacio)',
	pauseText : 'Pausa',
	pauseTitle : 'Pausa presentación (espacio)',
	previousTitle : 'Anterior (flecha izquierda)',
	nextTitle : 'Siguiente (flecha derecha)',
	moveTitle : 'Mover',
	fullExpandText : 'Tamaño completo',
	number: 'Imagen %1 de %2',
	restoreTitle : 'Clic para cerrar'
};

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

// Optional: a crossfade transition looks good with the slideshow
hs.transitions = ['expand', 'crossfade'];

// para unobtrusive slideshows 
hs.onSetClickEvent = function ( sender, e ) {
   // set the onclick for the element, output the group name to the caption for debugging
   e.element.onclick = function () {
      return hs.expand(this, { slideshowGroup: this.parentNode.className });
   }
   // return false to prevent the onclick being set once again
   return false;
}
