(function(aM){function aB(a,c){c=c==="x"?aF.width():aF.height();return typeof a==="string"?Math.round(a.match(/%/)?c/100*parseInt(a,10):parseInt(a,10)):a}function ag(a){a=aM.isFunction(a)?a.call(aJ):a;return aN.photo||a.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function d(){for(var a in aN){if(aM.isFunction(aN[a])&&a.substring(0,2)!=="on"){aN[a]=aN[a].call(aJ)}}aN.rel=aN.rel||aJ.rel;aN.href=aN.href||aJ.href;aN.title=aN.title||aJ.title}function b(a){aJ=a;aN=aM(aJ).data(aC);d();if(aN.rel&&aN.rel!=="nofollow"){aK=aM(".cboxElement").filter(function(){return(aM(this).data(aC).rel||this.rel)===aN.rel});aI=aK.index(aJ);if(aI<0){aK=aK.add(aJ);aI=aK.length-1}}else{aK=aM(aJ);aI=0}if(!ap){ao=ap=aE;af=aJ;af.blur();aM(document).bind("keydown.cbox_close",function(c){if(c.keyCode===27){c.preventDefault();aL.close()}}).bind("keydown.cbox_arrows",function(c){if(aK.length>1){if(c.keyCode===37){c.preventDefault();an.click()}else{if(c.keyCode===39){c.preventDefault();am.click()}}}});aN.overlayClose&&aA.css({cursor:"pointer"}).one("click",aL.close);aM.event.trigger(aq);aN.onOpen&&aN.onOpen.call(aJ);aA.css({opacity:aN.opacity}).show();aN.w=aB(aN.initialWidth,"x");aN.h=aB(aN.initialHeight,"y");aL.position(0);ae&&aF.bind("resize.cboxie6 scroll.cboxie6",function(){aA.css({width:aF.width(),height:aF.height(),top:aF.scrollTop(),left:aF.scrollLeft()})}).trigger("scroll.cboxie6")}ad.add(an).add(am).add(az).add(ac).hide();ab.html(aN.close).show();aL.slideshow();aL.load()}var aC="colorbox",al="hover",aE=true,aL,av=aM.browser.msie&&!aM.support.opacity,ae=av&&aM.browser.version<7,aq="cbox_open",ak="cbox_load",L="cbox_complete",G="resize.cbox_resize",aA,aH,ay,aD,A,o,h,f,aK,aF,aG,aj,ai,ah,ac,ad,az,am,an,ab,au,at,ax,aw,aJ,af,aI,aN,ap,ao,ar={transition:"elastic",speed:350,width:false,height:false,innerWidth:false,innerHeight:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:aE,scrolling:aE,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:aE,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:aE,slideshow:false,slideshowAuto:aE,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false};aL=aM.fn.colorbox=function(a,e){var c=this;if(!c.length){if(c.selector===""){c=aM("<a/>");a.open=aE}else{return this}}c.each(function(){var g=aM.extend({},aM(this).data(aC)?aM(this).data(aC):ar,a);aM(this).data(aC,g).addClass("cboxElement");if(e){aM(this).data(aC).onComplete=e}});a&&a.open&&b(c);return this};aL.init=function(){function a(c){return aM('<div id="cbox'+c+'"/>')}aF=aM(window);aH=aM('<div id="colorbox"/>');aA=a("Overlay").hide();ay=a("Wrapper");aD=a("Content").append(aG=a("LoadedContent").css({width:0,height:0}),ai=a("LoadingOverlay"),ah=a("LoadingGraphic"),ac=a("Title"),ad=a("Current"),az=a("Slideshow"),am=a("Next"),an=a("Previous"),ab=a("Close"));ay.append(aM("<div/>").append(a("TopLeft"),A=a("TopCenter"),a("TopRight")),aM("<div/>").append(o=a("MiddleLeft"),aD,h=a("MiddleRight")),aM("<div/>").append(a("BottomLeft"),f=a("BottomCenter"),a("BottomRight"))).children().children().css({"float":"left"});aj=aM("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");aM("body").prepend(aA,aH.append(ay,aj));if(av){aH.addClass("cboxIE");ae&&aA.css("position","absolute")}aD.children().bind("mouseover mouseout",function(){aM(this).toggleClass(al)}).addClass(al);au=A.height()+f.height()+aD.outerHeight(aE)-aD.height();at=o.width()+h.width()+aD.outerWidth(aE)-aD.width();ax=aG.outerHeight(aE);aw=aG.outerWidth(aE);aH.css({"padding-bottom":au,"padding-right":at}).hide();am.click(aL.next);an.click(aL.prev);ab.click(aL.close);aD.children().removeClass(al);aM(".cboxElement").live("click",function(c){if(c.button!==0&&typeof c.button!=="undefined"){return aE}else{b(this);return false}})};aL.position=function(a,i){function c(j){A[0].style.width=f[0].style.width=aD[0].style.width=j.style.width;ah[0].style.height=ai[0].style.height=aD[0].style.height=o[0].style.height=h[0].style.height=j.style.height}var e=aF.height();e=Math.max(e-aN.h-ax-au,0)/2+aF.scrollTop();var g=Math.max(document.documentElement.clientWidth-aN.w-aw-at,0)/2+aF.scrollLeft();a=aH.width()===aN.w+aw&&aH.height()===aN.h+ax?0:a;ay[0].style.width=ay[0].style.height="9999px";aH.dequeue().animate({width:aN.w+aw,height:aN.h+ax,top:e,left:g},{duration:a,complete:function(){c(this);ao=false;ay[0].style.width=aN.w+aw+at+"px";ay[0].style.height=aN.h+ax+au+"px";i&&i()},step:function(){c(this)}})};aL.resize=function(e){function k(){aN.w=aN.w||aG.width();aN.w=aN.mw&&aN.mw<aN.w?aN.mw:aN.w;return aN.w}function g(){aN.h=aN.h||aG.height();aN.h=aN.mh&&aN.mh<aN.h?aN.mh:aN.h;return aN.h}function i(l){aL.position(l,function(){if(ap){if(av){c&&aG.fadeIn(100);aH[0].style.removeAttribute("filter")}if(aN.iframe){aG.append("<iframe id='cboxIframe'"+(aN.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+aN.href+"' "+(av?"allowtransparency='true'":"")+" />")}aG.show();ac.show().html(aN.title);if(aK.length>1){ad.html(aN.current.replace(/\{current\}/,aI+1).replace(/\{total\}/,aK.length)).show();am.html(aN.next).show();an.html(aN.previous).show();aN.slideshow&&az.show()}ai.hide();ah.hide();aM.event.trigger(L);aN.onComplete&&aN.onComplete.call(aJ);aN.transition==="fade"&&aH.fadeTo(a,1,function(){av&&aH[0].style.removeAttribute("filter")});aF.bind(G,function(){aL.position(0)})}})}if(ap){var j,c,a=aN.transition==="none"?0:aN.speed;aF.unbind(G);if(e){aG.remove();aG=aM('<div id="cboxLoadedContent"/>').html(e);aG.hide().appendTo(aj).css({width:k(),overflow:aN.scrolling?"auto":"hidden"}).css({height:g()}).prependTo(aD);aM("#cboxPhoto").css({cssFloat:"none"});ae&&aM("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",function(){this.style.visibility="inherit"});aN.transition==="fade"&&aH.fadeTo(a,0,function(){i(0)})||i(a);if(aN.preloading&&aK.length>1){e=aI>0?aK[aI-1]:aK[aK.length-1];j=aI<aK.length-1?aK[aI+1]:aK[0];j=aM(j).data(aC).href||j.href;e=aM(e).data(aC).href||e.href;ag(j)&&aM("<img />").attr("src",j);ag(e)&&aM("<img />").attr("src",e)}}else{setTimeout(function(){var l=aG.wrapInner("<div style='overflow:auto'></div>").children();aN.h=l.height();aG.css({height:aN.h});l.replaceWith(l.children());aL.position(a)},1)}}};aL.load=function(){var a,g,c,e=aL.resize;ao=aE;aJ=aK[aI];aN=aM(aJ).data(aC);d();aM.event.trigger(ak);aN.onLoad&&aN.onLoad.call(aJ);aN.h=aN.height?aB(aN.height,"y")-ax-au:aN.innerHeight?aB(aN.innerHeight,"y"):false;aN.w=aN.width?aB(aN.width,"x")-aw-at:aN.innerWidth?aB(aN.innerWidth,"x"):false;aN.mw=aN.w;aN.mh=aN.h;if(aN.maxWidth){aN.mw=aB(aN.maxWidth,"x")-aw-at;aN.mw=aN.w&&aN.w<aN.mw?aN.w:aN.mw}if(aN.maxHeight){aN.mh=aB(aN.maxHeight,"y")-ax-au;aN.mh=aN.h&&aN.h<aN.mh?aN.h:aN.mh}a=aN.href;ai.show();ah.show();if(aN.inline){aM('<div id="cboxInlineTemp" />').hide().insertBefore(aM(a)[0]).bind(ak+" cbox_cleanup",function(){aM(this).replaceWith(aG.children())});e(aM(a))}else{if(aN.iframe){e(" ")}else{if(aN.html){e(aN.html)}else{if(ag(a)){g=new Image;g.onload=function(){var i;g.onload=null;g.id="cboxPhoto";aM(g).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(aN.scalePhotos){c=function(){g.height-=g.height*i;g.width-=g.width*i};if(aN.mw&&g.width>aN.mw){i=(g.width-aN.mw)/g.width;c()}if(aN.mh&&g.height>aN.mh){i=(g.height-aN.mh)/g.height;c()}}if(aN.h){g.style.marginTop=Math.max(aN.h-g.height,0)/2+"px"}e(g);aK.length>1&&aM(g).css({cursor:"pointer"}).click(aL.next);if(av){g.style.msInterpolationMode="bicubic"}};g.src=a}else{aM("<div />").appendTo(aj).load(a,function(j,i){i==="success"?e(this):e(aM("<p>Request unsuccessful.</p>"))})}}}}};aL.next=function(){if(!ao){aI=aI<aK.length-1?aI+1:0;aL.load()}};aL.prev=function(){if(!ao){aI=aI>0?aI-1:aK.length-1;aL.load()}};aL.slideshow=function(){function a(){az.text(aN.slideshowStop).bind(L,function(){c=setTimeout(aL.next,aN.slideshowSpeed)}).bind(ak,function(){clearTimeout(c)}).one("click",function(){g();aM(this).removeClass(al)});aH.removeClass(e+"off").addClass(e+"on")}var g,c,e="cboxSlideshow_";az.bind("cbox_closed",function(){az.unbind();clearTimeout(c);aH.removeClass(e+"off "+e+"on")});g=function(){clearTimeout(c);az.text(aN.slideshowStart).unbind(L+" "+ak).one("click",function(){a();c=setTimeout(aL.next,aN.slideshowSpeed);aM(this).removeClass(al)});aH.removeClass(e+"on").addClass(e+"off")};if(aN.slideshow&&aK.length>1){aN.slideshowAuto?a():g()}};aL.close=function(){aM.event.trigger("cbox_cleanup");aN.onCleanup&&aN.onCleanup.call(aJ);ap=false;aM(document).unbind("keydown.cbox_close keydown.cbox_arrows");aF.unbind(G+" resize.cboxie6 scroll.cboxie6");aA.css({cursor:"auto"}).fadeOut("fast");aH.stop(aE,false).fadeOut("fast",function(){aM("#colorbox iframe").attr("src","about:blank");aG.remove();aH.css({opacity:1});try{af.focus()}catch(a){}aM.event.trigger("cbox_closed");aN.onClosed&&aN.onClosed.call(aJ)})};aL.element=function(){return aM(aJ)};aL.settings=ar;aM(aL.init)})(jQuery);function topnavi(){$(" #tn ul ").css({display:"none"});$(" #tn li").hover(function(){$(this).find("ul:first").css({visibility:"visible",display:"none"}).show(100)},function(){$(this).find("ul:first").css({visibility:"hidden"})})}$(document).ready(function(){var b=$("#jslangcode");b=b.val();contentUiBinding(b);topnavi();var a=$("#video-box");if(a.length>0){$.get("templates/GartenTvTeaser.aspx",function(d){var c=$(d).find("AGRARTV2009_MOVIES_TSR_BOX");c.each(function(){var i=$(this).find("ID_MOVIE").text();var g=$(this).find("SCREENSHOT").text();var e=$(this).find("HEADLINE").text();var f='<a href="http://www.bayergarten.tv/Default.aspx?action=crosslink&id_movie='+i+'" target="_blank">';f+='<img src="http://www.bayergarten.tv/image.aspx?image=files/'+g+'&size=196"/><img src="templates/Layout/images/play_but.png" class="play-btn"/><span>'+e+"</span></a>";var h=$(f);h.attr("id","video"+i);a.append(h)});$("#video-box > a:gt(0)").hide();window.setInterval("switchVideo()",4000)})}});function contentUiBinding(b){if($("#tabs").length>0){$("#tabs").tabs()}if($(".tabs").length>0){$(".tabs").tabs()}if($("ul#gallery").length>0){var a=$("ul#gallery > li").length;if(a>0){$("ul#gallery > li:gt(0)").hide();$("div.gallery-switcher").find("a:eq(0)").addClass("active")}}if(this.location!=top.location){$(".modal").removeClass("modal")}$(".modal").colorbox({iframe:true,width:620,height:600,opacity:"0.80",scrolling:true,transition:"fade"});$(".modal-warning").colorbox({iframe:true,width:339,height:353,opacity:"0.80",scrolling:false,transition:"fade"});$(".pathogen-lightbox").colorbox({iframe:true,width:400,height:431,opacity:"0.80",transition:"fade",scrolling:false});$(".modal-baydir").colorbox({iframe:true,width:375,height:380,opacity:0,scrolling:false});$(".warning-description-accordion").hide();$("a.warning").click(function(){$(this).next().slideToggle("slow")});$(".input-search").autocomplete({source:"getme.searchlist?lang="+b})}function switchVideo(){var a=$("#video-box > a:visible").index("#video-box > a")+1;if(a===$("#video-box > a").length){a=0}$("#video-box > a:visible").hide(500);$("#video-box a:nth-child("+(a+1)+")").show(500)}function switchGallery(a){$("ul#gallery > li").hide();$("ul#gallery > li:eq("+a+")").show();$("div.gallery-switcher a").removeClass("active");$("div.gallery-switcher").find("a:eq("+a+")").addClass("active")}function resizeColorbox(g,e,a,i){var b=g.$("#cboxWrapper");var d=b.width();var h=b.height();var f=((e-d)/2).toFixed(0);var c=((a-h)/2).toFixed(0);b.height(a).width(e);g.$("#colorbox").height(a).width(e).animate({left:"-="+f,top:"-="+c},200);g.$("#cboxdocCenter").width(e);g.$("#cboxBottomCenter").width(e);g.$("#cboxMiddleLeft").height(a);g.$("#cboxMiddleRight").height(a);g.$("#cboxContent").animate({width:e+"px",height:a+"px"},200);g.$("#cboxLoadedContent").animate({width:e+"px",height:a+"px"},200);if(i){$("#myColorboxContent").css("height",i+"px")}}function bookmarkpage(b){var c=location.href;if(!b||b===""){b=window.title}if(window.sidebar){window.sidebar.addPanel(b,c,"")}else{if(window.opera&&window.print){var a=document.createElement("a");a.setAttribute("rel","sidebar");a.setAttribute("href",c);a.setAttribute("title",b);a.click()}else{if(document.all){window.external.AddFavorite(c,b)}else{alert("Ihr Browser unterstützt diese Funktion nicht")}}}return false}function setPrintUrl(a,b){var c=a.attr("href",a.attr("href").replace(/&PageIndex=\d/,"")+"&PageIndex="+b)}function preloadWeather(){var c=0,a=0,e=null,b=["templates/Layout/cssmin/templateContentWide.min.css","templates/Layout/images/Controls/weather/rain_0-25.png","templates/Layout/images/Controls/weather/rain_25-50.png","templates/Layout/images/Controls/weather/rain_50-75.png","templates/Layout/images/Controls/weather/rain_75-100.png","templates/Layout/images/Controls/weather/t1.gif","templates/Layout/images/Controls/weather/t1n.gif","templates/Layout/images/Controls/weather/t2.gif","templates/Layout/images/Controls/weather/t2n.gif","templates/Layout/images/Controls/weather/t3.gif","templates/Layout/images/Controls/weather/t3n.gif","templates/Layout/images/Controls/weather/t4.gif","templates/Layout/images/Controls/weather/t4n.gif","templates/Layout/images/Controls/weather/t5.gif","templates/Layout/images/Controls/weather/t5n.gif","templates/Layout/images/Controls/weather/t6.gif","templates/Layout/images/Controls/weather/t6n.gif","templates/Layout/images/Controls/weather/t7.gif","templates/Layout/images/Controls/weather/t7n.gif","templates/Layout/images/Controls/weather/t8.gif","templates/Layout/images/Controls/weather/t8n.gif","templates/Layout/images/Controls/weather/t9.gif","templates/Layout/images/Controls/weather/t9n.gif","templates/Layout/images/Controls/weather/t10.gif","templates/Layout/images/Controls/weather/t10n.gif","templates/Layout/images/Controls/weather/t11.gif","templates/Layout/images/Controls/weather/t11n.gif","templates/Layout/images/Controls/weather/t12.gif","templates/Layout/images/Controls/weather/t12n.gif","templates/Layout/images/Controls/weather/t13.gif","templates/Layout/images/Controls/weather/t13n.gif","templates/Layout/images/Controls/weather/t14.gif","templates/Layout/images/Controls/weather/t14n.gif","templates/Layout/images/Controls/weather/t99.gif","templates/Layout/images/Controls/weather/t99n.gif","templates/Layout/images/Controls/weather/wind_n.png","templates/Layout/images/Controls/weather/wind_nno.png","templates/Layout/images/Controls/weather/wind_nnw.png","templates/Layout/images/Controls/weather/wind_no.png","templates/Layout/images/Controls/weather/wind_nw.png","templates/Layout/images/Controls/weather/wind_o.png","templates/Layout/images/Controls/weather/wind_ono.png","templates/Layout/images/Controls/weather/wind_oso.png","templates/Layout/images/Controls/weather/wind_s.png","templates/Layout/images/Controls/weather/wind_so.png","templates/Layout/images/Controls/weather/wind_sso.png","templates/Layout/images/Controls/weather/wind_ssw.png","templates/Layout/images/Controls/weather/wind_sw.png","templates/Layout/images/Controls/weather/wind_w.png","templates/Layout/images/Controls/weather/wind_wnw.png","templates/Layout/images/Controls/weather/wind_wsw.png"],d=navigator.appName.indexOf("Microsoft")===0;for(c=0,a=b.length;c<a;c+=1){if(d){new Image().src=b[c];continue}e=document.createElement("object");e.data=b[c];e.width=0;e.height=0;document.body.appendChild(e)}};
