//Addl js for Highslide rotator


	hs.graphicsDir = '/highslide/graphics/';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = null;
	hs.fadeInOut = true;
	hs.dragHandler = null;
	hs.showCredits = false;	
	hs.expandCursor = null;
	hs.restoreCursor = null;
	hs.wrapperClassName = 'borderless';
	hs.marginTop = 0;
	hs.transitionDuration = 2000;
	
	
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 6000,
		repeat: true,
		useControls: false,
		fixedControls: false,
		overlayOptions: {
			opacity: .4,
			position: 'top center',
			hideOnMouseOut: true
		}
	});
hs.lang = {
		/*restoreTitle : 'Powered by Highslide JS',*/
		loadingText : ''
	}; 
 
	// Prevent closing when click on image
	hs.Expander.prototype.onImageClick = function (sender) {
	return false;
	}
	// Start the gallery on page load
	hs.addEventListener(window, "load", function() {
   // click the element virtually:
   document.getElementById("thumb1").onclick();
});

	// Repositioning the popup after resizing browser window
	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) {
         // get new left and top
         exp.x.scroll = hs.page.scrollLeft;
         exp.x.clientSize = hs.page.width;
         exp.y.scroll = hs.page.scrollTop;
         exp.y.clientSize = hs.page.height;
         exp.justify(exp.x);
         exp.justify(exp.y);

         // set new left and top to wrapper and outline
         exp.moveTo(exp.x.pos, exp.y.pos);
      }
   }
});

