// Version 3.3
var navigationCloseTimeout=300,partnerSlideShowSpeed=1E3,partnerSlideShowTimeout=5E3,partnerSearchItemsPerPage=10,partnerSearchItemList=[],partnerSearchItemCount=0,partnerSearchPage=1,imageBoxFadeInSpeed=500,experienceItemsPerPage=8,navigationCloseTimer=null,experiencePage=1,searchQueryDefault="",recommendNameDefault="",recommendSenderDefault="",recommendReceiverDefault="",recommendMessageDefault="",imageBoxData=[]; $.fn.reorder=function(){function c(){return Math.round(Math.random())-0.5}return $(this).each(function(){var a=$(this),e=a.children(),b=e.length;if(b>1){e.remove();var d=[];for(i=0;i<b;i++)d[d.length]=i;d=d.sort(c);$.each(d,function(f,g){a.append(e.eq(g))})}})}; $(document).ready(function(){tempCSSKlassenListe=new Array("first","second","third","fourth","fifth","sixth");$("#navigationMain > li").each(function(b){var d=this;$(d).addClass(tempCSSKlassenListe[b]);$("li",d).each(function(f){var g=this;$(g).addClass(tempCSSKlassenListe[f]);$("li",g).each(function(k){$(this).addClass(tempCSSKlassenListe[k])})})});$("#navigationMain > li:eq(1) > ul > li:eq(0)").css("width","170px");$("#navigationMain > li:eq(1) > ul > li:eq(0) > ul").css("width","172px");$("#navigationMain > li:eq(1) > ul > li:eq(1)").css("width", "170px");$("#navigationMain > li:eq(1) > ul > li:eq(1) > ul").css("width","172px");$("#navigationMain > li:eq(1) > ul > li:eq(2)").css("width","110px");$("#navigationMain > li:eq(1) > ul > li:eq(2) > ul").css("width","112px");$("#navigationMain > li:eq(3) > ul > li:eq(0)").css("width","237px");$("#navigationMain > li:eq(3) > ul > li:eq(0) > ul").css("width","239px");$("#navigationMain > li:eq(3) > ul > li:eq(1)").css("width","190px");$("#navigationMain > li:eq(3) > ul > li:eq(1) > ul").css("width", "192px");$("#navigationMain > li:eq(3) > ul > li:eq(2)").css("width","185px");$("#navigationMain > li:eq(3) > ul > li:eq(2) > ul").css("width","187px");$("#navigationMain > li:eq(3) > ul > li:eq(3)").css("width","170px");$("#navigationMain > li:eq(3) > ul > li:eq(3) > ul").css("width","172px");$("#navigationMain > li:eq(3) > ul > li:eq(4)").css("width","175px");$("#navigationMain > li:eq(3) > ul > li:eq(4) > ul").css("width","177px");$("#navigationMain ul.second ul ul.third ul li").css("width","257px"); $("#navigationMain > li:eq(2) > ul > li:eq(0)").css("width","210px");$("#navigationMain > li:eq(2) > ul > li:eq(0) > ul").css("width","212px");$("#navigationMain > li:eq(2) > ul > li:eq(1)").css("width","260px");$("#navigationMain > li:eq(2) > ul > li:eq(1) > ul").css("width","262px");$("#navigationMain > li.active > ul > li > a").each(function(){$(this).mouseover(function(){closeMainNavigation();$(this).addClass("hover");$("ul",$(this).parent()).css("display","block")});$(this).mouseout(function(){navigationCloseTimer= window.setTimeout("closeMainNavigation()",navigationCloseTimeout)})});$("#navigationMain > li.active > ul > li > ul > li > a").each(function(){$(this).mouseover(function(){window.clearTimeout(navigationCloseTimer)});$(this).mouseout(function(){navigationCloseTimer=window.setTimeout("closeMainNavigation()",navigationCloseTimeout)})});var c=basename(document.URL);$("a").each(function(){basename(this.href)!=c&&$(this).attr("target","_blank")});$("#exclusivePartners ul").reorder();$("#exclusivePartners ul").innerfade({speed:partnerSlideShowSpeed, timeout:partnerSlideShowTimeout,type:"sequence",containerheight:"83px"});addFormElementHandlers("#searchQuery",searchQueryDefault);$("#recommendLink").fancybox({hideOnContentClick:false,hideOnOverlayClick:false,overlayColor:"#000",padding:0,showCloseButton:false,frameWidth:350,frameHeight:250,callbackOnShow:function(){ie6fancyBoxHack();$(".recommendFormReset").click(function(){$.fn.fancybox.close()});var b=$(".recommendForm input.text, .recommendForm textarea");b.focus(function(){$(this).css("background-color", "");$(this).addClass("highlighted")});b.blur(function(){$(this).removeClass("highlighted")});addFormElementHandlers('.recommendForm:eq(1) input[name="name"]',recommendNameDefault);addFormElementHandlers('.recommendForm:eq(1) input[name="sender"]',recommendSenderDefault);addFormElementHandlers('.recommendForm:eq(1) input[name="receiver"]',recommendReceiverDefault);addFormElementHandlers(".recommendForm:eq(1) textarea",recommendMessageDefault);var d=(new Date).getTime();$(".recommendForm").submit(function(){var f= (new Date).getTime()-d,g=[];g.push("ffot="+f);var k=[];$('input, textarea, button[type="submit"]',this).each(function(j,h){j=$(h);k[j.attr("name")]=j.val()});for(var l in k)g.push(l+"="+k[l]);$.ajax({url:basename(document.URL)+"recommendForm.php",data:g.join("&"),dataType:"xml",success:function(j){var h=[],o=$("error",j);if(o.length>0){h.push("Bei der Verarbeitung traten folgende Fehler auf:");h.push("");$(o).each(function(){h.push("- "+$(this).text())})}else{j=$("field-validation field",j);if(j.length> 0){h.push("Bitte \u00dcberpr\u00fcfen Sie die Eingabe in den folgenden Feldern:");h.push("");$(j).each(function(){var m=$(this),n=$('.recommendForm:eq(1) label[for="'+m.attr("name")+'"]').html();$('.recommendForm:eq(1) input[name="'+m.attr("name")+'"], .recommendForm:eq(1) textarea[name="'+m.attr("name")+'"]').css("background-color","#ffc7c8");var p=n.lastIndexOf("*");if(p!=-1)n=n.substring(0,p);h.push("- "+n+": "+m.text())})}else{h.push("Ihre Weiterempfehlung wurde erfolgreich per E-Mail versendet."); $.fn.fancybox.close()}}alert(h.join("\n"))}});return false})}});$(".boxVideo a img").parent().fancybox({hideOnContentClick:false,hideOnOverlayClick:false,overlayColor:"#000",padding:10,showCloseButton:true,frameWidth:640,frameHeight:360,callbackOnShow:ie6fancyBoxHack});$(".boxImages").each(function(b,d){$("img",d).each(function(k,l){k==0?$(l).show():$(l).hide()});imageBoxData[b]=[];imageBoxData[b].currentImage=0;imageBoxData[b].imageCount=$("img",d).length;if(imageBoxData[b].imageCount!=0){var f= document.createElement("img");f.src="/p/images-layout/ex-left.gif";f.className="ibLeft";f.onclick=function(){imageBoxData[b].currentImage--;updateImageBox(b)};var g=document.createElement("img");g.src="/p/images-layout/ex-right.gif";g.className="ibRight";g.onclick=function(){imageBoxData[b].currentImage++;updateImageBox(b)};$(d).prepend(f,g);updateImageBox(b)}});$("#experience .bar a").click(function(){$("#experience").css("background-image",'url("'+this.href+'")');$(".target").html($(".source",$(this).parent()).html());return false}); var a=$("#experience .bar a:eq(0)");$("#experience").css("background-image",'url("'+a.attr("href")+'")');$(".target").html($(".source",a.parent()).html());a=document.createElement("img");a.src="/p/images-layout/ex-left.gif";a.className="exLeft";a.onclick=function(){experiencePage--;updateExperiencePaging()};var e=document.createElement("img");e.src="/p/images-layout/ex-right.gif";e.className="exRight";e.onclick=function(){experiencePage++;updateExperiencePaging()};$("#experience").append(a,e);window.setTimeout("updateExperiencePaging()", 1);$(".teaserBig li").mouseover(function(){var b=$(this);if(!b.hasClass("active")){$(".teaserBig li").removeClass("active");b.addClass("active");var d=$(".inTeaserBox");d.empty();$("h3",b).clone().appendTo(d);$("p",b).clone().appendTo(d)}});a=$(".inTeaserBox");a.empty();e=$(".teaserBig li.active");$("h3",e).clone().appendTo(a);$("p",e).clone().appendTo(a);$.browser.msie&&$(window).resize(function(){$("#navigationMain, .innerfade, .boxImages img.ibLeft:visible, .boxImages img.ibRight:visible, #experience .exLeft:visible, #experience .exRight:visible").hide().show()}); $(document).keypress(function(b){b.which==176&&$("#navigationMain ul li").toggle()})});function addFormElementHandlers(c,a){c=$(c);a=c.val();c.focus(function(){if(this.value==a)this.value=""});c.blur(function(){if($.trim(this.value).length==0)this.value=a})}function ie6fancyBoxHack(){if($.browser.msie&&$.browser.version=="6.0")$("div#fancy_overlay").css("width",window.innerWidth||self.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body.clientWidth)} function closeMainNavigation(){window.clearTimeout(navigationCloseTimer);$("#navigationMain > li > ul > li > ul").css("display","none");$("#navigationMain > li > ul > li > a").removeClass("hover")} function updateExperiencePaging(){var c=true,a=$("#experience .bar li");a.removeClass("first");a.each(function(d,f){if(Math.ceil((d+1)/experienceItemsPerPage)==experiencePage){if(c){c=false;$(f).addClass("first")}$(f).show()}else $(f).hide()});a=$("#experience .exLeft");var e=$("#experience .exRight");a.show();e.css("left","679px");e.show();var b=Math.ceil($("#experience .bar a").length/experienceItemsPerPage);if(b<=1||experiencePage==b)e.hide();if(experiencePage==1){a.hide();e.css("left","698px")}} function updateImageBox(c){var a=$(".boxImages:eq("+c+") img:not(.ibLeft, .ibRight)");a.hide();a.each(function(b,d){if(b==imageBoxData[c].currentImage){$(d).fadeIn(imageBoxFadeInSpeed);$(".boxImages:eq("+c+") .targetText").html($(".boxImages:eq("+c+") .srcText:eq("+b+")").html())}});a=$(".boxImages:eq("+c+") img.ibLeft");var e=$(".boxImages:eq("+c+") img.ibRight");a.show();e.show();if(imageBoxData[c].imageCount<=1||imageBoxData[c].imageCount==imageBoxData[c].currentImage+1)e.hide();imageBoxData[c].currentImage== 0&&a.hide()}function cleanStr(c){c=c.replace(/\W/g,"-");return c.replace(/-+/g,"-")}function basename(c){var a=c.lastIndexOf("/");if(a<6)a=c.length-1;return c.substring(0,a+1)} function updatePartnerSearchPaging(){$(".partner").removeClass("leftCol").removeClass("rightCol").hide();$(".paging + p.info").remove();if(partnerSearchItemCount==0){$(".paging").hide();$(".paging").after('<p class="info" style="text-align:center;"><i>Keine Eintr\u00e4ge gefunden !</i></p>')}else{$(".paging ul").empty();for(var c=Math.ceil(partnerSearchItemCount/partnerSearchItemsPerPage),a=1;a<=c;a++)$(".paging ul").append("<li"+(a==partnerSearchPage?' class="active"':"")+'><a href="#">'+a+"</a></li>"); $(".paging ul li a").each(function(b,d){$(this).click(function(){partnerSearchPage=b+1;updatePartnerSearchPaging();return false})});$(".paging ul li").css("margin-left","2px");$(".paging").show();var e=0;$(partnerSearchItemList).each(function(b,d){if(Math.floor(b/10)+1==partnerSearchPage)$(d).addClass(e++%2==0?"leftCol":"rightCol").fadeIn()})}};