﻿hs.graphicsDir = '/highslide/graphics/';
hs.wrapperClassName = 'wide-border';
hs.showCredits = false;
hs.allowMultipleInstances = false;
hs.expandDuration = 0;
hs.restoreDuration = 0;
hs.align = 'center';
hs.outlineType = 'rounded-white';
hs.transitions = ['expand'];
hs.dimmingOpacity = 0.25;
hs.wrapperClassName = 'highslide-wrapper';
hs.enableKeyListener = false;
hs.preserveContent = false;
//hs.objectLoadTime = 'after';
//hs.wrapperClassName = 'borderless';
//hs.wrapperClassName = 'draggable-header';
hs.lang = {
    cssDirection: 'ltr',
    loadingText: 'Loading...',
    loadingTitle: 'Click to cancel',
    focusTitle: 'Click to bring to front',
    fullExpandTitle: 'Expand to actual size (f)',
    creditsText: 'Powered by <i>Highslide JS</i>',
    creditsTitle: 'Go to the Highslide JS homepage',
    previousText: 'Previous',
    nextText: 'Next',
    moveText: 'Move',
    closeText: 'Close',
    closeTitle: 'Close',
    resizeTitle: 'Resize',
    playText: 'Play',
    playTitle: 'Play slideshow (spacebar)',
    pauseText: 'Pause',
    pauseTitle: 'Pause slideshow (spacebar)',
    previousTitle: 'Previous (arrow left)',
    nextTitle: 'Next (arrow right)',
    moveTitle: 'Move',
    fullExpandText: '1:1',
    number: 'Image %1 of %2',
    restoreTitle: 'Click to close image.'
};
//hs.skin =
//{
//    contentWrapper:
//    '<div class="highslide-header"><ul>' +
//			'<li class="highslide-close">' +
//				'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">' +
//				'<span>{hs.lang.closeText}</span> <img src="/highslide/graphics/close.png" width="22" height="22" style="vertical-align: middle" alt="digital scrapbook close button" /> </a>' +
//			'</li>' +
//		'</ul></div>' +
//		'<div class="highslide-body"></div></div>'
//};
hs.skin =
        {
            contentWrapper:
            '<div class="highslide-header"><ul>' +
			        '<li class="highslide-close">' +
				        '<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">' +
				        '<span>{hs.lang.closeText}</span> <img src="/highslide/graphics/close.png" width="22" height="22" style="vertical-align: middle; border:none;" alt="" /> </a>' +
			        '</li>' +
		        '</ul></div>' +
		        '<div class="highslide-body"></div></div>'
        };

// Highslide fixed popup mod. Requires the "Events" component.
if (!hs.ie || hs.uaVersion > 6) hs.extend(hs.Expander.prototype, {
    fix: function(on) {
        var sign = on ? -1 : 1,
			stl = this.wrapper.style;

        if (!on) hs.getPageSize(); // recalculate scroll positions

        hs.setStyles(this.wrapper, {
            position: on ? 'fixed' : 'absolute',
            zoom: 1, // IE7 hasLayout bug,
            left: (parseInt(stl.left) + sign * hs.page.scrollLeft) + 'px',
            top: (parseInt(stl.top) + sign * hs.page.scrollTop) + 'px'
        });

        if (this.outline) {
            stl = this.outline.table.style;
            hs.setStyles(this.outline.table, {
                position: on ? 'fixed' : 'absolute',
                zoom: 1, // IE7 hasLayout bug,
                left: (parseInt(stl.left) + sign * hs.page.scrollLeft) + 'px',
                top: (parseInt(stl.top) + sign * hs.page.scrollTop) + 'px'
            });

        }
        this.fixed = on; // flag for use on dragging
    },
    onAfterExpand: function() {
        this.fix(true); // fix the popup to viewport coordinates
        //try { window.external.setHighslideOpen("true"); } catch (err) { }
    },
    onBeforeClose: function() {
        this.fix(false); // unfix to get the animation right
        //try { window.external.setHighslideOpen("false"); } catch (err) { }
    },
    onDrop: function() {
        this.fix(true); // fix it again after dragging
    },
    onDrag: function(sender, args) {
        if (this.fixed) { // only unfix it on the first drag event
            this.fix(false);
        }
    }

});
