(function(){var n=typeof jQuery=="function";function j(){if(p.done){return false}var a=document;if(a&&a.getElementsByTagName&&a.getElementById&&a.body){clearInterval(p.timer);p.timer=null;for(var b=0;b<p.ready.length;b++){p.ready[b].call()}p.ready=null;p.done=true}}var p=n?jQuery:function(a){if(p.done){return a()}if(p.timer){p.ready.push(a)}else{p.ready=[a];p.timer=setInterval(j,13)}};function m(a,b){if(b){for(key in b){if(b.hasOwnProperty(key)){a[key]=b[key]}}}return a}function l(c){switch(k(c)){case"string":c=c.replace(new RegExp('(["\\\\])',"g"),"\\$1");c=c.replace(/^\s?(\d+)%/,"$1pct");return'"'+c+'"';case"array":return"["+q(c,function(d){return l(d)}).join(",")+"]";case"function":return'"function()"';case"object":var b=[];for(var a in c){if(c.hasOwnProperty(a)){b.push('"'+a+'":'+l(c[a]))}}return"{"+b.join(",")+"}"}return String(c).replace(/\s/g," ").replace(/\'/g,'"')}function k(a){if(a===null||a===undefined){return false}var b=typeof a;return(b=="object"&&a.push)?"array":b}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function q(d,a){var b=[];for(var c in d){if(d.hasOwnProperty(c)){b[c]=a(d[c])}}return b}function r(f,d){var g=m({},f);var e=document.all;var a='<object width="'+g.width+'" height="'+g.height+'"';if(e&&!g.id){g.id="_"+(""+Math.random()).substring(9)}if(g.id){a+=' id="'+g.id+'"'}if(g.autocachebusting){g.src+=((g.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(g.w3c||!e){a+=' data="'+g.src+'" type="application/x-shockwave-flash"'}else{a+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}a+=">";if(g.w3c||e){a+='<param name="movie" value="'+g.src+'" />'}g.width=g.height=g.id=g.w3c=g.src=null;for(var c in g){if(g[c]!==null){a+='<param name="'+c+'" value="'+g[c]+'" />'}}var h="";if(d){for(var b in d){if(d[b]!==null){h+=b+"="+(typeof d[b]=="object"?l(d[b]):d[b])+"&"}}h=h.substring(0,h.length-1);a+='<param name="flashvars" value=\''+h+"' />"}a+="</object>";return a}function o(b,g,c){var d=flashembed.getVersion();m(this,{getContainer:function(){return b},getConf:function(){return g},getVersion:function(){return d},getFlashvars:function(){return c},getApi:function(){return b.firstChild},getHTML:function(){return r(g,c)}});var f=g.version;var e=g.expressInstall;var h=!f||flashembed.isSupported(f);if(h){g.onFail=g.version=g.expressInstall=null;b.innerHTML=r(g,c)}else{if(f&&e&&flashembed.isSupported([6,65])){m(g,{src:e});c={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};b.innerHTML=r(g,c)}else{if(b.innerHTML.replace(/\s/g,"")!==""){}else{b.innerHTML="<h2>Flash version "+f+" or greater is required</h2><h3>"+(d[0]>0?"Your version is "+d:"You have no flash plugin installed")+"</h3>"+(b.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(b.tagName=="A"){b.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!h&&g.onFail){var a=g.onFail.call(this);if(typeof a=="string"){b.innerHTML=a}}if(document.all){window[g.id]=document.getElementById(g.id)}}window.flashembed=function(c,b,d){if(typeof c=="string"){var a=document.getElementById(c);if(a){c=a}else{p(function(){flashembed(c,b,d)});return}}if(!c){return}var e={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,autocachebusting:false};if(typeof b=="string"){b={src:b}}m(e,b);return new o(c,e,d)};m(window.flashembed,{getVersion:function(){var b=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var c=navigator.plugins["Shockwave Flash"].description;if(typeof c!="undefined"){c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var a=parseInt(c.replace(/^(.*)\..*$/,"$1"),10);var e=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0;b=[a,e]}}else{if(window.ActiveXObject){try{var g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(f){try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=[6,0];g.AllowScriptAccess="always"}catch(d){if(b[0]==6){return b}}try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){}}if(typeof g=="object"){c=g.GetVariable("$version");if(typeof c!="undefined"){c=c.replace(/^\S+\s+(.*)$/,"$1").split(",");b=[parseInt(c[0],10),parseInt(c[2],10)]}}}}return b},isSupported:function(c){var a=flashembed.getVersion();var b=(a[0]>c[0])||(a[0]==c[0]&&a[1]>=c[1]);return b},domReady:p,asString:l,getHTML:r});if(n){jQuery.tools=jQuery.tools||{version:{}};jQuery.tools.version.flashembed="1.0.3";jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===false?this:a}}})();(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:"rel",attrTarget:"$this",useAsTitle:"$this.attr('title')",keyToClose:"c",keyToPrev:"p",keyToNext:"n",keyToPlay:" ",imageArray:[],activeImage:0,buttons:["Close","Next","Prev","Save","Play","Pause"]},settings);var jQueryMatchedObj=this,isPlaying=false;function _initialize(){_start(this,jQueryMatchedObj);return false}function _start(objClicked,jQueryMatchedObj){$("embed, object, select").css({visibility:"hidden"});settings.imageArray=new Array();jQueryMatchedObj.each(function(i){var $this=$(this);if((settings.groupByAttribute==""||settings.groupByAttribute==false)||(settings.groupByAttribute&&$this.attr(settings.groupByAttribute)==$(objClicked).attr(settings.groupByAttribute))){var $tgt=eval(settings.attrTarget),title;if(settings.useAsTitle){title=eval(settings.useAsTitle)}settings.imageArray.push(new Array($this.attr("href"),(title?title:$tgt.attr("title"))));if(this==objClicked){settings.activeImage=settings.imageArray.length-1}}});_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-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),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&&settings.imageArray.length>1){$("#lightbox-btnPlay").bind("click",_play).show();$("#lightbox-btnPause").bind("click",_pause).hide()}$(window).resize(function(){_update_positioning()});_enable_keyboard_navigation()}function _update_positioning(){var dims=___getPageSize(),scroll=___getPageScroll();$("#jquery-overlay").css({width:dims.pageWidth,height:dims.pageHeight});$("#jquery-lightbox").css({top:scroll.y+(dims.windowHeight/10),left:scroll.x}).show()}function _set_image_to_view(){$("#lightbox-container-image-box").toggleClass("loading");$("#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(),img=settings.imageArray[settings.activeImage][0];objImagePreloader.onload=function(){$("#lightbox-image").attr("src",img);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){}};objImagePreloader.src=img}function _resize_container_image_box(intImageWidth,intImageHeight){$("#lightbox-container-image-box").animate({width:(intImageWidth+(settings.containerBorderSize*2)),height:(intImageHeight+(settings.containerBorderSize*2))},settings.containerResizeSpeed,function(){_show_image()});$("#lightbox-container-image-data-box").css({width:intImageWidth});$("#lightbox-btnPrev,#lightbox-btnNext").css({height:intImageHeight})}function _show_image(){$("#lightbox-container-image-box").toggleClass("loading");$("#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(settings.imageArray.length>1){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()}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 dims={},dbw,dbh;if(window.innerHeight&&window.scrollMaxY){dbw=window.innerWidth+window.scrollMaxX;dbh=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){dbw=document.body.scrollWidth;dbh=document.body.scrollHeight}else{dbw=document.body.offsetWidth;dbh=document.body.offsetHeight}}if(self.innerHeight){if(document.documentElement.clientWidth){dims.windowWidth=document.documentElement.clientWidth}else{dims.windowWidth=self.innerWidth}dims.windowHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){dims.windowWidth=document.documentElement.clientWidth;dims.windowHeight=document.documentElement.clientHeight}else{if(document.body){dims.windowWidth=document.body.clientWidth;dims.windowHeight=document.body.clientHeight}}}dims.pageHeight=Math.max(dbh,dims.windowHeight);dims.pageWidth=Math.max(dbw,dims.windowWidth);return dims}function ___getPageScroll(){var scroll={};if(self.pageYOffset){scroll.y=self.pageYOffset;scroll.x=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){scroll.y=document.documentElement.scrollTop;scroll.x=document.documentElement.scrollLeft}else{if(document.body){scroll.y=document.body.scrollTop;scroll.x=document.body.scrollLeft}}}return scroll}return this.unbind("click").click(_initialize)}})(jQuery);$(function(){$.medju={};$.medju.baseUrl=$("base").attr("href");$.medju.enrichContent=function(f){var e=$(f);$("form.searchform").each(function(){var h=$(this).find("input.search"),g=h.val();if(g!=""&&g!=undefined&&!h.hasClass("dontEnhance")){$(this).submit(function(){if(h.val()==g){return false}});h.focus(function(){if($(this).val()==g){$(this).val("")}}).blur(function(){if($(this).val()==""){$(this).val(g)}})}});e.find("a[rel*=lightbox]").lightBox({loop:true,attrTarget:"$this.children('img')",useAsTitle:"$('#'+$this.attr('name')).html()",txtImage:"Bild",txtOf:"von",txtNext:"&gt;",titleNext:"nächstes Bild",txtPrev:"&lt;",titlePrev:"vorheriges Bild",txtClose:"x",titleClose:"Fenster schließen",txtPlay:"Diashow starten",txtPause:"Diashow anhalten"});e.find("a[rel*=details]").each(function(){var h=$(this),g=$("#"+h.attr("name")).hide();h.bind("click",function(){g.slideToggle();return false})});e.find(".popUp, a[rel=popup]").each(function(){var g=$(this);g.click(function(){return $.pollin.displayPopup(g.attr("href"))})});e.find(".teaser.botschaft").each(function(){var k=$(this),i=k.attr("class").match(/date-([0-9]{4})-([0-9]{2})-([0-9]{2})/),j=7*24*3600*1000,n,h,o=k.find(".messageContent"),g=o.outerHeight()+5,l=0;if(i.length>1){n=new Date(i[1],parseInt(i[2])-1,parseInt(i[3]));h=new Date();if((n.getTime()+j)<h.getTime()){var m=$('<span class="more">...</span>');k.addClass("outdated");l=o.outerHeight();k.find(".link-more").before(m);k.hover(function(){m.hide();o.stop().animate({height:g})},function(){m.show();o.stop().animate({height:l})})}}});e.find("div.multicolumn").each(function(){var i=$(this),g=i.innerHeight();if(i.children().length){i.children().css("height",g)}})};$.medju.displayModalBox=function(g,f){var e=$('<div id="overlay" />').hide().html(g).append('<div id="overlayBackground" />');if(typeof(f)=="object"){var h=f.offset?f.offset+"px":"10%"}else{var h="20%"}$("body").remove("#overlay").addClass("hasModalBox").append(e).find("#overlayBackground").css("opacity",0.5);e.fadeIn(300,function(){$("body").bind("click keypress",function(){e.fadeOut(100,function(){$(this).remove();$("body").unbind("click keypress").removeClass("hasModalBox")});return false})});return false};$.medju.displayError=function(f,g,e){return $.medju.displayModalBox('<div id="errorMessage" class="statusMessage layout-warning"><span class="messageIcon"></span><h3>'+f+"</h3>"+g+'<p class="close"><strong>[x] '+$.medju.l18n("close")+"</strong></p></div>",e)};$.medju.displayPopup=function(g,f){var h={name:"medjugorje",windowParams:{width:800,height:400,left:"",top:"",scrollbars:"auto",menubar:"false",status:"false",location:"false"}},i="",e=false;f=jQuery.extend(h,f);$.each(f.windowParams,function(j){if(this&&this!=""){i+=j+"="+this+","}});i=i.substr(0,i.length-1);e=window.open(g,f.name,i);if(e){return false}};$.medju.fnDispatcher=function(){this.listeners=new Array();this.addListener=function(e,f){this.listeners.push({m:e,p:f})};this.dispatch=function(){if(this.listeners.length){$(this.listeners).each(function(){this.m.call(this.p)})}}};$.medju.lll={de:{error:"Fehler",tooltipBookmarkPage:"Einmerken bei '{s}'",bookmarkPage:"Seite einmerken",attention:"Achtung",close:"Schließen",prev:"zurück",next:"weiter",showNextImage:"nächstes Bild",showPrevImage:"vorheriges Bild",displayImageNo:"Bild {s} anzeigen",evalMsgValidEmail:"Geben Sie eine gültige E-Mail-Adresse an",evalMsgRepeat:"Die wiederholte Eingabe stimmt leider nicht mit der ersten überein",errorMessageAjaxRequest:"Bei der Verarbeitung Ihrer Anfrage ist leider ein Fehler aufgetreten. Bitte versuchen Sie es erneut."}};var d="de";$.medju.l18n=function(e){if(typeof($.medju.lll[d][e])=="string"){return $.medju.lll[d][e]}else{return""}};var a=$("#navi"),c=$("#subnavi");if(a.children("ul").length){$.get($.medju.baseUrl+"templates/medjugorje/cache/menu.html",function(e,g){var f=$(e);if(g=="success"&&f.length){f.children().each(function(){var i=$(this),h=a.find("#menuId"+i.attr("id"));if(i.children().length&&!h.children("ul").length){h.append(i.children("ul")).addClass("hasSub")}});b()}},"html")}function b(){var f=a.children("ul:first"),e=f.find("li.active"),g=null,h=null;a.children("ul:first > li").each(function(){var k=$(this),j=k.children("ul:first"),i=false;if(j.length){k.hover(function(l){clearTimeout(g);if(h){clearTimeout(h)}if(j.length&&!i){g=setTimeout(function(){if(!k.hasClass("active")||k.hasClass("disabled")){if(!j.length||j.css("display")=="none"){f.children(".hover").removeClass("hover")}k.addClass("hover").removeClass("disabled").css("opacity",null).children("a:first").addClass("hover");f.find("ul").stop(1,1).not(".active").hide();if(e.length&&!k.hasClass("active")){e.css("opacity",0.8).addClass("disabled")}j.hide().show(300)}},300)}},function(l){if(!k.hasClass("active")){clearTimeout(g);h=setTimeout(function(){j.fadeOut(100,function(){e.css("opacity",null).children("ul").show(300);k.removeClass("hover").children("ul:first").hide();k.children().removeClass("hover")})},1000)}});j.hover(function(l){i=true},function(l){setTimeout(function(){i=false},10)})}})}$.medju.enrichContent("#pageMargins");if(c){a.css({marginBottom:c.outerHeight()});$(window).resize(function(){if(c.outerHeight()!=a.css("padding-bottom")){a.css({marginBottom:c.outerHeight()})}})}if(typeof(onJQueryReady)=="object"){$(onJQueryReady).each(function(){this.fn.call(this.p)})}});