function documentOnLoad() {
	$(".hide").css({"display":"none"});
	$("li.inakt_lang").css( {
		"display" :"none"
	});
	$("img#lang_toggle").click( function() {
		$("li.inakt_lang").css( {
			"display" :"block"
		});
	})
	$("ul#language").mouseleave( function() {
		$("li.inakt_lang").css( {
			"display" :"none"
		});
	});
	$('#floesh').innerfade( {
		speed :'slow',
		timeout :4000,
		type :'sequence',
		containerheight :'222px'
	});
	searchInputToggle();

	 $("a[href^=#]").each(function(){
    $(this).click(function(){
      var $href = $(this).attr("href");
      $href = $href.split("#");
      window.location.hash = "#" + $href[1];
      return false;
    });
  });
}

function debug(error) {
	if (window.console) {
		console.debug(error);
	}
}

function togId(id) {
	$(".detail").hide();
	$(".node_elem_e2").css( {
		"background" :"#e9eff2"
	});
	$("#elem_" + id).show();
	$("#node_elem_" + id).css( {
		"background" :"#c2d1d8"
	});
}

function selectId(id) {
	$("#selected_value").val(id);
}

function getSelectedId() {
	var id = $("#selected_value").val();
	togId(id);
}

function searchInputToggle() {
	$(".search_input").each( function() {
		$(this).focus( function() {
			$(this).val("");
		})
	});
}
function updateContent($id, $lang) {
	$("#standort_ausgabe").fadeOut("slow");
	$.post('../../content_scripts/ajax_kicker.php', 'action=get_location&id='
			+ $id + '&lang=' + $lang, function($data) {
		$("#standort_ausgabe").hide();
		$("#standort_ausgabe").html($data);
		$("#standort_ausgabe").fadeIn("slow");
	});
}

function displayStandortMap($lang) {
	$('#standort_map').flash( {
		src :'../../assets/flash/world_map.swf',
		width :'509',
		height :'205',
		color :'#fff',
		wmode :'opaque',
		flashvars : {
			sprache :$lang
		}
	}, {
		update :false,
		version :'7',
		expressInstall :true
	});
}

function hideFlashAlternative() {
	$(".standorte_alternative").hide();
}

