// remove the registerOverlay call to disable the close button
hs.registerOverlay({
	overlayId: 'closebutton',
	position: 'top right',
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});

hs.graphicsDir = 'highslide/graphics/';
hs.restoreCursor = 'hs-zoomout.cur';
hs.showCredits = false;
hs.outlineType = 'rounded-white';
hs.lang.restoreTitle = "Please move your mouse away from this image to close it.";

// close on mouse out
hs.Expander.prototype.onMouseOut = function (sender,e) {
   sender.close();
};
// close if mouse is not over on expand (using the internal mouseIsOver property)
hs.Expander.prototype.onAfterExpand = function (sender,e) {
   if (!sender.mouseIsOver) sender.close();
};

hs.Expander.prototype.onImageClick = function (sender) {
	// We dont want to close the image on click as it pops straight back up due to mouseover, but if we have a linkable image, lets jump there
//	if( sender.a.href && sender.a.href.length && sender.a.href.indexOf("i3.digiguide") == -1 )
//		window.location.href = sender.a.href;

//	return false;
};

hs.onKeyDown = function (sender, e) {
	if( e.keyCode == 27 )
	{
		// Escape pressed, carry on and close
		return true;
	}
//	var exp = hs.getExpander();
//	exp.caption.innerHTML = "You just hit the key with the following key code: <b>"+ e.keyCode +"</b";
	return false;
};

