// JavaScript Document


function fireNavUp(){
	$("#NAV_HOLDER .NAV_MAINELEMENT a").fadeTo(0, 0);
	$("#NAV_LOGO a").fadeTo(0, 0);
	$("#NAVTOP li a").fadeTo(0, 0);	
	$("#NAVFILM_SUB li a").fadeTo(0, 0);	
	$("#NAVTOP .NAVTEXT").fadeTo(0, 0);	
	$("#NAV_NAVLINE a").fadeTo(0, 0.3);	
}

/*
//audio
var audioElement = document.createElement('audio');
function bootAudio(){
	audioElement.setAttribute('src', '_test/SNDDbeep28.wav');
	audioElement.addEventListener("load", function() { 
		audioElement.play(); 
		$(".duration span").html(audioElement.duration);
		$(".filename span").html(audioElement.src);
	}, true);
	audioElement.load()
}*/

// Fuer Browser-Back: Highlight bleibt sonst stehen und blendet nicht aus.
$(window).unload(function(){
	$("* .JQ_NAVBACK").fadeTo(250, 0);	// Alles was highlighted hat diese Klasse 
});

	
$(document).ready(function() {
	fireNavUp();
//	bootAudio();
	
	//Impressum im eigenen Fenster
	$("a#NAV_IMPRESSUM").click(function(event){
		event.preventDefault();
		MeineEinstell = "width=432,height=500,left=" + (window.pageXOffset + 500) + ",top=" + (window.pageYOffset + 100) + ",dependent=yes,scrollbars=yes";
		MeinFenster = window.open("Impressum", "legal_window", MeineEinstell);
		MeinFenster.focus();
	});
	

	// TOP Navi und Hilfetext
	$("#NAVTOP li a").hover(function() {
		var navText = "#" + $(this).attr("id") + "_TEXT";
	  	$(navText).stop(true, false).fadeTo(250, 1);
		$(this).stop(true, false).fadeTo(250, 1);
	}, function() {
		var navText = "#" + $(this).attr("id") + "_TEXT";
	  	$(navText).stop(true, false).fadeTo(250, 0);
	  $(this).stop(true, false).fadeTo(250, 0);
	});
	

	
	
	// Impressumszeile
	$("#NAV_NAVLINE a").hover(function() {
	  $(this).stop(true, false).fadeTo(250, 1);
	}, function() {
	  $(this).stop(true, false).fadeTo(250, 0.3);
	});
	
	// Hauptnavigation
	$("#NAV_HOLDER .NAV_MAINELEMENT a").hover(function() {
	  $(this).stop(true, false).fadeTo(250, 1);
	}, function() {
	  $(this).stop(true, false).fadeTo(250, 0);
	});
	
	$("#NAV_LOGO a").hover(function() {
	  $(this).stop(true, false).fadeTo(250, 1);
	}, function() {
	  $(this).stop(true, false).fadeTo(250, 0);
	});
	
	// Film Subnavi
	$("#NAVFILM_SUB li a").hover(function() {
	  $(this).stop(true, false).fadeTo(250, 1);
	}, function() {
	  $(this).stop(true, false).fadeTo(250, 0);
	});	
	
/*	$("#NAV_LOGO a").mouseenter( function(){
		$(this).fadeTo(250, 1);
	});
	
	$("#NAV_LOGO a").mouseleave( function(){
		$(this).fadeTo(250, 0);
	});	 */
	
	
	
});


