// iCarousel Copyright (c) 2007 Fabio Zendhi Nagao, http://zend.lojcomm.com.br/icarousel/, MIT Style License.
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('q Z=C z({5:{7:{i:"1x",D:"18",s:1,r:13.12.1I.14,u:1K,l:{i:"1J",R:1X,1z:"G"}},j:{W:"j",p:1T},P:"1Y",S:"1H",T:"21",1d:z.H,1b:z.H,1F:z.H,1t:z.H,1A:z.H},1L:8(1i,1k){4.1N(1k);4.m=$(1i);4.9=$A($$("."+4.5.j.W));4.x=U;d(4.5.P!="10"&&$(4.5.P)){$(4.5.P).17("11",8(1o){C 1a(1o).G();4.1B();4.J("1d",4,20)}.h(4))}d(4.5.S!="10"&&$(4.5.S)){$(4.5.S).17("11",8(1g){C 1a(1g).G();4.15();4.J("1b",4,20)}.h(4))}d(4.5.T!="10"&&$(4.5.T)){$(4.5.T).17("11",8(1e){C 1a(1e).G();4.1r()}.h(4))}q w=4.5.7;K(4.5.7.i.N()){t"L":4.9.Y(8(E){E.e=E.19("B",{u:w.u,r:w.r});E.O("B",0);E.1l({"1n":8(){4.x=1m;d(4.5.7.l.i=="I"){4.v=$1h(4.v)}}.h(4),"1c":8(){4.x=U;d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}}.h(4)})}.h(4));4.y=4.m.1p("y").1q();4.6=0;4.o(4.6);k;M:(2).1R(8(){4.9.Y(8(1f){1f.1V().1U(4.m)}.h(4))}.h(4));4.9=$A($$("."+4.5.j.W));4.9.Y(8(1j){1j.1l({"1n":8(){4.x=1m;d(4.5.7.l.i=="I"){4.v=$1h(4.v)}}.h(4),"1c":8(){4.x=U;d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}}.h(4)})}.h(4));4.e=4.m.1S({u:w.u,r:w.r,1Z:U});4.6=4.9.g/3;4.m.O(w.D,-4.6*4.5.j.p);k}d(4.5.7.l.i=="I"){4.v=4.V.X(4.5.7.l.R,4)}},1P:8(n){K(4.5.7.i.N()){t"L":q 1D=4.6;4.6=1E.1C(n%(4.9.g/3));4.o(4.6,1D);k;M:4.6=1E.1C(n%(4.9.g/3));4.6+=4.9.g/3;4.o(4.6);k}4.J("1A",4,20)},1B:8(){K(4.5.7.i.N()){t"L":q 1G=4.6;4.6-=4.5.7.s;d(4.6<0){4.6=(4.9.g-1)}4.o(4.6,1G);k;M:4.6-=4.5.7.s;d(4.6<4.9.g/3){4.m.O(4.5.7.D,-4.5.j.p*4.9.g*2/3);4.6=4.9.g*2/3-4.5.7.s}4.o(4.6);k}4.J("1F",4,20)},15:8(){K(4.5.7.i.N()){t"L":q 1s=4.6;4.6+=4.5.7.s;d(4.6>=4.9.g){4.6=0}4.o(4.6,1s);k;M:4.6+=4.5.7.s;d(4.6>4.9.g*2/3){4.m.O(4.5.7.D,-4.5.j.p*4.9.g/3);4.6=4.9.g/3+4.5.7.s}4.o(4.6);k}4.J("1t",4,20)},1r:8(){(4.m.1p("y").1q()==0)?4.m.19("y",{u:1u,r:13.12.1y.14}).f(4.y):4.m.19("y",{u:1u,r:13.12.1y.14}).f(0)},V:8(){d(4.5.7.l.1z=="G"&&!4.x){4.15()}},o:8(a,b){K(4.5.7.i){t"L":d($1W(b)){4.9[b].e.f(0).F(8(){4.9[a].e.f(1)}.h(4))}16{4.9[a].e.f(1)}k;t"1Q":q c=4;d(c.5.7.D=="Q"){c.e.f({"Q":-a*c.5.j.p})}16{c.e.f({"18":-a*c.5.j.p})}k;t"1x":q c=4;d(c.5.7.D=="Q"){c.e.f({"B":0.1v}).F(8(){c.e.f({"Q":-a*c.5.j.p}).F(8(){c.e.f({"B":1})})})}16{c.e.f({"B":0.1v}).F(8(){c.e.f({"18":-a*c.5.j.p}).F(8(){c.e.f({"B":1})})})}k}}});Z.1w(C 1O);Z.1w(C 1M);',62,126,'||||this|options|atScreen|animation|function|aItems|||_10|if|fx|start|length|bind|type|item|break|rotate|container||_animate|size|var|transition|amount|case|duration|timer|_6|isMouseOver|height|Class||opacity|new|direction|_7|chain|stop|empty|auto|fireEvent|switch|fade|default|toLowerCase|setStyle|idPrevious|top|interval|idNext|idToggle|false|_autoRotate|klass|periodical|each|iCarousel|undefined|click|Transitions|Fx|easeInOut|_next|else|addEvent|left|effect|Event|onClickNext|mouseleave|onClickPrevious|_5|_8|_4|clear|_1|_9|_2|addEvents|true|mouseenter|_3|getStyle|toInt|_toggle|_d|onNext|1000|75|implement|fadeNscroll|Sine|onMouseOver|onGoTo|_previous|abs|_b|Math|onPrevious|_c|next|Cubic|manual|500|initialize|Options|setOptions|Events|goTo|scroll|times|effects|100|injectInside|clone|defined|5000|previous|wait||toggle'.split('|'),0,{}))

//SimpleTabs by digitarald.de
var SimpleTabs=new Class({options:{show:0,entrySelector:".tab-entry",classWrapper:"tab-wrapper",classMenu:"tab-menu",classContainer:"tab-container",className:"ShowAll",onShow:function(a,b,c){a.addClass("tab-selected");b.setStyle("display","")},onHide:function(a,b,c){a.removeClass("tab-selected");b.setStyle("display","none")},onRequest:function(a,b,c){b.addClass("tab-ajax-loading")},onComplete:function(a,b,c){b.removeClass("tab-ajax-loading")},onFailure:function(a,b,c){b.removeClass("tab-ajax-loading")},getContent:null},initialize:function(b,a){this.setOptions(a);this.element=$(b);this.selected=null;this.build()},build:function(){this.entries=[];this.menu=new Element("ul",{"class":this.options.classMenu});this.wrapper=new Element("div",{"class":this.options.classWrapper});this.element.getElements(this.options.entrySelector).each(function(a){var b=a.href||(this.options.getContent?this.options.getContent.call(this,a):a.getNext());this.addTab(a.innerHTML,a.title||a.innerHTML,b)},this);this.element.empty().adopt(this.menu).adopt(this.wrapper);if(this.entries.length){this.select(this.options.show)}},addTab:function(e,d,c){if($type(c)=="string"&&!$(c)){var b=c}var a=$(c)||new Element("div");this.entries.push({container:a.setStyle("display","none").addClass(this.options.classContainer).inject(this.wrapper),toggle:new Element("li").adopt(new Element("a",{href:"#",title:d,events:{click:this.onClick.bindWithEvent(this,[this.entries.length])}}).setHTML(e)).inject(this.menu),url:b||null});return this},onClick:function(a,b){a.stop();this.select(b)},select:function(a){if(this.selected===a||!this.entries[a]){return this}var b=this.entries[a];var d=[b.toggle,b.container,a];if(this.selected!==null){var c=this.entries[this.selected];if(this.ajax&&this.ajax.running){this.ajax.cancel()}d.concat([c.toggle,c.container,this.selected]);this.fireEvent("onHide",[c.toggle,c.container,this.selected])}this.fireEvent("onShow",d);if(b.url&&!b.loaded){this.ajax=new Ajax(b.url,$merge({onRequest:this.fireEvent.pass(["onRequest",d],this),onFailure:this.fireEvent.pass(["onFailure",d],this),onComplete:function(e){b.loaded=true;b.container.empty().setHTML(e);this.fireEvent("onComplete",d)}.bind(this)},this.options.ajaxOptions)).request()}this.selected=a;return this}});SimpleTabs.implement(new Events,new Options);

//Slimbox german
//loading image
var fileLoadingImage = "assets/plugins/directresize/libs/slimbox/images/loading.gif";		
//close image
var fileBottomNavCloseImage = "assets/plugins/directresize/libs/slimbox/images/closelabel.gif";
//next image
var nextLinkImage = "assets/plugins/directresize/libs/slimbox/images/nextlabel.gif";
//previous image
var previousLinkImage = "assets/plugins/directresize/libs/slimbox/images/prevlabel.gif";
//controls the speed of the image resizing in milliseconds
var resizeDuration = 100;
//resize transition effect
var resizeTransition = Fx.Transitions.sineInOut;
//the "Image" part from the text "Bild 1 von 6"
var imageNrDesc = "Bild";
//the separator "of" from the text "Image 1 of 6", you can change to / slash or whatever
var imageNrSep = "von";
//accelerator keys that goes to next picture, separate by commas
var nextKeys = new Array("n","w");
//accelerator keys that goes to previous picture, separate by commas
var prevKeys = new Array("b", "p","v");
//accelerator keys that close the lightbox, separate by commas
var closeKeys = new Array("c","x","q","s");

//Slimbox
var Lightbox={init:function(l,h,b,i,c,d,f,e,a,k,g){this.options={};this.options.resizeDuration=c;this.options.resizeTransition=d;this.options.initialWidth=250;this.options.initialHeight=250;this.options.animateCaption=true;this.options.previousLinkImage=i;this.options.nextLinkImage=b;this.options.closeLinkImage=h;this.options.loadingImage=l;this.options.imageNrDesc=f;this.options.imageNrSep=e;this.options.nextKeys=a;this.options.prevKeys=k;this.options.closeKeys=g;this.anchors=[];$each(document.links,function(m){if(m.rel&&m.rel.test(/^lightbox/i)){m.onclick=this.click.pass(m,this);this.anchors.push(m)}},this);this.eventKeyDown=this.keyboardListener.bindAsEventListener(this);this.eventPosition=this.position.bind(this);this.overlay=new Element("div").setProperty("id","lbOverlay").injectInside(document.body);this.center=new Element("div").setProperty("id","lbCenter").setStyles({width:this.options.initialWidth+"px",height:this.options.initialHeight+"px",marginLeft:"-"+(this.options.initialWidth/2)+"px",display:"none",background:"#fff url("+this.options.loadingImage+") no-repeat center"}).injectInside(document.body);this.image=new Element("div").setProperty("id","lbImage").injectInside(this.center);this.prevLink=new Element("a").setProperties({id:"lbPrevLink",href:"#"}).setStyle("display","none").injectInside(this.image);this.nextLink=this.prevLink.clone().setProperty("id","lbNextLink").injectInside(this.image);this.prevLink.onclick=this.previous.bind(this);this.prevLink.setProperty("onmouseover",'this.style.backgroundImage="url('+this.options.previousLinkImage+')"; this.style.backgroundRepeat="no-repeat"; this.style.backgroundPosition="left 15%";');var i=this.options.previousLinkImage;this.prevLink.onmouseover=function(){this.style.backgroundImage="url("+i+")";this.style.backgroundRepeat="no-repeat";this.style.backgroundPosition="left 15%"};this.prevLink.setProperty("onmouseout",'this.style.backgroundImage="";');this.prevLink.onmouseout=function(){this.style.backgroundImage=""};this.nextLink.onclick=this.next.bind(this);this.nextLink.setProperty("onmouseover",'this.style.backgroundImage="url('+this.options.nextLinkImage+')"; this.style.backgroundRepeat="no-repeat"; this.style.backgroundPosition="right 15%";');var b=this.options.nextLinkImage;this.nextLink.onmouseover=function(){this.style.backgroundImage="url("+b+")";this.style.backgroundRepeat="no-repeat";this.style.backgroundPosition="right 15%"};this.nextLink.setProperty("onmouseout",'this.style.backgroundImage="";');this.nextLink.onmouseout=function(){this.style.backgroundImage=""};this.bottomContainer=new Element("div").setProperty("id","lbBottomContainer").setStyle("display","none").injectInside(document.body);this.bottom=new Element("div").setProperty("id","lbBottom").injectInside(this.bottomContainer);this.closeLink=new Element("a").setProperties({id:"lbCloseLink",href:"#"}).injectInside(this.bottom);this.closeLink.onclick=this.overlay.onclick=this.close.bind(this);this.closeLink.setStyle("background","transparent url("+this.options.closeLinkImage+") no-repeat center");this.caption=new Element("div").setProperty("id","lbCaption").injectInside(this.bottom);this.number=new Element("div").setProperty("id","lbNumber").injectInside(this.bottom);new Element("div").setStyle("clear","both").injectInside(this.bottom);var j=this.nextEffect.bind(this);this.fx={overlay:this.overlay.effect("opacity",{duration:500}).hide(),resize:this.center.effects({duration:this.options.resizeDuration,transition:this.options.resizeTransition,onComplete:j}),image:this.image.effect("opacity",{duration:500,onComplete:j}),bottom:this.bottom.effect("margin-top",{duration:400,onComplete:j})};this.preloadPrev=new Image();this.preloadNext=new Image()},click:function(d){if(d.rel.length==8){return this.show(d.href,d.title)}var c,b,a=[];this.anchors.each(function(e){if(e.rel==d.rel){for(c=0;c<a.length;c++){if(a[c][0]==e.href){break}}if(c==a.length){a.push([e.href,e.title]);if(e.href==d.href){b=c}}}},this);return this.open(a,b)},show:function(a,b){return this.open([[a,b]],0)},open:function(a,b){this.images=a;this.position();this.setup(true);this.top=window.getScrollTop()+(window.getHeight()/15);this.center.setStyles({top:this.top+"px",display:""});this.fx.overlay.start(0.8);return this.changeImage(b)},position:function(){this.overlay.setStyles({top:window.getScrollTop()+"px",height:window.getHeight()+"px"})},setup:function(a){var c=$A(document.getElementsByTagName("object"));if(window.ie){c.extend(document.getElementsByTagName("select"))}c.each(function(d){d.style.visibility=a?"hidden":""});var b=a?"addEvent":"removeEvent";window[b]("scroll",this.eventPosition)[b]("resize",this.eventPosition);document[b]("keydown",this.eventKeyDown);this.step=0},keyboardListener:function(d){if(d==null){var a=d.keyCode}else{var a=d.which}var c=String.fromCharCode(a).toLowerCase();var b=0;for(b=0;b<this.options.nextKeys.length;b++){if(this.options.nextKeys[b]==c){this.next()}}for(b=0;b<this.options.prevKeys.length;b++){if(this.options.prevKeys[b]==c){this.previous();break}}for(b=0;b<this.options.closeKeys.length;b++){if(this.options.closeKeys[b]==c){this.close();break}}switch(d.keyCode){case 27:case 88:case 67:case 83:this.close();break;case 37:case 80:case 90:this.previous();break;case 39:case 78:case 87:this.next()}},previous:function(){return this.changeImage(this.activeImage-1)},next:function(){return this.changeImage(this.activeImage+1)},changeImage:function(a){if(this.step||(a<0)||(a>=this.images.length)){return false}this.step=1;this.activeImage=a;this.bottomContainer.style.display=this.prevLink.style.display=this.nextLink.style.display="none";this.fx.image.hide();this.center.className="lbLoading";this.preload=new Image();this.preload.onload=this.nextEffect.bind(this);this.preload.src=this.images[a][0];return false},nextEffect:function(){switch(this.step++){case 1:this.center.className="";this.image.style.backgroundImage="url("+this.images[this.activeImage][0]+")";this.image.style.width=this.bottom.style.width=this.preload.width+"px";this.image.style.height=this.prevLink.style.height=this.nextLink.style.height=this.preload.height+"px";this.caption.setHTML(this.images[this.activeImage][1]||"");this.number.setHTML((this.images.length==1)?"":this.options.imageNrDesc+" "+(this.activeImage+1)+" "+this.options.imageNrSep+" "+this.images.length);if(this.activeImage){this.preloadPrev.src=this.images[this.activeImage-1][0]}if(this.activeImage!=(this.images.length-1)){this.preloadNext.src=this.images[this.activeImage+1][0]}if(this.center.clientHeight!=this.image.offsetHeight){this.fx.resize.start({height:this.image.offsetHeight});break}this.step++;case 2:if(this.center.clientWidth!=this.image.offsetWidth){this.fx.resize.start({width:this.image.offsetWidth,marginLeft:-this.image.offsetWidth/2});break}this.step++;case 3:this.bottomContainer.setStyles({top:(this.top+this.center.clientHeight)+"px",height:"0px",marginLeft:this.center.style.marginLeft,display:""});this.fx.image.start(1);break;case 4:if(this.options.animateCaption){this.fx.bottom.set(-this.bottom.offsetHeight);this.bottomContainer.style.height="";this.fx.bottom.start(0);break}this.bottomContainer.style.height="";case 5:if(this.activeImage){this.prevLink.style.display=""}if(this.activeImage!=(this.images.length-1)){this.nextLink.style.display=""}this.step=0}},close:function(){if(this.step<0){return}this.step=-1;if(this.preload){this.preload.onload=Class.empty;this.preload=null}for(var a in this.fx){this.fx[a].stop()}this.center.style.display=this.bottomContainer.style.display="none";this.fx.overlay.chain(this.setup.pass(false,this)).start(0);return false}};Window.onDomReady(Lightbox.init.pass(new Array(fileLoadingImage,fileBottomNavCloseImage,nextLinkImage,previousLinkImage,resizeDuration,resizeTransition,imageNrDesc,imageNrSep,nextKeys,prevKeys,closeKeys),Lightbox));



//SimpleTabs js im header
window.addEvent("domready", function() {
			var tabs1 = new SimpleTabs($('tab-block-1'), {
				entrySelector: 'h4'
			});
	new iCarousel("example_3_content", {
		idPrevious: "example_3_previous",
		idNext: "example_3_next",
		idToggle: "undefined",
		item: {
			klass: "example_3_item",
			size: 100
		},
		animation: {
			direction: "vertical",
			duration: 100,
			amount: 5
		}
	});
});

