// Fehler unterdrücken
var _root = '/';


function stopError() {
//	return true;
}
onerror = stopError;


$(document).ready(function(){
	
	
	// this initialises the demo scollpanes on the page - each with different
	// animation characteristics.
	//$('#pane1').jScrollPane({animateTo:true, animateInterval:50, animateStep:5});
	
	if($('div.dropdown').length > 0){
		$('div.dropdown').children('div').addClass('invisible').removeClass('visible').hide();
		$('div.dropdown').children('h5').addClass('closed').removeClass('open');

		$('div.dropdown').click(function(){
			if($(this).children('div').hasClass('invisible'))
			{
				$(this).children('div').addClass('visible').removeClass('invisible').slideDown();
				$(this).children('h5').addClass('open').removeClass('closed');
			} else {
				$(this).children('div').addClass('invisible').removeClass('visible').slideUp();
				$(this).children('h5').addClass('closed').removeClass('open');
			}
		});

	}
	if($('#startseite').length > 0)
	{
		$('#layer').hide();
		$("a[rel^='prettyPhoto']").prettyPhoto({
			theme: 'light_square',
			default_height: 160
		});
		$('#l1').trigger('click');
	}
	
	
	/* Toolbox */
	$('#print').click(function(event){print();});
	
	/* Suche */
	/*$('input#schnellsuche').focus(function(){
		if(this.value=='Suche'){this.value = '';}
		if(this.value=='Search'){
			this.value = '';
		}
	});
	$('input#schnellsuche').blur(function(){
		if(this.value==''){
			this.value='Suche';
		}
	});*/

}); // OnDocumentReady Ende

$(window).load (function () {


}); // WindowLoad 

//### blendet je ein Element ein & aus
function showhide( showid, hideid ) {
	if ( showid == hideid && document.getElementById( showid ) ) {
		if ( document.getElementById( hideid ).style.visibility == 'hidden' ) {
			hideid = '';
		}
		else {
			showid = '';
		}
	}
  if ( document.getElementById( showid ) ) {
    document.getElementById( showid ).style.visibility = 'visible';
    document.getElementById( showid ).style.display = '';
  }
  if ( document.getElementById( hideid ) ) {
    document.getElementById( hideid ).style.visibility = 'hidden';
    document.getElementById( hideid ).style.display = 'none';
  }
}
