function ShowPerson(obj) {
  var blubid='blub-'+obj.id;
	var blub=document.getElementById(blubid);
	if(blub) blub.style.display="block";
}

function HidePerson(obj) {
  var blubid='blub-'+obj.id;
	var blub=document.getElementById(blubid);
	if(blub) blub.style.display="none";
}

function AlignContentPosition() {
  var oCANSP=document.getElementById('canvas-sp');
  var clh1=Math.floor(document.body.clientHeight);
  var clh2=Math.floor(document.documentElement.clientHeight);
  if(clh1>0) clh=clh1; else if(clh2>0) clh=clh2;
  var offset=Math.round((clh-550)/3); var ovtop=0;
	if(offset>0) {
	  oCANSP.style.height=offset+'px'; ovtop=offset-22;
	  var url='setjsval.php?offset='+offset;
		$('#dummy').load(url,function(response,status,xhr){});
	}
	if(document.getElementById('overlay')) {
	  var ovl=$("a[rel]").overlay({
	    mask: { color:'black', opacity:0.75 },
	    effect: 'apple',
	    top: ovtop,
	    onBeforeLoad: function() {
	      var rel=this.getTrigger().attr('rel');
	      ifr=document.getElementById('contentWrap');
	      if(ifr) ifr.src=this.getTrigger().attr('href');
	    }
	  });
	}
}

window.onresize = AlignContentPosition;

//==============================================================================
$(document).ready( AlignContentPosition );

function ani_logo() {
	$("#logo-tl").animate({ left: "185px" },2000);
	$("#logo-tr").animate({ left: "52px" },2000,ani_person);
	$("#logo-dot").animate({ left: "417px", top:"-13px", width:"92px" },5000);
}
function ani_person() {
	ani_pers3();
  setTimeout("ani_pers5()",300);
  setTimeout("ani_pers2()",600);
  setTimeout("ani_pers4()",900);
  setTimeout("ani_pers6()",1200);
  setTimeout("ani_pers1()",1500);
}
function ani_pers1() { $("#i_stephanie").animate({ top:"69px", left:"60px",  width:"154px" },1500,ani_m0); }
function ani_pers2() { $("#i_ruth").animate({ 		 top:"75px", left:"192px", width:"157px" },1500); }
function ani_pers3() { $("#i_manfred").animate({ 	 top:"55px", left:"316px", width:"183px" },1500); }
function ani_pers4() { $("#i_daniela").animate({ 	 top:"69px", left:"484px", width:"131px" },1500); }
function ani_pers5() { $("#i_rainer").animate({ 	 top:"59px", left:"598px", width:"152px" },1500); }
function ani_pers6() { $("#i_alexandra").animate({ top:"63px", left:"726px", width:"139px" },1500); }

function ani_m0() {
  $("#m0").animate({
    top: "30px"
  },1500,ani_msub);
}
function ani_msub() {
	$("#msub").animate({
	  opacity: 1.0,
    top: "67px"
  },1500,ani_kontakt);
}
function ani_kontakt() {
	$("#kontakt").animate({
	  opacity: 1.0
  },1000);
}

//---------------------------------------------------------------------------------------------------------------
function ani_bubble_gruenden() {
	$("#gruenden-pers1").animate({ top:"40px", left:"51px", width:"183px" },1300);
	$("#bubble-gruenden").animate({ opacity: 1.0, top: "50px", left:"270px", width:"541px" },800,ani_bubble_gruenden2);
}
function ani_bubble_gruenden2() {
	$("#talk1").css("display","block");
	$("#talk1").animate({ top:"115px", left:"222px" },800);
}
//---------------------------------------------------------------------------------------------------------------
function ani_bubble_buchpruefen() {
	$("#bp-pers").animate({ top:"40px", left:"51px", width:"183px" },1300);
	$("#bp-blub").animate({ opacity: 1.0, top: "36px", left:"292px", width:"541px" },800,ani_bubble_buchpruefen2);
}
function ani_bubble_buchpruefen2() {
//var th1=$("#blub-text").css("height");
//var th3=document.getElementById("blub-text").clientHeight;
	var th2=document.getElementById("blub-text").offsetHeight;
	$("#blub-cover").css({ "height":th2+"px", "top":"0px" });
	$("#bp-box").css("visibility","visible");
	$("#bp-blub").css("display","none");
	$("#blub-talk").animate({ top:"100px", left:"-51px" },800);
	$("#blub-cover").animate({ top: th2+"px" },3000);
}
//---------------------------------------------------------------------------------------------------------------
function ani_bubble_entwickeln() {
	$("#bp-pers").animate({ top:"36px", left:"749px", width:"152px" },1300);
	$("#bp-blub").animate({ opacity: 1.0, top: "36px", left:"83px", width:"628px" },800,ani_bubble_entwickeln2);
}
function ani_bubble_entwickeln2() {
	var th2=document.getElementById("blub-text").offsetHeight;
	$("#blub-cover").css({ "height":th2+"px", "top":"0px" });
	$("#bp-box").css("visibility","visible");
	$("#bp-blub").css("display","none");
	$("#blub-talk").animate({ top:"90px", left:"628px" },800);
	$("#blub-cover").animate({ top: th2+"px" },3000);
}
//---------------------------------------------------------------------------------------------------------------
function ani_bubble_ansiedeln() {
//	$("#blub-pers1").animate({ top:"23px", left:"16px", width:"183px" },1300);
	$("#blub-blub1").animate({ opacity: 1.0, top: "30px", left:"192px", width:"538px" },1200,ani_bubble_ansiedeln1b);
}
function ani_bubble_ansiedeln1b() {
	var th1=document.getElementById("blub-text1").offsetHeight;
	$("#blub-cover1").css({ "height":th1+"px", "top":"0px" });
	$("#blub-box1").css("visibility","visible");
	$("#blub-blub1").css("display","none");
	$("#blub-pers1").animate({ top:"23px", left:"16px", width:"183px" },1200,ani_bubble_ansiedeln1c(th1));
	$("#blub-talk1").animate({ bottom:"5px", left:"-40px" },900);
//	$("#blub-cover1").animate({ top: th2+"px" },1000,ani_bubble_ansiedeln2);
}
function ani_bubble_ansiedeln1c(th1) {
	setTimeout("ani_bubble_ansiedeln1d("+th1+")",1000);
}
function ani_bubble_ansiedeln1d(th1) {
	$("#blub-cover1").animate({ top: th1+"px" },1200,ani_bubble_ansiedeln1e);
}
function ani_bubble_ansiedeln1e() {
	setTimeout("ani_bubble_ansiedeln2()",1000);
}
function ani_bubble_ansiedeln2() {
//	$("#blub-pers2").animate({ top:"52px", left:"749px", width:"152px" },1300);
	$("#blub-blub2").animate({ opacity: 1.0, top: "145px", left:"313px", width:"430px" },800,ani_bubble_ansiedeln2b);
}
function ani_bubble_ansiedeln2b() {
	var th2=document.getElementById("blub-text2").offsetHeight;
	$("#blub-cover2").css({ "height":th2+"px", "top":"0px" });
	$("#blub-box2").css("visibility","visible");
	$("#blub-blub2").css("display","none");
	$("#blub-pers2").animate({ top:"52px", left:"749px", width:"152px" },1100,ani_bubble_ansiedeln2c(th2));
	$("#blub-talk2").animate({ top:"-14px", left:"430px" },800);
//	$("#blub-cover2").animate({ top: th2+"px" },1800);
}
function ani_bubble_ansiedeln2c(th2) {
	setTimeout("ani_bubble_ansiedeln2d("+th2+")",500);
}
function ani_bubble_ansiedeln2d(th2) {
	$("#blub-cover2").animate({ top: th2+"px" },1600);
}
//---------------------------------------------------------------------------------------------------------------
function ani_bubble_buchfuehren() {
	$("#blub-pers1").animate({ top:"28px", left:"23px", width:"131px" },1300);
	$("#blub-blub1").animate({ opacity: 1.0, top: "28px", left:"155px", width:"538px" },800,ani_bubble_buchfuehren1b);
}
function ani_bubble_buchfuehren1b() {
	var th2=document.getElementById("blub-text1").offsetHeight;
	$("#blub-cover1").css({ "height":th2+"px", "top":"0px" });
	$("#blub-box1").css("visibility","visible");
	$("#blub-blub1").css("display","none");
	$("#blub-talk1").animate({ bottom:"5px", left:"-40px" },800);
	$("#blub-cover1").animate({ top: th2+"px" },1000,ani_bubble_buchfuehren2);
}
function ani_bubble_buchfuehren2() {
	$("#blub-pers2").animate({ top:"63px", left:"759px", width:"139px" },1300);
	$("#blub-blub2").animate({ opacity: 1.0, top: "145px", left:"233px", width:"511px" },800,ani_bubble_buchfuehren2b);
}
function ani_bubble_buchfuehren2b() {
	var th2=document.getElementById("blub-text2").offsetHeight;
	$("#blub-cover2").css({ "height":th2+"px", "top":"0px" });
	$("#blub-box2").css("visibility","visible");
	$("#blub-blub2").css("display","none");
	$("#blub-talk2").animate({ top:"-14px", left:"511px" },800);
	$("#blub-cover2").animate({ top: th2+"px" },1800);
}
//---------------------------------------------------------------------------------------------------------------


