		$(document).ready(function() {
			
			// Menü links Mouseover
			$("#menu li.hover").mouseover(function(){
		      		$(this).css('background-position','-222px -5px');
		 	});
		 	$("#menu li.hover").mouseout(function(){
		      		$(this).css('background-position','-0px -5px');
			});
			
			// Buttons rechts Mouseover
			$("a.button").mouseover(function(){
		      		$(this).css('background-position','175px 0px');
					$("span#sound_button").show();
		 	});
		 	$("a.button").mouseout(function(){
		      		$(this).css('background-position','0px 0px');
					$("span#sound_button").hide();
		 	});
			
			// Menü links Ausklappmenü
			function initMenu() {
				$('#slidemenu ul').hide();
				// $('#slidemenu ul:first').show();
				$('#slidemenu ul.active').show();
				$('#slidemenu li a').click(function() {
					var checkElement = $(this).next();
					if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
						checkElement.slideUp('normal');
						$("span#sound_button").show();
						$("span#sound_button").jmp3({		
							filepath: "sounds/mouseover.mp3",
							repeat: "false"
						});
						return false;
					}
					if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
						$('#slidemenu ul:visible').slideUp('normal');
						checkElement.slideDown('normal');
						$("span#sound_button").show();
						$("span#sound_button").jmp3({		
							filepath: "sounds/mouseout.mp3",
							repeat: "false"
						});						
						return false;
					}
				});
			}
			initMenu();
			
			function toggleHeader() {
				var wheight = $(window).height();
				if (wheight < 800) {
					$("#header").hide();
				} else {
					$("#header img").fadeIn();
				}
			}
			toggleHeader();
			
			// Srollbereich im Content
			if ( $("#pane").length > 0 ) {
				$('#pane').jScrollPane({scrollbarWidth:17});
			}

			$("#content").fadeIn(3000);
			
			// Colorbox
			if ( $("a[rel='lageplan']").length > 0 ) {
				$("a[rel='lageplan']").colorbox();
			}	
			
			$("span#sound_home").jmp3({
					filepath: "sounds/intro.mp3",
					repeat: "true"
 			});	
			
		     if ($.cookie("music")=="on") {
				$("#speaker #on").hide();
				$("#speaker #off").show();
				$("span#sound_home object").remove();
			} 

			$("#speaker").click(function(){
						$("div.music").toggle();
						if ($.cookie("music")=="off") {
							$.cookie("music","on");
							$("span#sound_home object").remove();
						} else {
							$.cookie("music","off");
							$("span#sound_home").jmp3({
								filepath: "sounds/intro.mp3",
								repeat: "true"
 							});	
						}
					});
			
			$(".buttons #persfoto").mouseover(function(){
						$("span#sound_button").jmp3({		
							filepath: "sounds/persfoto.mp3",
							repeat: "false"
					});
			});

			$(".buttons #checkyourself").mouseover(function(){
						$("span#sound_button").jmp3({		
							filepath: "sounds/checkyourself.mp3",
							repeat: "false"
					});
			});
			
			$(".buttons #schnuppertag").mouseover(function(){
						$("span#sound_button").jmp3({		
							filepath: "sounds/schnuppertag.mp3",
							repeat: "false"
					});
			});
			
		});
