if (hs.addEventListener && hs.Outline) hs.addEventListener(window, 'load', function () {
	new hs.Outline('rounded-white');
	new hs.Outline('glossy-dark');
});


var galleryOptions = {
	slideshowGroup: 'gallery',
	wrapperClassName: 'dark',
	//outlineType: 'glossy-dark',
	dimmingOpacity: 0.8,
	align: 'center',
	transitions: ['expand', 'crossfade'],
	fadeInOut: true,
	wrapperClassName: 'borderless floating-caption',
	marginLeft: 100,
	marginBottom: 80,
	numberPosition: 'caption'
};
if (hs.addSlideshow) hs.addSlideshow({
    slideshowGroup: 'gallery',
    interval: 5000,
    repeat: false,
    useControls: true,
    overlayOptions: {
    	className: 'text-controls',
		position: 'bottom center',
		relativeTo: 'viewport',
		offsetY: -60
	},
	thumbstrip: {
		position: 'bottom center',
		mode: 'horizontal',
		relativeTo: 'viewport'
	}

});
hs.Expander.prototype.onInit = function() {
	hs.marginBottom = (this.slideshowGroup == 'gallery') ? 150 : 15;
}

// focus the name field
hs.Expander.prototype.onAfterExpand = function() {

	if (this.a.id == 'contactAnchor') {
		var iframe = window.frames[this.iframe.name],
			doc = iframe.document;
    	if (doc.getElementById("theForm")) {
        	doc.getElementById("theForm").elements["name"].focus();
    	}

	}
}


// Not Highslide related
function frmPaypalSubmit(frm) {
	if (frm.os0.value == '') {
	    alert ('Please enter your domain name');
	    return false;
	}
    return true;
}

jQuery(document).ready(function() {
	var myUrl = self.location.href;
	myUrl = myUrl.toLowerCase();
	jQuery(".galleryCategoryUl li").each(function() {
		var currentId = jQuery(this).attr('id').toLowerCase();
		if (myUrl.indexOf(currentId.substr(0, currentId.length - 5)) > 0) {
			jQuery(this).addClass('current');
		}
	});
});
