function hideCursor(){$("#cursor").hide();cursorVisibility="false"}function showCursor(a){clearTimeout(hideTheCursor);if(cursorVisibility!=a){$("#cursor").css("cursor","url("+imageUrl+a+".png), url("+imageUrl+a+".cur), auto").show();cursorVisibility=a}hideTheCursor=setTimeout("hideCursor()",150)}function startStopAni(){$("div.foto").css("cursor","url("+imageUrl+"pause.png), url("+imageUrl+"pause.cur), auto");$("div.righttext").css("cursor","url("+imageUrl+"pause.png), url("+imageUrl+"pause.cur), auto");$("div.foto").mouseenter(function(){raumAniEnter=true;clearTimeout(raumAnimation)});$("div.foto").mouseleave(function(){if(raumAniEnter==true){raumAnimation=setTimeout("showRaumBeispiel()",2e3);raumAniEnter=false}});$("div.righttext").mouseenter(function(){raumAniEnter=true;clearTimeout(raumAnimation)});$("div.righttext").mouseleave(function(){if(raumAniEnter==true){raumAnimation=setTimeout("showRaumBeispiel()",2e3);raumAniEnter=false}})}function checkJSVelocity(){beginning=new Date;for(i=1;i<50;i++){x=$("#topnavi").width()}ending=new Date;duration=(ending-beginning)/4;if(duration<1)duration=1;if(duration>5)duration=5;return Math.round(duration)}function scrollInit(){scrollAktiv=true;mousewheelAktiv=true;if(scrollPos==0)beginning=new Date;$(".helprows").css("left",-help+"px");$(".helprows").css("left",scrollPos-help+"px");$(".bothrows").css("left",scrollPos+"px");if(parseInt($(".bothrows").css("left"))<84){scrollPos++;initScroll=setTimeout("scrollInit()",10)}else{clearTimeout(initScroll);ending=new Date;velocity=Math.round(84e3/(ending-beginning));vadj=0;if(velocity>88){vadj=10*(velocity-88)}distance=120/(velocity+vadj);scrollAktiv=false;mousewheelAktiv=false}}function scrollLeft(){if(scrollPos>0){help=nfirstrow*168}if(scrollPos>nfirstrow*168){scrollPos=0}$(".bothrows").css("left",Math.round(scrollPos)+"px");$(".helprows").css("left",Math.round(scrollPos-help)+"px");if(speed<30)showCursor("left");scrollPos=scrollPos+distance;clearTimeout(scrollit);scrollit=setTimeout("scrollLeft()",speed);if(speed<15){if(scrollAktiv==false)$(".mraster a span").animate({opacity:0},0);scrollAktiv=true}else{scrollAktiv=false}}function scrollRight(){if(scrollPos<-maxScroll){help=-nfirstrow*168}if(scrollPos<-nfirstrow*168-maxScroll){scrollPos=-maxScroll}$(".bothrows").css("left",Math.round(scrollPos)+"px");$(".helprows").css("left",Math.round(scrollPos)-help+"px");if(speed<30)showCursor("right");scrollPos=scrollPos-distance;clearTimeout(scrollit);scrollit=setTimeout("scrollRight()",speed);if(speed<15){if(scrollAktiv==false)$(".mraster a span").animate({opacity:0},0);scrollAktiv=true}else{scrollAktiv=false}}function transformRasterSpeed(a){if(a>100)a=100;if(a<50)a=50;a=Math.round((1e4-a*a)/100)+10;return a}function transformMWSpeed(a){if(a>.3)a=.3;return Math.round(200-a*666)}function transformSpeed(a){if(a>80)a=80;return Math.round((6400-a*a)/64)}function scrollUp(){$("#scrollContent").css("top",scrollPos+"px");if(scrollPos<0){scrollPos=scrollPos+distance;clearTimeout(scrollit);scrollit=setTimeout("scrollUp()",speed)}}function scrollDown(){$("#scrollContent").css("top",scrollPos+"px");if(scrollPos>-maxScroll){scrollPos=scrollPos-distance;clearTimeout(scrollit);scrollit=setTimeout("scrollDown()",speed)}}function hideKulturText(){$("#fototextbg").fadeTo(300,0);$(".fototext").fadeOut(300)}function showKultur(a){if(kulturAlt==a)return;for(i=1;i<7;i++){if(i!=a){$("a#kulturnavi"+i).animate({backgroundColor:"#676767"},200);$("#kulturtext"+i).clearQueue().fadeOut(600).hide()}}$("a#kulturnavi"+a).animate({backgroundColor:"#00a788"},1e3);$("#kulturtext"+a).fadeIn(1e3);$("#kulturfoto"+a).clearQueue().hide();$("#kulturfoto"+a).css("z-index",zz);$("#kulturfoto"+a).fadeIn(1e3);if(over==false)kulturAnimation=setTimeout("showKultur(kulturAktuell)",9e3);kulturAktuell++;if(kulturAktuell>6)kulturAktuell=1;zz=zz+1;if(zz>maxzi){zz=5;for(i=1;i<7;i++){if(i!=a){$("#kulturfoto"+i).css("z-index",2)}}$("#kulturfoto"+kulturAlt).css("z-index",3);$("#kulturfoto"+a).css("z-index",4)}kulturAlt=a}function showFunktion(){if(funktionAlt==funktionAktuell)return;if(funktionAktuell>9)funktionAktuell=1;if(over==false){$("a.f0"+funktionAlt).animate({backgroundColor:"#00a788"},200);$("a.f0"+funktionAktuell).animate({backgroundColor:"#83c8b3"},1e3)}$("#fototextbg").fadeTo(300,0);$("#funktiontext"+funktionAlt).clearQueue().fadeOut(300).hide();$("#fototextbg").clearQueue().delay(800).fadeTo(1200,.82);$("#funktiontext"+funktionAktuell).clearQueue().delay(800).fadeIn(1200);$("#funktion"+funktionAktuell).hide();$("#funktion"+funktionAktuell).css("z-index",zz);$("#funktion"+funktionAktuell).fadeIn(1e3);if(over==false)funktionAnimation=setTimeout("funktionAktuell++;showFunktion()",4e3);zz=zz+1;if(zz>maxzi){zz=5;for(i=1;i<10;i++){if(i!=funktionAktuell){$("#funktion"+i).css("z-index",2)}}$("#funktion"+funktionAlt).css("z-index",3);$("#funktion"+funktionAktuell).css("z-index",4)}funktionAlt=funktionAktuell}function hideMotivPreview(a){$("#tr"+a).css("background-color","#fff");$("#preview"+a).fadeOut(600)}function showMotivPreview(a){$("#tr"+a).css("background-color","#c4ebe3");$("#preview"+a).hide();$("#preview"+a).css("z-index",5);$("#preview"+a).stop(true,true).fadeIn(600)}function showFormat(){if(formatAktuell>11)formatAktuell=1;if(formatAlt==formatAktuell)return;if(over==false){$("a#o"+formatAlt).animate({backgroundColor:"#e5f6f3"},200);$("a#o"+formatAktuell).animate({backgroundColor:"#b2e4db"},1e3)}$("#format"+formatAktuell).hide();$("#format"+formatAktuell).css("z-index",zz);$("#format"+formatAktuell).fadeIn(1e3);if(over==false)formatAnimation=setTimeout("formatAktuell++;showFormat()",4e3);zz=zz+1;if(zz>maxzi){zz=5;for(i=1;i<12;i++){if(i!=formatAktuell){$("#format"+i).css("z-index",2)}}$("#format"+formatAlt).css("z-index",3);$("#format"+formatAktuell).css("z-index",4)}formatAlt=formatAktuell}function showRaumBeispiel(){x=raumAktuell;if($("#motive"+x).height()<1)return;$("#ti"+raumAlt).fadeOut(200);$("#number").html(raumAktuell+" / "+alle);$("#rt"+raumAlt).clearQueue().fadeOut(300).hide();$("#motive"+x).hide();$("#motive"+x).css("z-index",zz);$("#motive"+x).fadeIn(1e3);$("#rt"+x).clearQueue().delay(1e3).fadeIn(1e3);$("#ti"+raumAktuell).fadeIn(200);raumAnimation=setTimeout("showRaumBeispiel(raumAktuell)",4e3);if($("#motive"+(raumAktuell+1)).attr("class")=="foto"){raumAktuell++}else{raumMax=raumAktuell;raumAktuell=1}zz=zz+1;if(zz>maxzi){zz=5;for(i=1;i<raumMax+1;i++){if(i!=x){$("#motive"+i).css("z-index",2)}}$("#motive"+raumAlt).css("z-index",3);$("#motive"+x).css("z-index",4)}raumAlt=x}function showMotive(){if(motiveAlt==motiveAktuell)return;if(motiveAktuell>4)motiveAktuell=1;if(over==false){$("a.m0"+motiveAlt).animate({backgroundColor:"#00a788"},200);$("a.m0"+motiveAktuell).animate({backgroundColor:"#83c8b3"},1e3)}$("#motive"+motiveAktuell).hide();$("#motive"+motiveAktuell).css("z-index",zz);$("#motive"+motiveAktuell).fadeIn(1e3);if(over==false)motiveAnimation=setTimeout("motiveAktuell++;showMotive()",4e3);zz=zz+1;if(zz>maxzi){zz=5;for(i=1;i<5;i++){if(i!=motiveAktuell){$("#motive"+i).css("z-index",2)}}$("#motive"+motiveAlt).css("z-index",3);$("#motive"+motiveAktuell).css("z-index",4)}motiveAlt=motiveAktuell}function setAktiv(a){aktiv=a;showSubnavi(a)}function showSubnavi(a){if(a==0){if((subaktiv>0)*(subaktiv!=aktiv)){$("#subnavi"+subaktiv).fadeOut(200);subaktiv=0}}else{$("#subnavi"+a).fadeIn(200);if((subaktiv>0)*(subaktiv!=a)){$("#subnavi"+subaktiv).fadeOut(200)}subaktiv=a}}function out(a){url=imageUrl+folder+"_"+a+".jpg";$("#t"+a).attr("src",url)}function over(a){url=imageUrl+folder+"_"+a+".gif";$("#t"+a).attr("src",url)}function nix(a){if(a.blur)a.blur()}imageUrl="/dateien/images/";var subaktiv=0;var aktiv=0;var showAktiv;var scrollAktiv;var alle;var nfirstrow;var help;var distance;var x1,checkVel;$(document).ready(function(){$("#topnavi").mouseleave(function(){showAktiv=setTimeout("showSubnavi(aktiv)",600)});$("#topnavi").mouseenter(function(){clearTimeout(showAktiv)});for(i=0;i<5;i++){$("#subnavi"+i).mouseleave(function(){showAktiv=setTimeout("showSubnavi(aktiv)",600)});$("#subnavi"+i).mouseenter(function(){clearTimeout(showAktiv)})}});var over=false;var formatAktiv="";var formate=["bd","bigt","bq","bt","hd","hq","ht","q","s","sd","six"];$(window).load(function(){pagetype=$("body").attr("class");if(pagetype=="raster"){nfirstrow=$(".firstrow").find("a").length;help=nfirstrow*168;nsecondrow=$(".secondrow").find("a").length;maxScroll=nfirstrow*168-$(".mraster").width()-16;$(".mraster").append("<div class='helprows'>"+$(".bothrows").html()+"</div>");$(".mraster a span").animate({opacity:0},0).css("display","block");$(".firstrow").css("width",nfirstrow*168);$(".secondrow").css("width",nsecondrow*168);$(window).unload(function(){window.name=scrollPos+"|scrollPos|"+distance+"|"+window.location.href});if(window.name.indexOf("scrollPos")>-1){sp=window.name.split("|");if(sp[3]==window.location.href){scrollPos=parseFloat(sp[0]);distance=parseFloat(sp[2]);if(scrollPos<-maxScroll){help=-nfirstrow*168}if(scrollPos<-nfirstrow*168-maxScroll){scrollPos=-maxScroll}if(scrollPos>0){help=nfirstrow*168}if(scrollPos>nfirstrow*168){scrollPos=0}$(".helprows").css("left",scrollPos-help+"px");$(".bothrows").css("left",scrollPos+"px");scrollAktiv=false;mousewheelAktiv=false}else{scrollInit()}}else{scrollInit()}$(".bothrows,.helprows").find("a").mouseenter(function(){if(scrollAktiv==false){$(this).find("span").animate({opacity:.9},300)}});$(".bothrows,.helprows").find("a").mouseleave(function(){if(scrollAktiv==false){$(this).find("span").animate({opacity:0},300)}});$(".mraster").bind("mousewheel",function(a,b,c,d){if(b>0){speed=transformMWSpeed(b);if(past!="left"){scrollLeft();past="left";mousewheelAktiv=true;clearTimeout(stopIt);stopIt=setTimeout("clearTimeout(scrollit);past='';mousewheelAktiv=false",500)}}if(b<0){speed=transformMWSpeed(Math.abs(b));if(past!="right"){scrollRight();past="right";mousewheelAktiv=true;clearTimeout(stopIt);stopIt=setTimeout("clearTimeout(scrollit);past='';mousewheelAktiv=false",500)}}});$("html").mousemove(function(a){if(mousewheelAktiv==false){w=$(window).width();x=Math.round(a.pageX-w/2);if((a.pageY>155)*(a.pageY<508)){if((x>-450)*(x<-250)){speed=transformRasterSpeed(Math.abs(x)-250);if(past!="left"){scrollLeft();past="left"}}else if((x>250)*(x<450)){speed=transformRasterSpeed(Math.abs(x)-250);if(past!="right"){scrollRight();past="right"}}else{clearTimeout(scrollit);past="";scrollAktiv=false}}else{clearTimeout(scrollit);past="";scrollAktiv=false}}})}if(pagetype=="liste"){$("#scrollContent div").each(function(){href=$(this).find("a").attr("href");$(this).attr("onclick","location.href='"+href+"'");$(this).mouseenter(function(){showMotivPreview($(this).attr("id").substr(2,4))});$(this).mouseleave(function(){hideMotivPreview($(this).attr("id").substr(2,4))});$(this).click(function(){mousewheelAktiv=true;clearTimeout(scrollit)});$(window).unload(function(){window.name=scrollPos+"|scrollPos|"+distance+"|"+window.location.href});if(window.name.indexOf("scrollPos")>-1){sp=window.name.split("|");if(sp[3]==window.location.href){scrollPos=parseFloat(sp[0]);distance=parseFloat(sp[2]);if(scrollPos>-maxScroll)scrollPos=scrollPos-distance;if(scrollPos<0)scrollPos=scrollPos+distance;scrollDown()}else{distance=checkJSVelocity()}}else{distance=checkJSVelocity()}});$("#scrollContent").bind("mousewheel",function(a,b,c,d){if(b>0){speed=transformMWSpeed(b);if(past!="up"){scrollUp();past="up";mousewheelAktiv=true;clearTimeout(stopIt);stopIt=setTimeout("clearTimeout(scrollit);past='';mousewheelAktiv=false",500)}}if(b<0){speed=transformMWSpeed(Math.abs(b));if(past!="down"){scrollDown();past="down";mousewheelAktiv=true;clearTimeout(stopIt);stopIt=setTimeout("clearTimeout(scrollit);past='';mousewheelAktiv=false",500)}}});maxScroll=$("#scrollContent").height()-$("#motivFrame").height();$("html").mousemove(function(a){if(mousewheelAktiv==false){if((a.pageX>450)*(a.pageX<1140)){if((a.pageY>170)*(a.pageY<320)){speed=transformSpeed(150-(a.pageY-170));if(past!="up"){scrollUp();past="up"}}else if((a.pageY>370)*(a.pageY<520)){speed=transformSpeed(a.pageY-370);if(past!="down"){scrollDown();past="down"}}else{clearTimeout(scrollit);past=""}}else{clearTimeout(scrollit);past=""}}})}if(pagetype=="raumkategorie"){$("#raumauswahl a").each(function(){$(this).mouseenter(function(){$(this).find("span").fadeOut(600)});$(this).mouseleave(function(){$(this).find("span").fadeIn(400)})})}if(pagetype=="formatbeispiele"){formatAlt=1;formatAnimation=setTimeout("formatAlt=formatAktuell;formatAktuell++;showFormat()",3e3);$("#formatauswahl a").mouseleave(function(){x=parseInt($(this).attr("id").substr(1,3));if(x!=formatAktuell){$(this).animate({backgroundColor:"#e5f6f3"},200)}over=false;formatAnimation=setTimeout("formatAlt=formatAktuell;formatAktuell++;showFormat()",5e3)});$("#formatauswahl a").mouseenter(function(){clearTimeout(formatAnimation);x=parseInt($(this).attr("id").substr(1,3));if(x!=formatAktuell){$("a#o"+formatAktuell).animate({backgroundColor:"#e5f6f3"},200);$(this).animate({backgroundColor:"#b2e4db"},200)}over=true;if(x!=formatAktuell){formatAktuell=x;showFormat()}formatAktuell=x})}if(pagetype=="funktiondetail"){alle=$(document).find("div.foto").length;$("#number").html("1 / "+alle);raumAnimation=setTimeout("showRaumBeispiel()",4e3);$("#funktionswahls a").each(function(){if($(this).attr("class")!="tooltip aktiv"){$(this).mouseenter(function(){$(this).animate({backgroundColor:"#00a788"},200)});$(this).mouseleave(function(){$(this).animate({backgroundColor:"#b2e4db"},200)})}});startStopAni()}if(pagetype=="raumkategoriedetail"){alle=$(document).find("div.foto").length;$("#number").html("1 / "+alle);raumAnimation=setTimeout("showRaumBeispiel()",4e3);$("#raumauswahls a").each(function(){if($(this).attr("class")!="tooltip aktiv"){$(this).mouseenter(function(){$(this).animate({backgroundColor:"#00a788"},200)});$(this).mouseleave(function(){$(this).animate({backgroundColor:"#b2e4db"},200)})}});startStopAni()}if(pagetype=="raumbeispiele"){$(".detailfoto img").delay(1200).fadeIn(1200);alle=$(document).find("div.foto").length;$("#number").html("1 / "+alle);raumAnimation=setTimeout("showRaumBeispiel()",4e3);startStopAni();if(window.name.indexOf("scrollPos")>-1){sp=window.name.split("|");$("#leftback").find("a").attr("href",sp[3])}}if(pagetype=="kultur"){setTimeout("$('#kulturtext1').fadeIn(1000);showKultur(2)",4e3);for(i=1;i<7;i++){$("a#kulturnavi"+i).mouseleave(function(){over=false;kulturAnimation=setTimeout("showKultur(kulturAktuell)",6e3)})}$("a#kulturnavi1").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=1;over=true;showKultur(kulturAktuell)});$("a#kulturnavi2").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=2;over=true;showKultur(kulturAktuell)});$("a#kulturnavi3").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=3;over=true;showKultur(kulturAktuell)});$("a#kulturnavi4").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=4;over=true;showKultur(kulturAktuell)});$("a#kulturnavi5").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=5;over=true;showKultur(kulturAktuell)});$("a#kulturnavi6").mouseenter(function(){clearTimeout(kulturAnimation);kulturAktuell=6;over=true;showKultur(kulturAktuell)})}if(pagetype=="funktion"){$("#fototextbg").delay(800).fadeTo(1200,.82);$("#funktiontext1").delay(800).fadeIn(1200);funktionAlt=1;funktionAnimation=setTimeout("funktionAlt=funktionAktuell;funktionAktuell++;showFunktion()",6e3);$("#funktionswahl a").mouseleave(function(){x=parseInt($(this).attr("class").substr(2,3));if(x!=funktionAktuell){$(this).animate({backgroundColor:"#00a788"},200)}over=false;funktionAnimation=setTimeout("funktionAlt=funktionAktuell;funktionAktuell++;showFunktion()",5e3)});$("#funktionswahl a").mouseenter(function(){clearTimeout(funktionAnimation);x=parseInt($(this).attr("class").substr(2,3));if(x!=funktionAktuell){$("a.f0"+funktionAktuell).animate({backgroundColor:"#00a788"},200);$(this).animate({backgroundColor:"#83c8b3"},200)}over=true;if(x!=funktionAktuell){funktionAktuell=x;showFunktion()}funktionAktuell=x})}if(pagetype=="motive"){motiveAnimation=setTimeout("motiveAlt=motiveAktuell;motiveAktuell++;showMotive()",4e3);$("#motivnavi a").mouseleave(function(){x=parseInt($(this).attr("class").substr(2,3));if(x!=motiveAktuell){$(this).animate({backgroundColor:"#00a788"},200)}over=false;motiveAnimation=setTimeout("motiveAlt=motiveAktuell;motiveAktuell++;showMotive()",5e3)});$("#motivnavi a").mouseenter(function(){clearTimeout(motiveAnimation);x=parseInt($(this).attr("class").substr(2,3));if(x!=motiveAktuell){$("a.m0"+motiveAktuell).animate({backgroundColor:"#00a788"},200);$(this).animate({backgroundColor:"#83c8b3"},200)}over=true;if(x!=motiveAktuell){motiveAktuell=x;showMotive()}motiveAktuell=x})}});var motiveAnimation;var motiveAktuell=1;var motiveAlt=0;var zz=2;var maxzi=16777270;var raumAnimation;var raumAktuell=2;var raumAlt=1;var raumMax=1;var formatAnimation;var formatAktuell=1;var formatAlt=0;var zz=2;var maxzi=16777270;var funktionAnimation;var funktionAktuell=1;var funktionAlt=0;var zz=2;var maxzi=16777270;var kulturAnimation;var kulturAktuell=2;var kulturAlt=1;var zz=4;var maxzi=16777270;this.tooltip=function(){xOffset=5;yOffset=10;$("a.tooltip").hover(function(a){this.t=this.title;this.title="";$("body").append("<p id='tooltip'>"+this.t+"</p>");$("#tooltip").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px").fadeIn(300)},function(){this.title=this.t;$("#tooltip").remove()});$("a.tooltip").mousemove(function(a){$("#tooltip").css("top",a.pageY-xOffset+"px").css("left",a.pageX+yOffset+"px")})};$(document).ready(function(){tooltip()});var maxScroll;var scrollPos=0;var speed;var scrollit;var past="";var distance=1;var stopIt;var mousewheelAktiv=false;var beginning;var ending;var initScroll;var velocity;var raumAniEnter=false;var hideTheCursor;var cursorVisibility="false"
