Element.implement("removeClasses",function(A){if($type(A)=="string"&&A!=""){A.split(" ").each((function(B){this.removeClass(B)}).bind(this))}return this});window.addEvent("domready",function(){$("navi").getFirst("ul").getLast("li").set("styles",{"float":"right"}).getFirst("a").set("styles",{margin:"0"});$$("#navi li a").each(function(I){var G=I.getParent("li");var J=I.get("text");if(G.hasClass("page-item-14")){J="Kuenstler"}I.set("html",'<img src="/bseite/wp-content/themes/bseite0708/img/navi-'+J.toLowerCase()+'.png" alt="'+J+'" />');if(!G.hasClass("current_page_item")&&!G.hasClass("current_page_parent")){var H={property:"border-color",duration:500,transition:Fx.Transitions.Sine.easeInOut,wait:false};I.set("events",{mouseenter:function(K){new Event(K).stop();this.set("tween",H).tween("#000")},mouseleave:function(K){new Event(K).stop();this.set("tween",H).tween("#fff")}})}});$$(".subpages-list0 li a, .subpages-list1 li a, .subpages-list2 li a, .subpages-list3 li a").each(function(I){var G=I.getParent("li");if(!G.hasClass("current_page_item")&&!G.hasClass("current_page_parent")){var H={duration:400,transition:Fx.Transitions.Sine.easeInOut,wait:false};I.set("events",{mouseenter:function(J){new Event(J).stop();this.set("morph",H).morph({"background-color":"#000",color:"#fff"})},mouseleave:function(J){new Event(J).stop();this.set("morph",H).morph({"background-color":"#fff",color:"#000"})}})}});if($$("#sidebar ul ul a").length>0){$$("#sidebar ul ul a").each(function(H){var G={duration:400,transition:Fx.Transitions.Sine.easeInOut,wait:false};H.set("events",{mouseenter:function(I){new Event(I).stop();this.set("morph",G).morph({"background-color":"#000",color:"#fff"})},mouseleave:function(I){new Event(I).stop();this.set("morph",G).morph({"background-color":"#fff",color:"#000"})}})})}$$(".post h2 a").each(function(H){var G={duration:400,transition:Fx.Transitions.Sine.easeInOut,wait:false};H.set("events",{mouseenter:function(I){new Event(I).stop();this.set("morph",G).morph({"padding-left":40,"background-position":"0px 12px"})},mouseleave:function(I){new Event(I).stop();this.set("morph",G).morph({"padding-left":0,"background-position":"-18px 12px"})}}).set("styles",{"padding-left":0,"background-position":"-18px 12px"})});$$(".entry a img").each(function(G){G.getParent().addClass("a-img")});if($$("ul.subpages-list0 li a").length>0){var C;if($$("ul.subpages-list0 li.current_page_item a, ul.subpages-list0 li.current_page_parent a").length>0){$$("ul.subpages-list0 li.current_page_item a, ul.subpages-list0 li.current_page_parent a").each(function(G){C=G.get("text").substr(0,2)})}else{C="0"}$$("ul.subpages-list0 li a").each(function(G){G.getParent("ul").set("styles",{background:"transparent url('/bseite/wp-content/themes/bseite0708/img/programm-"+C+".png') top right no-repeat"});G.set("events",{mouseenter:function(H){new Event(H).stop();G.getParent("ul").set("styles",{background:"transparent url('/bseite/wp-content/themes/bseite0708/img/programm-"+G.get("text").substr(0,2)+".png') top right no-repeat"})},mouseleave:function(H){new Event(H).stop();G.getParent("ul").set("styles",{background:"transparent url('/bseite/wp-content/themes/bseite0708/img/programm-"+C+".png') top right no-repeat"})}})})}$$("input,textarea").each(function(G){G.set("events",{focus:function(H){G.addClass("focus")},blur:function(H){G.removeClass("focus")}})});if($("newsletterform")){var F=$("newsletterform");var E=$("newsletterresponse");var B=$("button-submit");var A="http://jetztkultur.de/bseite/wp-content/themes/bseite0708/ajax/newsletter.php";var D=new Request.HTML({url:A,update:E,onRequest:function(G){B.addClass("loading")},onFailure:function(G){B.removeClass("loading");alert("Failure")},onComplete:function(G,I,H,J){B.removeClass("loading")}});new Element("input",{type:"hidden",name:"ajax",value:"enabled"}).inject(F);F.addEvent("submit",function(G){new Event(G).stop();B.blur();E.empty().removeClasses("red green hide");D.post(F)})}new SmoothScroll({duration:2000,transition:Fx.Transitions.Quint.easeOut})});