	
	var activeSlide = 0;

	var animation = setInterval("animateSlides()",4000);

	function animateSlides() {
		activeSlide++;
	
		$(".fadeOut").animate({"opacity":0}, { duration: 500, easing: "swing", queue: false} );
		$("#animationStep"+activeSlide).animate({"opacity":1}, { duration: 750, easing: "swing", queue: false} );
		
		if (activeSlide==3) {
			activeSlide=0;		
		}
	}



$(document).ready(function() {

/*

	var a = Math.round(Math.random()*10);
	var b = Math.round(Math.random()*10);
	
	var result  = a+b;
	
	$.validator.methods.equal = function(value, element, param) {
		return value == param;
	};	

	$("#result").html(a + " + " + b+ " = ");
		var validator = $("#mfform").validate({
			debug: false,
			rules: {
				math: {
					equal: result	
				}
			}
		});
		
*/



	$("#referenzen").css("display","block");

	$("#accordion").accordion({ active: false, collapsible: true, navigation: true, autoHeight: false });


	$(".hidden").css("display","none");
	$(".hidden").css("opacity","0");

/*
	$("#imagePhilosophy").click(function(event){
		var self = this;
		if (!jQuery.browser.msie) {
			$(self).animate({"opacity":0,"height":1,"margin":0}, { duration: 250, easing: "swing", queue: false} );
		} else {
			$(self).css({"display":"none"});
		}
	});	
*/
	
    if(!window.location.hash) { 
		$("#accordion").accordion( "activate" , 3 );
	}
	
	$("#logo").click(function(event){ document.location="/"; });	
	$("#contentTop .asset").animate({"opacity":1,"marginTop":0}, { duration: 250, easing: "swing", queue: true} );
 	$("#contentTop #stageHome").animate({"opacity":1}, { duration: 250, easing: "swing", queue: true} ); 
	
	if (jQuery.browser.msie) {

		if ($.browser.version == "7.0") {
			$("#ie7Fix").css("paddingLeft",0);
		}
	}

	/* Kind of IE7 transp. fix */
	$(function() {
		if (jQuery.browser.msie) {
			$('img[src$=.png]').each(function() {
				this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+this.src+",sizingMethod='scale')";
			});
		}
	});


	
	if (!jQuery.browser.msie) {


		$('.button').bind("mouseenter", function() {
			var self = this;
			$(self).animate({"opacity":.5}, { duration: 50, easing: "swing", queue: false} );
		}).bind("mouseleave", function() {
			var self = this;
			$(self).animate({"opacity":1}, { duration: 50, easing: "swing", queue: false} );
		});	
	
	
		$(".orangeBox").animate({"opacity":1}, { duration: 500, easing: "swing", queue: true} );
		$(".orangeBox h1").animate({"opacity":1}, { duration: 1000, easing: "swing", queue: true} );
		$(".orangeBox h2").animate({"opacity":1}, { duration: 1000, easing: "swing", queue: true} );

		$('#naviLevel1 li').bind("mouseover", function() {
			var self = this;
			$("#naviLevel1 li").animate({"opacity":0.5}, { duration: 250, easing: "swing", queue: false} );
			$(self).animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
		}).bind("mouseleave", function() {
			$("#naviLevel1 li").animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
		});	
	
		$('#naviLevel2 li').bind("mouseover", function() {
			var self = this;
			$("#naviLevel2 li").animate({"opacity":0.5}, { duration: 250, easing: "swing", queue: false} );
			$(self).animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
		}).bind("mouseleave", function() {
			$("#naviLevel2 li").animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
		});		

	
/*
		$('a').bind("mouseover", function() {
			var self = this;
			$(self).animate({"opacity":.5}, { duration: 100, easing: "swing", queue: false} );
		}).bind("mouseleave", function() {
			var self = this;
			$(self).animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
		});	
*/
	}
	

//		$(".infobox, .linkbox, .kundenBox").click(function(event){
		$(".body_home .infobox, .linkbox, .kundenBox").click(function(event){
			var self = this;
			document.location=$(self).find("a").attr("href");
		});	
		
// PHILOSOPHIE

	// linke spalten
	$('#philoListe .modulo0,#philoListe .modulo1').bind("mouseenter", function() {
		var self = this;
		if (!jQuery.browser.msie) $(".philoBox .background").animate({"opacity":.3}, { duration: 250, easing: "swing", queue: false} );
   		$(self).find(".info").animate({"opacity":.9,"width": 206,"height":206}, { duration: 150, easing: "swing", queue: false} );
	}).bind("mouseleave", function() {
		var self = this;
		if (!jQuery.browser.msie) $(".philoBox .background").animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
   		$(self).find(".info").animate({"opacity":0,"width": 1,"height":1}, { duration: 150, easing: "swing", queue: false} );
	});	

	// rechte spalten
	$('#philoListe .modulo2').bind("mouseenter", function() {
		var self = this;
		if (!jQuery.browser.msie) $(".philoBox .background").animate({"opacity":.3}, { duration: 250, easing: "swing", queue: false} );
   		$(self).find(".info").animate({"opacity":.9,"width": 206,"height":206, "marginLeft":0}, { duration: 150, easing: "swing", queue: false} );
	}).bind("mouseleave", function() {
		var self = this;
		if (!jQuery.browser.msie) $(".philoBox .background").animate({"opacity":1}, { duration: 250, easing: "swing", queue: false} );
   		$(self).find(".info").animate({"opacity":0,"width": 1,"height":1,"marginLeft":0}, { duration: 150, easing: "swing", queue: false} );
	});	


// KUNDEN
	// linke spalten
	$('#kundenliste .modulo0,#kundenliste .modulo1,#kundenliste .modulo2,#kundenliste .modulo3, #kundenliste .modulo4, ').bind("mouseenter", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":.9,"width": 164,"height":164}, { duration: 164, easing: "swing", queue: false} );
	}).bind("mouseleave", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":0,"width": 1,"height":1}, { duration: 150, easing: "swing", queue: false} );
	});	
/*

	// linke spalten
	$('#kundenliste .modulo0,#kundenliste .modulo1,#kundenliste .modulo2,#kundenliste .modulo3').bind("mouseenter", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":.9,"width": 164,"height":164}, { duration: 164, easing: "swing", queue: false} );
	}).bind("mouseleave", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":0,"width": 1,"height":1}, { duration: 150, easing: "swing", queue: false} );
	});	

	// rechte spalten
	$('#kundenliste .modulo4').bind("mouseenter", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":.9,"width": 164,"height":164, "marginLeft":0}, { duration: 150, easing: "swing", queue: false} );
	}).bind("mouseleave", function() {
		var self = this;
   		$(self).find(".info").animate({"opacity":0,"width": 1,"height":1,"marginLeft":0}, { duration: 150, easing: "swing", queue: false} );
	});	

*/


		$('.infobox').bind("mouseenter", function() {
			var self = this;
			$(self).find(".info").animate({"opacity":.9,"width":143,"height":143}, { duration: 100, easing: "swing", queue: true} );
		}).bind("mouseleave", function() {
			var self = this;
//			$(".info").animate({"opacity":0,"width":1,"height":1}, { duration: 250, easing: "swing", queue: false} );
			$(self).find(".info").animate({"opacity":0,"width":1,"height":1}, { duration: 250, easing: "swing", queue: false} );
		});	




/*
	// Disable accidental selection of elements
	if (typeof document.onselectstart!="undefined") {
		document.onselectstart=new Function ("return false");
	}else{
		document.onmousedown=new Function ("return false");
		document.onmouseup=new Function ("return true");
	}
*/


	

});  

