$(document).ready(function(){$(".teaserresize, .galerieimg, .teasertext").removeClass("displayNone");$(window).load(function(){$(".bildergalerie.klein").removeClass("displayNone");$(".klein a img").each(function(){var maxWidth=46;var maxHeight=32;var ratio=0;var width=$(this).width();var height=$(this).height();if(width>maxWidth){ratio=maxWidth/width;$(this).css("width",maxWidth);$(this).css("height",height*ratio);height=height*ratio;width=width*ratio;}if(height>maxHeight){ratio=maxHeight/height;$(this).css("height",maxHeight);$(this).css("width",width*ratio);width=width*ratio;}});$(".bildergalerie.klein").addClass("displayNone");});});function resize(elementName,id,status){if(status){document.getElementById(elementName+id).style.display="block";document.getElementById("erweitern"+id).style.display="none";document.getElementById("verkleinern"+id).style.display="block";}else
{document.getElementById(elementName+id).style.display="none";document.getElementById("erweitern"+id).style.display="block";document.getElementById("verkleinern"+id).style.display="none";}}function image(src,srcBig,alt,title,bu,copy,target,index){this.src=src;this.srcBig=srcBig;this.alt=alt;this.title=title;this.bu=bu;this.copy=copy;this.target=target;this.index=index;return this;}function imgArray(){this.map=new Array();this.len=0;this.currentImg="";this.next=null;this.prev=null;this.zoom=null;this.buId="";this.isHover=false;this.imgs=new Array();this.add=function(src,srcBig,alt,title,bu,copy,target,key){this.map.push(key);this.imgs[key]=new image(src,srcBig,alt,title,bu,copy,target,this.len++);};this.getTarget=function(key){return this.imgs[key].target;};this.hasPrev=function(key){if(this.imgs[key].index!=0){return true;}else{return false;}};this.getPrev=function(key){if(this.hasPrev(key)){return this.imgs[this.map[this.imgs[key].index-1]];}else{return null;}};this.hasNext=function(key){if(this.imgs[key].index<this.len-1){return true;}else{return false;}};this.getNext=function(key){if(this.hasNext(key)){return this.imgs[this.map[this.imgs[key].index+1]];}else{return null;}};this.getImgByIdx=function(idx){return this.map[idx];};return this;}function initImgArrayProperty(a,prev,next,zoom,buId,copyId){a.next=next;a.prev=prev;a.zoom=zoom;a.buId=buId;a.copyId=copyId;document.getElementById(a.prev).onmouseover=function(){a.isHover=true;changeButtonState(a);};document.getElementById(a.prev).onmouseout=function(){a.isHover=false;changeButtonState(a);};document.getElementById(a.prev).onclick=function(){switchImg(a,a.getImgByIdx(a.getPrev(a.currentImg).index));};document.getElementById(a.next).onmouseover=function(){a.isHover=true;changeButtonState(a);};document.getElementById(a.next).onmouseout=function(){a.isHover=false;changeButtonState(a);};document.getElementById(a.next).onclick=function(){switchImg(a,a.getImgByIdx(a.getNext(a.currentImg).index));};document.getElementById(a.zoom).onmouseover=function(){a.isHover=true;changeButtonState(a);};document.getElementById(a.zoom).onmouseout=function(){a.isHover=false;changeButtonState(a);};switchImg(a,a.getImgByIdx(0));}function changeButton(id,visibility){if(visibility){document.getElementById(id).style.display="inline";}else
{document.getElementById(id).style.display="none";}}function changeButtonState(imgArray){if(imgArray.isHover){checkButtons(imgArray,imgArray.currentImg);changeButton(imgArray.zoom,true);}else
{changeButton(imgArray.prev,false);changeButton(imgArray.next,false);changeButton(imgArray.zoom,false);}}function checkButtons(imgArray,objIdx){if(imgArray.hasPrev(objIdx)){changeButton(imgArray.prev,true);}else
{changeButton(imgArray.prev,false);}if(imgArray.hasNext(objIdx)){changeButton(imgArray.next,true);}else
{changeButton(imgArray.next,false);}}function switchImg(imgArray,objIdx){imgArray.currentImg=objIdx;var t=imgArray.imgs[objIdx].target;var objTargetId=document.getElementById(t);objTargetId.src=imgArray.imgs[objIdx].src;objTargetId.alt=imgArray.imgs[objIdx].alt;objTargetId.title=imgArray.imgs[objIdx].title;document.getElementById(imgArray.zoom).title=imgArray.imgs[objIdx].title;var srcImgBig=imgArray.imgs[objIdx].srcBig;document.getElementById(imgArray.zoom).href=srcImgBig;var buEl=document.getElementById(imgArray.buId);buEl.innerHTML=imgArray.imgs[objIdx].bu;var copyEl=document.getElementById(imgArray.copyId);copyEl.innerHTML=imgArray.imgs[objIdx].copy;checkButtons(imgArray,objIdx);changeButtonState(imgArray);}
