// JavaScript Document
jQuery(document).ready(function () {
			   
jQuery('#top img').stop().animate({'opacity': '0.1'}, 100); 
								 
	jQuery(window).scroll(function ()  {
	var scrollTop = jQuery(window).scrollTop();
			
			if (scrollTop != 0) { 
				jQuery('#top img').stop().animate({'opacity': '1'}, 300); 
	
			}
			else { 
				jQuery('#top img').stop().animate({'opacity': '0.1'}, 300); 
	
			}
			
	});

		jQuery('#top').click(function(){
			jQuery('html, body').animate({scrollTop:0}, 200); 
		});
		
	/* 	jQuery('#lang_sel').stop().animate({'opacity': '0'}, 300).hide(); 
		
		jQuery('#language span').click( function () {
			if (jQuery('#lang_sel:hidden')) {
				jQuery('#lang_sel').stop().show().animate({'opacity': '1'}, 300); 
			}
	    });
		
		if (jQuery('html').attr('lang') == "en-US" ) {
			jQuery('#language_ind').html('Language');
		} else {
			jQuery('#language_ind').html('Sprache');
		}; */
		

		
	
	jQuery('.menu ul ul.children').each( function (){
			jQuery(this).find('li a:first').css("border-top", "none !important");
			jQuery(this).find('li a:last').css("border-bottom", "none !important");
									 })
	
	jQuery('html, #content').css('min-height','100%');
	jQuery('#primary').css('min-height','638px');
	
/*	var hoehecontent = jQuery('#content').height();
	jQuery('#primary').css('min-height','hoehecontent');*/
	
	
	/* jQuery(window).resize(function() {
		adjustHeight();
	});*/
	
});

//<![CDATA[

// hs.graphicsDir = 'images/highslide/';
hs.transitions = ['expand', 'crossfade'];
hs.restoreCursor = null;
hs.lang.restoreTitle = 'Click for next image';
hs.allowWidthReduction = false;

hs.allowSizeReduction = false;


// Add the slideshow providing the controlbar and the thumbstrip

hs.addSlideshow({

	//slideshowGroup: 'group1',
	useControls: false,
	overlayOptions: {
		position: 'bottom left',
		offsetY: 50

	},

	thumbstrip: {
		position: 'rightpanel',
		width:'310px',
		mode: 'horizontal',
		relativeTo: 'extender'
	}

});



// Options for the in-page items

var inPageOptions = {

	//slideshowGroup: 'group1',

	outlineType: null,
	allowSizeReduction: true,
	allowHeightReduction: true,
	wrapperClassName: 'in-page',
	useBox: true,
	width: 270,
	height: 180,
	targetX: 'gallery-area 10px',
	targetY: 'gallery-area 10px'
	

}



// Open the first thumb on page load

 hs.addEventListener(window, 'load', function() {
	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;
}



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

		}

	}

});

//]]>


