var yellow = "#ffec00";

function navActive() {  
    // nav1 aktivieren:
	var lis = document.getElementsByTagName('li');
	for(var i = 0; tag = lis[i]; ++i) {
		if(tag.className == 'nav1link') {
			if(lis[i].firstChild && lis[i].firstChild.href && lis[i].firstChild.href == window.location.href) {
				nav1active(lis[i]);
			}
		}
		
		// nav2 und parent aktivieren
		if(tag.className == 'nav2link') {
			if(lis[i].firstChild && lis[i].firstChild.href && lis[i].firstChild.href == window.location.href) {
				lis[i].parentNode.style.display = "block";
				nav1active(lis[i].parentNode.parentNode);
				nav2active(lis[i]);
			}
		}
	}	
}

function nav1active(theElement) {
	theElement.firstChild.style.backgroundColor = yellow;
	theElement.firstChild.style.color = "#000000";
}

function nav2active(theElement) {
	theElement.firstChild.style.backgroundColor = yellow;
	theElement.firstChild.style.color = "#000000";	
}

$(document).ready(function(){
	$(".newslink").fancybox({			
		'width' : 680,
		'height' : 590,
		'padding' : 10,
		'autoScale' : false,
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'overlayOpacity' : '0.8',
		'overlayColor' : '#000',			
		'type' : 'iframe'			
	});	
	
	$(".fancygallery").fancybox({			
		'overlayOpacity' : '0.8',
		'overlayColor' : '#000',			
		'hideOnContentClick': true	
	});	
	
	$("#fancygallery").fancybox({			
		'overlayOpacity' : '0.8',
		'overlayColor' : '#000',			
		'hideOnContentClick': true	
	});	
	
	$(".inline").fancybox({
		'hideOnContentClick' : false,
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'overlayOpacity' : '0.8',
		'overlayColor' : '#000',
		'scrolling' : 'no'		
	});		
});
