/*
*  Highslide site settings
*  DO NOT EDIT. Generated on 2009-05-17 12:45:17 (GMT) by the Highslide Configuration Component 2.0.1
*/

hs.showCredits = true;
hs.creditsPosition = 'top left';
hs.graphicsDir = 'plugins/content/highslide/graphics/';
hs.outlineStartOffset = 3;
hs.outlineWhileAnimating = 2;
hs.loadingOpacity = 0.75;
hs.dimmingOpacity = 0;
hs.padToMinWidth = false;
hs.padToMinWidth = false;
hs.expandCursor = 'zoomin.cur';
hs.restoreCursor = 'zoomout.cur';
hs.creditsHref = 'http://highslide.com';
hs.easing = 'easeInQuad';
hs.easingClose = hs.easing;
hs.fullExpandOpacity = 1.0;
hs.marginTop = 10;
hs.marginBottom = 15;
hs.marginLeft = 10;
hs.marginRight = 15;
hs.minHeight = 200;
hs.minWidth = 200;
hs.numberOfImagesToPreload = 8;
hs.transitions = ['expand'];
hs.fullExpandPosition = 'bottom right';
hs.objectLoadTime = 'before';
hs.align = '';
hs.anchor = '';
hs.allowSizeReduction = true;
hs.fadeInOut = false;
hs.allowMultipleInstances = true;
hs.allowWidthReduction = false;
hs.allowHeightReduction = true;
hs.blockRightClick = false;
hs.enableKeyListener = true;
hs.dynamicallyUpdateAnchors = true;
hs.useBox = false;
hs.cacheAjax = true;
hs.preserveContent = true;
hs.dragByHeading = true;
hs.dragSensitivity = 5;
hs.dimmingDuration = 50;
hs.expandDuration = 250;
hs.transitionDuration = 500;
hs.expandSteps = 10;
hs.zIndexCounter = 1001;
hs.Expander.prototype.onBeforeGetCaption = function(sender)
{
	if (typeof sender.captionId != 'undefined' && sender.captionId != null)
	{
		if (document.getElementById( sender.captionId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/(hsjcaption:)+\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.captionId;
				div['className'] = 'highslide-caption';
				var onclickstyle = onclick.match(/(hsjcaptionstyle:)+\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
}
hs.Expander.prototype.onBeforeGetHeading = function(sender)
{
	if (typeof sender.headingId != 'undefined' && sender.headingId != null)
	{
		if (document.getElementById( sender.headingId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/(hsjheading:)+\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.headingId;
				div['className'] = 'highslide-heading';
				var onclickstyle = onclick.match(/(hsjheadingstyle:)+\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
	return true;
}
hs.Expander.prototype.onBeforeGetContent = function(sender)
{
	if (typeof sender.contentId != 'undefined' && sender.contentId != null)
	{
		if (document.getElementById( sender.contentId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/(hsjcontent:)+\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.contentId;
				div['className'] = 'highslide-html-content';
				var onclickstyle = onclick.match(/(hsjcontentstyle:)+\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
	return true;
}
hs.Expander.prototype.onBeforeExpand = function (sender) {
	if (this.custom != null
       &&this.custom['overlayId'] != null)
    {
		sender.createOverlay( this.custom );
	}
	return true;
}
hs.Expander.prototype.onInit = function (sender)
{
	if (sender.a.onclick != null)
	{
		var onclick = sender.a.onclick.toString();
		var onclickprop = onclick.match(/(overlayId:)+\s*('|")([^'"]*)/);
		if (onclickprop != null)
		{
			var overlayId = onclickprop[3];
			if (document.getElementById( overlayId ) == null)
			{
				var onclickprop = onclick.match(/(hsjcustomOverlay:)+\s*('|")([^'"]*)/);
				if (onclickprop != null)
				{
					var text = unescape( onclickprop[3] );
					var div = document.createElement('div');
					div['innerHTML'] = hs.replaceLang( text );
					div['id'] = overlayId;
					div['className'] = 'highslide-overlay';
					var onclickstyle = onclick.match(/(hsjcustomOverlayStyle:)+\s*('|")([^'"]*)/);
					if (onclickstyle != null)
					{
						var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
						if (styles != null)
						{
							for (var i = 0; i < styles.length; i++)
							{
								var arr;
								arr = styles[i].split(":");
								div.style[arr[0]] = arr[1].replace( " ", "");
							}
						}
					}
					sender.a.appendChild( div );
					var overlayExists = false;
					for (var i = 0; i < hs.overlays.length; i++)
					{
						if (hs.overlays[i].overlayId == overlayId)
						{
							overlayExists = true;
						}
					}
					if (! overlayExists)
					{
						onclickprop = onclick.match(/(customOverlay:)+\s*{\s*([^}]*)}/);
						if (onclickprop != null)
						{
							try
							{
								eval( "var opts = {" + onclickprop[2] + "}" );
								opts.overlayId = overlayId;
								if (typeof sender.thumb.id != "undefined" && sender.thumb.id != "")
								{
									opts.thumbnailId = sender.thumb.id;
									hs.registerOverlay( opts );
								}
								else
								if (typeof sender.a.id != "undefined" && sender.a.id != "")
								{
									opts.thumbnailId = sender.a.id;
									hs.registerOverlay( opts );
								}
							}
							catch(e)
							{
								//	ignore
							}
						}
					}
				}
			}
		}
	}
	return true;
}
hs.addSlideshow( {
	interval: 5000
	,repeat: true
	,useControls: true
	,fixedControls: true
	,overlayOptions: {
		fade: 1
		,position: 'top center'
    	,hideOnMouseOut: true
	}
});
hs.autoplay = false
/*
 * gallery preset: gallery-in-page
*/
hs.transitions = ['fade', 'crossfade'];
hs.restoreCursor = null;
hs.lang.restoreTitle = 'Click for next image';
hs.outlineType = null;
hs.allowSizeReduction = false;
hs.wrapperClassName = 'in-page controls-in-heading';
hs.useBox = true;
hs.width = 600;
hs.height = 400;
hs.targetX = 'gallery-area 10px';
hs.targetY = 'gallery-area';
hs.captionEval = 'this.a.title';
hs.numberPosition = 'caption';

/* Open the first thumb on page load */
hs.addEventListener(window, 'load', function() {
	document.getElementById('in-page-thumb1').onclick();
});

/* Cancel the default action fo image click and do next instead */
hs.Expander.prototype.onImageClick = function() {
	if (/in-page/.test(this.wrapper.className))	return hs.next();
}

/* Under no circumstances should the static popup be closed */
hs.Expander.prototype.onBeforeClose = function() {
	if (/in-page/.test(this.wrapper.className))	return false;
}

/*	.. nor dragged */
hs.Expander.prototype.onDrag = function() {
	if (/in-page/.test(this.wrapper.className))	return false;
}

/* 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);
		}
	}
});

hs.addSlideshow( {
	useControls: true
	,thumbstrip: {
		position: 'above'
	    ,mode: 'horizontal'
		,relativeTo: 'expander'
	}
	,overlayOptions: {
		 position: 'bottom right'
		,offsetY: 50
	}
	,interval: 5000
	,repeat: true
});
hs.autoplay = false