function logos(){
	$("#logos").fadeIn(function(){
		$("body").bind({
			mousemove:function(a){
				position=a.pageX;if(position<"97"){
					$("#logos").fadeOut()
				}
				else{
					$("#logos").fadeIn()
				}
			}
		})
	})
}
function radio(){
	var a=$.cookie("player");
	if(a=="pausepause"||a=="pause"||a==null){
		player()
	}
	else {
		if(a=="stop"){
			noplayer()
		}
	}
}
function player(){
	var a=$.cookie("player");
	$("#player_container").stop().animate({opacity:"1"},800,function(){
		if(a=="pausepause"){
			$("#player_play").removeClass("active");
			$("#player_pause").attr("class","active")
		}
		else{
			$("#player_pause").removeClass("active");
			$("#player_play").attr("class","active");
			$("#jquery_jplayer").jPlayer({
				ready:function(){this.setFile("http://www.enterthevoid-film.de/audio/airsuite.mp3");
				this.play()
			},customCssIds:true}).jPlayer("onSoundComplete",function(){
				this.element.jPlayer("play")
			})
		}
		$("#player_pause").click(function(){
			$.cookie("player","pausepause");
			$("#player_play").removeClass("active");
			$("#player_pause").attr("class","active");
			$("#jquery_jplayer").jPlayer("pause");$(this).blur();return false});
			$(".overlays").click(function(){
				var b=$(this).attr("href").split(".").pop().toLowerCase();
				if(b=="html"){
					if(a==null){
						$("#player_play").removeClass("active");
						$("#player_pause").attr("class","active");
						$("#jquery_jplayer").jPlayer("pause")
					}
				}
				$(this).blur();
			});
			$("#sb-nav-close,#sb-overlay").click(function(){
				var b=$.cookie("player");
				if(b=="pause"||b==null){
					$("#player_pause").removeClass("active");
					$("#player_play").attr("class","active");
					$("#jquery_jplayer").jPlayer("play");
					$(this).blur();return false
				}
			});
			$("#player_play").click(function(){
				$("#player_pause").removeClass("active");
				$("#player_play").attr("class","active");
				$("#jquery_jplayer").jPlayer("play");
				$.cookie("player","",{expires:-1});radio();
				$(this).blur();
				return false
			});
			$("#player_stop").click(function(){
				$("#jquery_jplayer").jPlayer("stop");
				$.cookie("player","stop");
				radio();
				$(this).blur()
				return false
			})
	}).fadeIn(0,function(){
			if(a==null){
				$("#player_play").attr("class","active");$("#jquery_jplayer").jPlayer("play")
			}
		})
	}
	function noplayer(){
		$("#player_container").stop().animate({opacity:"0"},800,function(){
			$("#noplayer").stop().animate({opacity:"1"},800).fadeIn()
		}).fadeOut()
	}
	function playerswitch(){
		$("#noplayer").stop().animate({opacity:"0"},800,function(){
			$.cookie("player","",{expires:-1});radio()
		}).fadeOut()
		}
	function container_IE(){
		$("#container").fadeIn(900,function(){
			$("#logo,#press").fadeIn(300,function(){
				$("#boy").fadeIn(300,function(){
					$("#spinner").fadeIn(300,function(){
						$("#spinner").delay(2000).fadeOut(20,function(){
							$(".main").animate({left:"0"},1200,function(){
								$(this).animate({scrollLeft:1000},800);
								radio();
								logos()
							})
						})
					})
				})
			})
		})
	}
	function container(){
		$("#initial_date").delay(1000).fadeIn(1200).delay(1000).fadeOut(1200,function(){
			$("#supersize img:nth-child(1)").fadeIn(0).delay(120).fadeOut(0,function(){
				$("#supersize img:nth-child(2)").fadeIn(0).delay(120).fadeOut(0,function(){
					$("#supersize img:nth-child(3)").fadeIn(0).delay(120).fadeOut(0,function(){
						$("#supersize img:nth-child(4)").fadeIn(0).delay(120).fadeOut(0,function(){
							$("#supersize img:nth-child(5)").fadeIn(0).delay(120).fadeOut(0,function(){
								$("#supersize img:nth-child(6)").fadeIn(0).delay(120).fadeOut(0,function(){
									$("#supersize img:nth-child(7)").fadeIn(0).delay(120).fadeOut(0,function(){
										$("#container").fadeIn(900,function(){
											$("#logo, #press").fadeIn(300,function(){
												$("#boy").fadeIn(300,function(){
													$("#spinner").fadeIn(300,function(){
														$("#spinner").delay(2000).fadeOut(20,function(){
															$(".main").animate({left:"0"},1200,function(){
																$(this).animate({scrollLeft:1000},800);
																radio();
																logos()
															})
														})
													})
												})
											})
										})
									})
								})
							})
						})
					})
				})
			})
		})
	}
	function index(){
		$("#initial_date").delay(1000).fadeIn(1200).delay(1000).fadeOut(1200,function(){
			$("#supersize img:nth-child(1)").fadeIn(0).delay(120).fadeOut(0,function(){
				$("#supersize img:nth-child(2)").fadeIn(0).delay(120).fadeOut(0,function(){
					$("#supersize img:nth-child(3)").fadeIn(0).delay(120).fadeOut(0,function(){
						$("#supersize img:nth-child(4)").fadeIn(0).delay(120).fadeOut(0,function(){
							$("#supersize img:nth-child(5)").fadeIn(0).delay(120).fadeOut(0,function(){
								$("#supersize img:nth-child(6)").fadeIn(0).delay(120).fadeOut(0,function(){
									$("#supersize img:nth-child(7)").fadeIn(0).delay(120).fadeOut(0,function(){
										$("#container").fadeIn(900,function(){
											$("#press").fadeIn(300,function(){
													$("#spinner").fadeIn(300,function(){
														$("#spinner").delay(2000).fadeOut(20,function(){
															$("#splash").fadeIn(1200,function(){
																$('#videoload').load('flash.html');
															})
														})
													})
												})
										})
									})
								})
							})
						})
					})
				})
			})
		})
	}
function titelchange(){
	$("#sb-title-inner").css({display:"none"})
}
function reinkommen(){
	$("#spinner").fadeIn(300,function(){
		$("#spinner").delay(40).fadeOut(20,function(){
			$("#press").fadeIn(300,function(){
				$(".main").animate({left:"0"},1200,function(){
					$(this).animate({scrollLeft:1000},800);
					radio();
					logos()
				})
			})
		})
	})
}
function date(){
	$("body").prepend('<div id="hyph" />');
	$("#hyph").delay(600).fadeOut(300)
}
$(document).ready(function(){
	Shadowbox.init({displayCounter:false,onOpen:titelchange});
	var a=$(document).height()-$("body").offset().top;
	$("#logos").height(a);
	$(window).resize(function(){
		var b=$(document).height()-$("body").offset().top;
		$("#logos").height(b)
	});
	$("#logo a").click(function(){
		$("#jquery_jplayer").jPlayer("stop");
		ziel=$(this).attr("href");
		$(".main").animate({left:"-5000px"},1200,function(){
			document.location.href=ziel
		});
		return false
	});
	$("body").bind({mousemove:function(f){
		var b=$(window).height();var b=b-120;var d=b/100;var d=Math.round(d);var g=[0,10,20,30,40,50,60,70,80,90];var c=[];$.each(g,function(){var e=this*d;c.push(e)});position=f.pageY;$.each(c,function(e,h){
			var i=c[e-1];if(i==undefined){var i=0}if(position>i&&position<h){
				$("#logo a").stop().fadeTo(0,"."+e)}})}});
				$("#logo").bind({
					mouseenter:function(){
						$(this).children("#logo a").stop().fadeTo(0,1)
					},
					mouseleave:function(){
						$(this).children("#logo a").stop().fadeTo(0,0.2)
					}
				});
				$("#home").bind({
					mouseenter:function(){
						$(this).fadeTo(0,1)
					}
				});
				$("#playerswitch").bind({click:function(){playerswitch()}})});
