/******************************************************************************
Name:    highslide_gc JS
Version: 0.1
Config:  default
Author:  David Green
Purpose: Local configurations for website
*******************************************************************************/

	// remove the registerOverlay call to disable the controlbar
	hs.registerOverlay(
    	{
    		thumbnailId: null,
    		overlayId: 'controlbar',
    		position: 'top right',
    		hideOnMouseOut: true
		}
	);
	
    hs.graphicsDir = './highslide/graphics/';
    // Tell Highslide to use the thumbnail's title for captions
    hs.captionEval = 'this.thumb.title';
	
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.expandDuration = 300;
	hs.restoreDuration = 100;
	hs.transitionDuration = 300;
	hs.outlineType = 'glossy-dark';
    //hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.3;
	
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 4000,
		repeat: true,
		useControls: true,
		fixedControls: true,
		overlayOptions: {
			opacity: .6,
			position: 'top center',
			hideOnMouseOut: true
		}
	});

	//this is for the AJAX window
	hs.Expander.prototype.printHtml = function ()
{
    var pw = window.open("about:blank", "_new");
    pw.document.open();
    pw.document.write(this.getHtmlPrintPage());
    pw.document.close();
    return false;
};
hs.Expander.prototype.getHtmlPrintPage = function()
{
    // We break the closing script tag in half to prevent
    // the HTML parser from seeing it as a part of
    // the *main* page.
    var body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body') 
        || this.innerContent;

    return "<html>\n" +
        "<head>\n" +
        "<title>Temporary Printing Window</title>\n" +
        "<script>\n" +"function step1() {\n" +
        "  setTimeout('step2()', 10);\n" +
        "}\n" +
        "function step2() {\n" +
        "  window.print();\n" +
        "  window.close();\n" +
        "}\n" +
        "</scr" + "ipt>\n" +
        "</head>\n" +
        "<body onLoad='step1()'>\n" +
        body.innerHTML +
        "</body>\n" +
        "</html>\n";
};
