//$(document).ready(function(){ 
//	$(document).pngFix(); 
//});

var _root = '/';

if ( location.href.match( 'webdev' ) || location.href.match( 'kundenlogin' ) ) {
	_root = '/schimmelpfennig-becke/';
}

//### blendet je ein Element ein & aus

function showhide( showid, hideid ) {
  if ( showid != '' ) {
	  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 ( hideid != '' ) {
	  if ( document.getElementById( hideid ) ) {
	    document.getElementById( hideid ).style.visibility = 'hidden';
	    document.getElementById( hideid ).style.display = 'none';
	  }
  }
}

function changeSite(v) {
	window.top.location = "../"+v+"/";
}

function setClass( id, className ) {
	if ( document.getElementById( id ) ) {
		document.getElementById( id ).className = className;
	}
}

function setValue( id, value ) {
	if ( document.getElementById( id ) ) {
		document.getElementById( id ).value = value;
	}
}

function swapClass( id, className ) {
  if ( document.getElementById( id ) ) {
    document.getElementById( id ).className = className;
  }
}

function swapImg( id, img ) {
  if ( document.getElementById( id ) ) {
    document.getElementById( id ).src = img;
  }
}

function setDummy( id ) {
	document.getElementById( id+'_dummy' ).value = document.getElementById( id ).value;
}




var lightbox_options = {
	overlayBgColor: '#000',
	overlayOpacity: 0.8,
	imageLoading: _root+'_includes/lightbox/images/ajax-loader_white.gif',
	imageBtnClose: _root+'_includes/lightbox/images/close.gif',
	imageBtnPrev: _root+'_includes/lightbox/images/pfeil_links.gif',
	imageBtnNext: _root+'_includes/lightbox/images/pfeil_rechts.gif',
	containerResizeSpeed: 350,
	txtImage: 'Bild',
	txtOf: 'von'
}

$(document).ready(function(){
	$('div.navigation_sub:visible, div.navigation_subsub:visible').pngFix();
	$('a[@rel*=lightbox]').lightBox(lightbox_options);
});
