	//Lightbox
	$(function() {			
			$('a.popup').lightBox();
	});
	
	// JavaScript Document
	$(document).ready(function(){	
		$(".weiterbutton").css("cursor","pointer");
		
		$("a.weiss2").click(function(){		
			$.ajax({
				type: "POST",
				url: "session_var.php",
				success: function(msg) {
					if(msg=="true"){
						$("div#all").css("display","none");		
						$("div#werbung").css("display","none");	
					}
				}
			});
		});
		
		$(".weiterbutton").click(function(){		
			
			$.ajax({
				type: "POST",
				url: "session_var.php",
				success: function(msg) {
					if(msg=="true"){
						$("div#all").css("display","none");		
						$("div#werbung").css("display","none");
						window.location.href=$(".weiterbutton").attr("alt");
					}
				}
			});
		});
		
		$("span.white").css("cursor","pointer");
		$("img[src='img/icons/pfeil_top.gif']").css("cursor","pointer");
	
		$("div.pfeil").click(function(){
			var zahl=$("div.pfeil").index(this);
			var status=$("img[alt='mehr']").eq(zahl).attr("src");
			
			if(status=="img/icons/pfeil_bottom.gif"){				
				$("div.zwischen_inhalt").eq(zahl).css("visibility","hidden");
				$("div.head_start").eq(zahl).animate({
				   top: "0px"
				}, 1000);
				
				$("div.zwischen").eq(zahl).animate({
				   opacity: 1
				}, 1000,  function(){$("span.white").eq(zahl).text("mehr"); $("img[alt='mehr']").eq(zahl).attr("src","img/icons/pfeil_top.gif");});
			} else {
				if(zahl==0){
					var pruefe=$("img[alt='mehr']").eq(1).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(1).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(1).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(1).text("mehr"); $("img[alt='mehr']").eq(1).attr("src","img/icons/pfeil_top.gif");});
					}
					
					var pruefe=$("img[alt='mehr']").eq(2).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(2).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(2).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(2).text("mehr"); $("img[alt='mehr']").eq(2).attr("src","img/icons/pfeil_top.gif");});
					}
				}
				
				if(zahl==1){
					var pruefe=$("img[alt='mehr']").eq(0).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(0).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(0).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(0).text("mehr"); $("img[alt='mehr']").eq(0).attr("src","img/icons/pfeil_top.gif");});
					}
					
					var pruefe=$("img[alt='mehr']").eq(2).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(2).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(2).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(2).text("mehr"); $("img[alt='mehr']").eq(2).attr("src","img/icons/pfeil_top.gif");});
					}
				}
				
				if(zahl==2){
					var pruefe=$("img[alt='mehr']").eq(0).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(0).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(0).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(0).text("mehr"); $("img[alt='mehr']").eq(0).attr("src","img/icons/pfeil_top.gif");});
					}
					
					var pruefe=$("img[alt='mehr']").eq(1).attr("src");
					if(pruefe=="img/icons/pfeil_bottom.gif"){
						$("div.head_start").eq(1).animate({
						   top: "0px"
						}, 1000);
						
						$("div.zwischen").eq(1).animate({
						   opacity: 1
						}, 1000,  function(){$("span.white").eq(1).text("mehr"); $("img[alt='mehr']").eq(1).attr("src","img/icons/pfeil_top.gif");});
					}
				}
				
				$("div.head_start").eq(zahl).animate({
				   width: "267px",
				   top: "-100px"
				}, 1000,  function(){$("div.zwischen_inhalt").eq(zahl).css("visibility","visible");});		
				
				
				
				$("div.zwischen").eq(zahl).animate({
				   opacity: 0.6
				}, 1000,  function(){$("span.white").eq(zahl).text("schließen"); $("img[alt='mehr']").eq(zahl).attr("src","img/icons/pfeil_bottom.gif");});
				
			}			
		
		});
	});
	
	jQuery().ready(function(){
		// simple accordion
		jQuery('#list1b').accordion({
			autoheight: false
		});
		
		jQuery('#list3').accordion({
			header: 'div.accordion_title',
			autoheight: false
		});
		
		// bind to change event of select to control first and seconds accordion
		// similar to tab's plugin triggerTab(), without an extra method
		var accordions = jQuery('#list1a, #list1b, #list2, #list3, #navigation, #wizard');
		
		jQuery('#switch select').change(function() {
			accordions.accordion("activate", this.selectedIndex-1 );
		});
		jQuery('#close').click(function() {
			accordions.accordion("activate", -1);
		});
		jQuery('#switch2').change(function() {
			accordions.accordion("activate", this.value);
		});
		jQuery('#enable').click(function() {
			accordions.accordion("enable");
		});
		jQuery('#disable').click(function() {
			accordions.accordion("disable");
		});
		jQuery('#remove').click(function() {
			accordions.accordion("destroy");
			wizardButtons.unbind("click");
		});
	});
	
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
