		// 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';


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 == 'video') {
		
		   // attatch it to this hs.Expander instance and add some options
		   sender.createOverlay( { html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>', position: 'top right', fade: 2 } );
		}
		
	}
	
	


	
	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 Us', preserveContent: false, width: 380, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 324 } );
}
function changeFIT_hs(this_hs, anchor_hs) {
    return hs.htmlExpand(this_hs, { objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'Change My Fit Location', preserveContent: false, width: 500, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 230 });
}
function vieworder_hs(this_hs, anchor_hs) {
    return hs.htmlExpand(this_hs, { objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'View Order', preserveContent: false, width: 600, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 500 });
}
function coming_soon_hs(this_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'drop-shadow', wrapperClassName: 'draggable-header no-footer no-close', headingText: 'Coming Soon', preserveContent: false, width: 284, anchor: 'auto', objectLoadTime: 'after', objectHeight: 258 } );
}

function submit_physician_hs(this_hs,anchor_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'rounded-white', wrapperClassName: 'draggable-header', headingText: 'Submit My Physician&rsquo;s Information', preserveContent: false, width: 380, anchor: anchor_hs, objectLoadTime: 'after', objectHeight: 324 } );
}

function video_hs(this_hs) {
	return hs.htmlExpand( this_hs, {objectType: 'iframe', outlineType: 'drop-shadow', wrapperClassName: 'borderless video', transitions: ["fade"], preserveContent: false, width: 640, align: 'center', objectLoadTime: 'after', objectHeight: 480 } );
}

