var opacitiyLayerDetails=0.8;var opacitiyLayerHoehe=50;var opacitiyLayerGeschwindigkeit=1500;var opacitiyLayerAuschnitt=0.6;var geschwindigkeitBox=15000;var bg1="#990134";var bg2="#999";var bg3="#5F8463";var bg4="#7C415D";$(document).ready(function(){$("a.bgChoose").click(function(){$("body").removeClass();idIs=$(this).attr("id");$("body").addClass(idIs);if(idIs=="bg2"){edit_link_hover(bg2)}else{if(idIs=="bg3"){edit_link_hover(bg3)}else{if(idIs=="bg4"){edit_link_hover(bg4)}else{edit_link_hover(bg1)}}}$.cookie("bg",idIs,{expires:25,path:"/"});return false});$("a.thickbox").click(function(){$("a.bildtool").each(function(){oldhref=$(this).attr("href");pfad=oldhref.split(domainUrl).join("");pfad=pfad.substr(0,pfad.length-1);file=pfad.split("/");$(this).attr("href",domainUrl+"/pics/"+file[1]+"/original/"+file[2]+".jpg")})});set_detail_pics();detail_get_position();vorschau_box();SetupTooltips();sophies_garten();hinterstuebchen()});function hinterstuebchen(){$("a#bessling").toggle(function(){parentIst=$(this).parent();parentIst.next().show("slow");console.log(parentIst)},function(){parentIst=$(this).parent();parentIst.next().hide()})}function strstr(B,C,A){var D=0;B+="";D=B.indexOf(C);if(D==-1){return false}else{if(A){return B.substr(0,D)}else{return B.slice(D)}}}function sophies_garten(){$("div#sopg h4 a").toggle(function(){h4Ist=$(this).parent();h4Ist.next().show()},function(){h4Ist=$(this).parent();h4Ist.next().hide()});$("a.sg_grund").toggle(function(){bilderReihe=this.getAttribute("href");if($.browser.msie){bilderReihe=strstr(bilderReihe,"#")}bilderReihe=bilderReihe.substr(1);h4Ist=$("#"+bilderReihe).parent();h4Ist.next().show();window.location.href="#"+bilderReihe},function(){bilderReihe=this.getAttribute("href");bilderReihe=bilderReihe.substr(1);h4Ist=$("#"+bilderReihe).parent();h4Ist.next().hide()})}ShowTooltip=function(A){var B=$('span[rel="'+this.getAttribute("id")+'"]');if(B.attr("class")!="show-tooltip-text"){return false}$("#mouseOver").append(B);$(B).show();$("#mouseOver").fadeIn().css("top",A.pageY+20).css("left",A.pageX+10);return false};HideTooltip=function(A){var B=$('span[rel="'+this.getAttribute("id")+'"]');if(B.attr("class")!="show-tooltip-text"){return false}B.fadeOut()};SetupTooltips=function(){$("body").append('<div id="mouseOver"></div>');$("a.uebersicht").each(function(){$(this).attr("title","");$(this).next().removeClass("uebersichtBild");$("body").append($("<span/>").attr("class","show-tooltip-text").attr("rel",this.getAttribute("id")).html($(this).next())).attr("title","")}).hover(ShowTooltip,HideTooltip)};function edit_link_hover(A){$("a").hover(function(){$(this).css({color:A})},function(){$(this).css({color:"#000000"})});$("a.aktiv").css({color:A})}function set_detail_pics(){$("div#detailAnsicht h3 a").toggle(function(){if($.browser.msie){$("div#detailAnsicht div").show();$("div#detailAnsicht div ul").show()}else{$("div#detailAnsicht div").slideDown()}},function(){if($.browser.msie){$("div#detailAnsicht div ul").hide()}$("div#detailAnsicht div").slideUp()})}function detail_get_position(){$("dt#mb ul li").hover(function(){hhref=this.childNodes[0].getAttribute("href");position=$(this).attr("rel");if(position!=undefined){posSplit=position.split(";");posLeft=posSplit[0];posTop=posSplit[1];height=posSplit[3];width=posSplit[2];$("dt#mb").append('<div id="detailsHover" style="left:'+posLeft+"px;top:"+posTop+"px;width:"+height+"px;height:"+width+'px;border:3px solid black;"></div>');$("div#detailsHover").animate({opacity:opacitiyLayerAuschnitt},1)}},function(){$("div#detailsHover").remove();$("span.overkleinDetail").remove()})}function vorschau_box(){breiteIst=$("div#vorschauBox ul").width();neueBreite=breiteIst-550;if(neueBreite<500){geschwindigkeitBox=4000}$("a#next").hover(function(){$("div#vorschauBox ul").animate({left:"-"+neueBreite+"px"},geschwindigkeitBox)},function(){$("div#vorschauBox ul").stop()});$("a#back").hover(function(){$("div#vorschauBox ul").animate({left:"0"},geschwindigkeitBox)},function(){$("div#vorschauBox ul").stop()});$("a#next").click(function(){$("div#vorschauBox ul").stop();leftps=$("div#vorschauBox ul").position();nlpd=leftps.left-550;neueBreitess=neueBreite*-1;if(nlpd<neueBreitess){nlpd=neueBreitess}$("div#vorschauBox ul").animate({left:nlpd+"px"},1000);return false});$("a#back").click(function(){$("div#vorschauBox ul").stop();leftps=$("div#vorschauBox ul").position();npl=leftps.left+550;if(npl>0){npl=0}$("div#vorschauBox ul").animate({left:npl+"px"},1000);return false})}jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};