(function(a){a.fn.carousel=function(n){var d={start:0,duration:10000,hide:"fadeOut",show:"fadeIn",speed:"slow",seed:5,timer:0,animate:true,slideshow:true,animateAtSameTime:false,randomize:true};function h(p,o){return(Math.floor(Math.random()*(o-p))+p)}function m(){if(n.randomize){if(e>=b){e=0;l=a.shuffle(l)}else{e++}var o=g;g=l[e];if(g==o){g=l[++e]}}else{g=(g==b)?0:g+1}}function j(o){var r="abcdefghijklmnopqrstuvwxyz0123456789";var q="";for(var p=0;p<o;p++){q+=r.charAt(h(0,r.length-1))}return q}function k(){a(f).children("li").each(function(o){if(n.slideshow){a(this)[o==g?n.show:"hide"](o==g?n.speed:"").addClass(c+o).addClass("slide")[o==g?"addClass":"removeClass"]("active")}else{a(this).addClass(c+o).addClass("slide")[o==g?"addClass":"removeClass"]("active")}b=o});if(b>1){for(i=0;i<=b;i++){l.push(i)}l=a.shuffle(l);n.timer=setTimeout(function(){var o=arguments.callee;if(n.animate&&n.slideshow&&n.animateAtSameTime){a(f).children("li."+c+g)[n.hide](n.speed,function(){a(this).removeClass("active")});m();a(f).children("li."+c+g).addClass("active");a(f).children("li."+c+g)[n.show](n.speed,function(){n.timer=setTimeout(o,n.duration)})}else{if(n.animate&&n.slideshow){a(f).children("li."+c+g)[n.hide](n.speed,function(){a(this).removeClass("active");m();a(f).children("li."+c+g).addClass("active");a(f).children("li."+c+g)[n.show](n.speed,function(){n.timer=setTimeout(o,n.duration)})})}else{if(!n.slideshow&&!n.animate){setTimeout(function(){a(f).children("li."+c+g).removeClass("active");m();a(f).children("li."+c+g).addClass("active");setTimeout(function(){n.timer=setTimeout(o,n.duration)},n.speed)},n.speed)}else{if(n.slideshow&&!n.animate){setTimeout(function(){a(f).children("li."+c+g).removeClass("active").hide();m();a(f).children("li."+c+g).addClass("active").show();setTimeout(function(){n.timer=setTimeout(o,n.duration)},n.speed)},n.speed)}}}}},n.duration)}}n=jQuery.extend(d,n);var f=this;var b;var g=n.start;var l=new Array();var e=0;var c=j(n.seed);a(f).load(k())}})(jQuery);(function(a){a.fn.shuffle=function(){return this.each(function(){var b=a(this).children();return(b.length)?a(this).html(a.shuffle(b)):this})};a.shuffle=function(c){for(var d,b,e=c.length;e;d=parseInt(Math.random()*e),b=c[--e],c[e]=c[d],c[d]=b){}return c}})(jQuery);(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,showDownload:false,enableDiashow:true,diashowDelay:5000,loop:false,containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",txtNext:"&gt;",titleNext:"next image",txtPrev:"&lt;",titlePrev:"previous image",txtClose:"x",titleClose:"close window",txtSave:"save",titleSave:"download image",txtPlay:"start Diashow",txtPause:"pause Diashow",groupByAttribute:false,keyToClose:"c",keyToPrev:"p",keyToNext:"n",keyToPlay:" ",imageArray:[],activeImage:0,buttons:["Close","Next","Prev","Save","Play","Pause"]},settings);var jQueryMatchedObj=this;var isPlaying=false;var diashowInterval=false;var timerDelay=0;function _initialize(){_start(this,jQueryMatchedObj);return false}function _start(objClicked,jQueryMatchedObj){$("embed, object, select").css({visibility:"hidden"});settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute("href"),objClicked.getAttribute("title")))}else{for(var i=0;i<jQueryMatchedObj.length;i++){if(settings.groupByAttribute&&settings.groupByAttribute!=""){if(jQueryMatchedObj[i].getAttribute(settings.groupByAttribute)==objClicked.getAttribute(settings.groupByAttribute)){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute("href"),jQueryMatchedObj[i].getAttribute("title")))}}else{settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute("href"),jQueryMatchedObj[i].getAttribute("title")))}}}while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute("href")){settings.activeImage++}_set_interface();_set_image_to_view()}function _set_interface(){var template='<div id="jquery-overlay" /><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><div id="lightbox-topNav">{BTN_CLOSE}</div><img id="lightbox-image"><div id="lightbox-nav">{BTN_PREV}{BTN_NEXT}</div><div id="lightbox-loading" /></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-bottomNav">{BTN_SAVE}{BTN_PLAY}{BTN_PAUSE}</div></div><span class="lightbox-clear"><!-- --></span></div></div></div>';$.each(settings.buttons,function(index,value){var txt=eval("settings.txt"+value);var title=eval("settings.title"+value);template=template.replace("{BTN_"+value.toUpperCase()+"}",'<a href="#" class="navButton" id="lightbox-btn'+value+'" title="'+(title?title:txt)+'" style="display:none;"><span>'+txt+"</span></a>")});$("body").append(template);_update_positioning();$("#jquery-overlay").css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity}).fadeIn();$("#lightbox-loading,#lightbox-btnClose,#jquery-overlay").bind("click",_finish).show();if(settings.enableDiashow){$("#lightbox-btnPlay").bind("click",_play).show();$("#lightbox-btnPause").bind("click",_pause).hide()}$(window).resize(function(){_update_positioning()});_enable_keyboard_navigation()}function _update_positioning(){var arrPageSizes=___getPageSize();$("#jquery-overlay").css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$("#jquery-lightbox").css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show()}function _set_image_to_view(){$("#lightbox-loading").show();$("#lightbox-image,#lightbox-nav,#lightbox-btnPrev,#lightbox-btnNext,#lightbox-container-image-data-box").hide();$("#lightbox-btnPrev,#lightbox-btnNext").css("visibility","hidden");var objImagePreloader=new Image();objImagePreloader.onload=function(){$("#lightbox-image").attr("src",settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){}};objImagePreloader.src=settings.imageArray[settings.activeImage][0]}function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$("#lightbox-container-image-box").width();var intCurrentHeight=$("#lightbox-container-image-box").height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;if((intDiffW==0)&&(intDiffH==0)){_show_image()}else{$("#lightbox-container-image-box").animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image()})}$("#lightbox-container-image-data-box").css({width:intImageWidth});$("#lightbox-btnPrev,#lightbox-btnNext").css({height:intImageHeight})}function _show_image(){$("#lightbox-loading").hide();$("#lightbox-image").fadeIn(function(){_show_image_data();_set_navigation()});_preload_neighbor_images()}function _show_image_data(){$("#lightbox-container-image-data-box").fadeIn();$("#lightbox-image-details-caption").hide();if(settings.imageArray[settings.activeImage][1]){$("#lightbox-image-details-caption").html(settings.imageArray[settings.activeImage][1]).show()}if(settings.imageArray.length>1){$("#lightbox-image-details-currentNumber").html(settings.txtImage+" "+(settings.activeImage+1)+" "+settings.txtOf+" "+settings.imageArray.length).show()}}function _set_navigation(){$("#lightbox-nav").fadeIn();if(settings.showDownload){$("#lightbox-btnSave").attr("href",settings.imageArray[settings.activeImage][0]).attr("target","_blank").show()}if(!isPlaying){if(settings.activeImage-1>=0||settings.loop){$("#lightbox-btnPrev").show().css("visibility","visible").unbind().bind("click",_prev_image)}if(settings.activeImage+1<=settings.imageArray.length-1||settings.loop){$("#lightbox-btnNext").show().css("visibility","visible").unbind().bind("click",_next_image)}}else{_initTimer()}}function _prev_image(){if(settings.activeImage-1>=0){settings.activeImage--;_set_image_to_view()}else{if(settings.loop){settings.activeImage=settings.imageArray.length-1;_set_image_to_view()}else{_pause()}}return false}function _next_image(){if(settings.activeImage+1<=settings.imageArray.length-1){settings.activeImage++;_set_image_to_view()}else{if(settings.loop){settings.activeImage=0;_set_image_to_view()}else{_pause()}}return false}function _play(){if(!isPlaying){isPlaying=true;_initTimer();$("#lightbox-nav").fadeOut();$("#lightbox-btnPlay").hide();$("#lightbox-btnPause").show()}return false}function _pause(){if(isPlaying){$("#lightbox-diashow").remove();isPlaying=false;_initTimer();_set_navigation();$("#lightbox-btnPlay").show();$("#lightbox-nav").fadeIn();$("#lightbox-btnPause").hide()}return false}function _initTimer(){if(!$("#lightbox-diashow").html()){$("#lightbox-container-image-data").prepend('<div id="lightbox-diashow"><span id="lightbox-diashow-timer" /></div>')}var t=$("#lightbox-diashow-timer");if(isPlaying){t.css("width",0).hide().animate({width:"100%"},settings.diashowDelay,"linear",function(){if($("#lightbox-diashow").html()){_next_image()}})}else{t.stop();$("#lightbox-diashow").remove()}}function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent)})}function _disable_keyboard_navigation(){$(document).unbind()}function _keyboard_action(objEvent){if(objEvent==null){keyCode=event.keyCode;escapeKey=27}else{keyCode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE}if(isPlaying){_pause()}console.log(settings.keyToPlay.charCodeAt(0));switch(keyCode){case escapeKey:case 88:case 67:case settings.keyToClose.charCodeAt(0):_finish();break;case 37:case 80:case settings.keyToPrev.charCodeAt(0):_prev_image();break;case 39:case 78:case settings.keyToNext.charCodeAt(0):_next_image();break;case 83:case settings.keyToPlay.charCodeAt(0):if(isPlaying){_pause()}else{_play()}}}function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0]}if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0]}}function _finish(){_pause();_disable_keyboard_navigation();$("#jquery-lightbox").remove();$("#jquery-overlay").fadeOut(function(){$("#jquery-overlay").remove()});$("embed, object, select").css({visibility:"visible"});return false}function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight}}var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth}else{windowWidth=self.innerWidth}windowHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else{if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight}}}if(yScroll<windowHeight){pageHeight=windowHeight}else{pageHeight=yScroll}if(xScroll<windowWidth){pageWidth=xScroll}else{pageWidth=windowWidth}arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize}function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft}else{if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft}}}arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll}function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date()}while(curDate-date<ms)}return this.unbind("click").click(_initialize)}})(jQuery);$(function(){$.guggenberger={};$.guggenberger.initCarousel=function(f,g){$('<div id="dummy" />').load(f,function(){var j=$(this),k=j.children("li.carrouselItem"),h=$("#carrouselContainer"+g+" li.carrouselItem img").attr("src");j.hide();if(k.length>1){k.each(function(){if($(this).children("img").attr("src")==h){$(this).remove()}});k.appendTo("#carrouselContainer"+g);$("#carrouselContainer"+g).carousel({start:0,duration:6000,animateAtSameTime:true,randomize:true})}j.remove()})};var b=$("#applicationForm"),e=($.browser.msie||$.browser.opera)?"focus":"change";if(b.length){var a=b.find("#dqb-content"),d=b.find("#qm-content");if(!$("#dqb_yes:checked").length){a.hide();c(a,true)}if(!$("#qm-system_no:checked").length){d.hide();c(d,true)}$("#dqb_yes").bind(e,function(){a.slideDown();c(a,false)});$("#dqb_no").bind(e,function(){a.slideUp();c(a,true)});$("#qm-system_no").bind(e,function(){d.slideDown();c(d,false)});$("#qm-system_yes").bind(e,function(){d.slideUp();c(d,true)})}function c(f,g){f.find("input").each(function(){$(this).attr("disabled",(g?"disabled":null))})}$("a[rel*=lightbox]").lightBox({groupByAttribute:"rel",txtImage:"Bild",txtOf:"von",txtPlay:"Diashow starten",txtPause:"Diashow anhalten",titleNext:"nächstes Bild",titlePrev:"vorheriges Bild"})});
