		// override Highslide settings here
		// instead of editing the highslide.js file
		hs.graphicsDir = '/highslide/graphics/';
		hs.showCredits = false;
		hs.expandCursor = null;
		hs.loadingOpacity = 0.90;
		hs.transitions = ['expand', 'crossfade'];
		hs.restoreCursor = null;
		hs.lang.restoreTitle = 'Click for next image';
		hs.captionOverlay.position = 'above';


// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	slideshowGroup: 'group1',
	interval: 5000,
	repeat: true,
	useControls: true,
	overlayOptions: {
		position: 'top right',
		offsetY: 0,
		offsetX: 6
	},
	thumbstrip: {
		position: 'top',
		mode: 'horizontal',
		relativeTo: 'expander',
		offsetY: -110,
		width: '530px'
	}
});

// Options for the in-page items
var inPageOptions = {
	slideshowGroup: 'group1',
	outlineType: null,
	allowSizeReduction: false,
	wrapperClassName: 'in-page controls-in-heading',
	useBox: true,
	width: 530,
	height: 398,
	targetX: 'gallery-area -10px',
	targetY: 'gallery-area 65px',
	captionEval: 'this.thumb.title',
	numberPosition: 'caption'
}

// Close button for large images
hs.registerOverlay({
	html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
	position: 'top right',
	fade: 2, 
	slideshowGroup: 'large'
});

// Options for large images
var largeImage = {
	allowSizeReduction: true,
	slideshowGroup: 'large',
	align: 'center',
	wrapperClassName: 'borderless'
};

// Open the first thumb on page load
hs.addEventListener(window, 'load', function() {
	
	if (document.getElementById('thumb1')) {
		document.getElementById('thumb1').onclick();
	}
});

// Cancel the default action for 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;
}

hs.onKeyDown = function(sender, e) {
     if (e.keyCode == 70) return false;
 }

// Keep the position after window resize
hs.addEventListener(window, 'resize', function() {
	var i, exp;
	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);
		}
	}
});


// Set different restorTitle for gallery and large image
hs.Expander.prototype.onInit = function() {
	if (this.slideshowGroup == 'large') hs.lang.restoreTitle = "Click to close"; 
	else hs.lang.restoreTitle = "Click for next image";
};

var sender_hs;

	hs.Expander.prototype.onBeforeExpand = function (sender, e) {
	
		if (sender.a.name == 'link') {
		
		   // create a new DOM element
		   var div = document.createElement('div');
		
		   // add a class name to allow CSS styling
		   div.className = 'highslide-overlay controlbar';
		   
		   div.innerHTML = '<a href=\"javascript:;\" class=\"open_window\" title=\"Open in New Window\" onClick=\"window.open(hs.getExpander(this).a.href); hs.getExpander(this).close();\"></a>';
		
		   // attatch it to this hs.Expander instance and add some options
		   sender.createOverlay( { thumbnailId: null, overlayId: div, position: 'top right', useOnHtml: true } );
		}
		
		
		if (sender.a.name == 'map') {
		
		   // create a new DOM element
		   var div = document.createElement('div');
		   // add a class name to allow CSS styling
		   div.className = 'highslide-overlay controlbar';
		   div.innerHTML = '<a href=\"javascript:;\" class=\"open_window\" title=\"Open in New Window\" onClick=\"window.open(hs.getExpander(this).a.href); hs.getExpander(this).close();\"></a>';
		
		   // attatch it to this hs.Expander instance and add some options
		   sender.createOverlay( { thumbnailId: null, overlayId: div, position: 'top right', useOnHtml: true } );
		}
		
		
		if (sender.a.name == 'gallery') {
			new_path = sender.content.src;
		
			new_path = new_path.replace("/gallery/", "/large/");
		   // create a new DOM element
		   var div = document.createElement('div');
		   // add a class name to allow CSS styling
		   div.className = 'full-expand-overlay';
		   div.innerHTML = '<a href="'+ new_path +'" title="Expand to actual size" onclick="return hs.expand(this, largeImage)"></a>';
		
		   // attatch it to this hs.Expander instance and add some options
		   sender.createOverlay( { thumbnailId: null, overlayId: div, position: 'bottom right', offsetX: 12, offsetY: 10} );
		}
		
	}
	
	


	
	hs.Expander.prototype.onFocus = function (sender, e) {
		sender_hs = sender;
	}

	


function link_hs(this_hs,text_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header full-size', headingText: text_hs, height: 2500, objectLoadTime: 'after', preserveContent: false} );
}

function link_size_hs(this_hs,text_hs,width_hs,height_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: text_hs, width: width_hs, height: height_hs, objectLoadTime: 'after', align: 'center', preserveContent: false} );
}


function contact_hs(this_hs,anchor_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'Contact', preserveContent: false, width: 380, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 293 } );
}

function contact_prop_hs(this_hs,text_hs,anchor_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: text_hs, preserveContent: false, width: 380, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 293 } );
}

function roi_hs(this_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'ROI Calculator &amp; Examples', preserveContent: false, width: 940, align: 'center', objectLoadTime: 'after', objectHeight: 430 } );
}

function map_hs(this_hs,text_hs) {
	return hs.htmlExpand( this_hs, { src: this_hs.href + '&amp;output=embed', objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'QPP - maps.google.com - ' + text_hs, width: 800, height: 600, objectLoadTime: 'after', align: 'center', preserveContent: false} );
}

