function alwaysReady() { $('html,body').css({ scrollTop: 0 }); hash = window.location.hash; if (hash != "") { split = hash.replace('%23', '#').split('#'); hash = "#" + split[split.length - 1]; if ($(hash).length > 0) { $('html,body').animate({ scrollTop: $(hash).offset().top }, 1); } } $('.kursListBlock.startSmall .kursLong').hide(); openerLink = $(''); openerLink.click(function(){ /* $('.kursLong.opened').each(function(){ $(this).slideUp(300); $(this).removeClass('opened'); }); */ if ($(this).parent().parent().next('.kursLong').hasClass('opened')) { $(this).parent().parent().next('.kursLong').removeClass('opened'); $(this).parent().parent().next('.kursLong').slideUp(300); } else { $(this).parent().parent().next('.kursLong').slideDown(300); $(this).parent().parent().next('.kursLong').addClass('opened'); } return false; }); $('.kursListBlock.startSmall .kTitle').wrapInner(openerLink); const lightbox = GLightbox({ loop: true }); $('a.linkextern').click(function(){ window.open(this.href, '_blank'); return(false); }); $('a.button').prepend(''); $('a.button').append(''); $('.playerlink a.popUp').append('
'); $('.gallerylink a.popUp').append('
'); $('input[type="submit"], button[type="submit"]').each(function(){ submitbutton = $(this); linkbutton = $('' + $(this).attr('value') + ''); linkbutton.click(function(){ submitbutton.click(); }); linkbutton.insertAfter($(this)); $(this).hide(); }); $('.buttonWrap1').each(function(){ $('.buttonWrap1').width($('.buttonWrap1 .buttonText').width() + 40); }); $('form.searchfilter select').change(function(){ $('#resultList').fadeOut(300); if ($(this).attr('name') == "r") { $('select[name="sr"]').attr('name', 'clearsr'); } if ($(this).attr('name') == "kl") { $('select[name="r"]').attr('name', 'clearr'); $('select[name="sr"]').attr('name', 'clearsr'); } $(this).closest('form').submit(); }); var dateStart = $('#yform-formular-start input').flatpickr({ locale: 'de', dateFormat: 'Y-m-d', altInput: true, altFormat: "j. F Y", dateFormat: "Y-m-d", onChange: function(selectedDates, dateStr, instance) { dateEnd.set('minDate', dateStr) } }); var dateEnd = $('#yform-formular-end input').flatpickr({ locale: 'de', dateFormat: 'Y-m-d', altInput: true, altFormat: "j. F Y", dateFormat: "Y-m-d" }); $('#yform-formular-start_time input').flatpickr({ locale: 'de', enableTime: true, noCalendar: true, dateFormat: "H:i", defaultDate: "16:00" }); //$('form.searchfilter input[type="submit"]').css('visibility' : 'hidden'); } function externalMediaAccepted() { $('iframe').each(function(){ $('.no-cookie-msg').hide(); $(this).attr('src', $(this).data('src')); }); } if (typeof wScriptAlreadyLoaded === "undefined") { var wScriptAlreadyLoaded = true; /*! iFrame Resizer (iframeSizer.min.js ) - v3.6.3 - 2018-10-28 * Desc: Force cross domain iframes to size to content. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Copyright: (c) 2018 David J. Bradshaw - dave@bradshaw.net * License: MIT */ !function(a){"use strict";function b(a,b,c){"addEventListener"in window?a.addEventListener(b,c,!1):"attachEvent"in window&&a.attachEvent("on"+b,c)}function c(a,b,c){"removeEventListener"in window?a.removeEventListener(b,c,!1):"detachEvent"in window&&a.detachEvent("on"+b,c)}function d(){var a,b=["moz","webkit","o","ms"];for(a=0;ab&&(e=b,h(V,"Set "+d+" to max value")),U[d]=""+e}function g(){function b(){function a(){var a=0,b=!1;for(h(V,"Checking connection is from allowed list of origins: "+d);aR[y]["max"+a])throw new Error("Value for min"+a+" can not be greater than max"+a)}b("Height"),b("Width"),a("maxHeight"),a("minHeight"),a("maxWidth"),a("minWidth")}function f(){var a=d&&d.id||U.id+H++;return null!==document.getElementById(a)&&(a+=H++),a}function g(a){return T=a,""===a&&(c.id=a=f(),I=(d||{}).log,T=a,h(a,"Added missing iframe ID: "+a+" ("+c.src+")")),a}function i(){switch(h(y,"IFrame scrolling "+(R[y]&&R[y].scrolling?"enabled":"disabled")+" for "+y),c.style.overflow=!1===(R[y]&&R[y].scrolling)?"hidden":"auto",R[y]&&R[y].scrolling){case"omit":break;case!0:c.scrolling="yes";break;case!1:c.scrolling="no";break;default:c.scrolling=R[y]?R[y].scrolling:"no"}}function k(){"number"!=typeof(R[y]&&R[y].bodyMargin)&&"0"!==(R[y]&&R[y].bodyMargin)||(R[y].bodyMarginV1=R[y].bodyMargin,R[y].bodyMargin=R[y].bodyMargin+"px")}function l(){var a=R[y]&&R[y].firstRun,b=R[y]&&R[y].heightCalculationMethod in Q;!a&&b&&s({iframe:c,height:0,width:0,type:"init"})}function m(){Function.prototype.bind&&R[y]&&(R[y].iframe.iFrameResizer={close:o.bind(null,R[y].iframe),removeListeners:n.bind(null,R[y].iframe),resize:v.bind(null,"Window resize","resize",R[y].iframe),moveToAnchor:function(a){v("Move to anchor","moveToAnchor:"+a,R[y].iframe,y)},sendMessage:function(a){a=JSON.stringify(a),v("Send Message","message:"+a,R[y].iframe,y)}})}function p(d){function e(){v("iFrame.onload",d,c,a,!0),l()}b(c,"load",e),v("init",d,c,a,!0)}function q(a){if("object"!=typeof a)throw new TypeError("Options is not an object")}function r(a){for(var b in U)U.hasOwnProperty(b)&&(R[y][b]=a.hasOwnProperty(b)?a[b]:U[b])}function t(a){return""===a||"file://"===a?"*":a}function u(a){a=a||{},R[y]={firstRun:!0,iframe:c,remoteHost:c.src.split("/").slice(0,3).join("/")},q(a),r(a),R[y]&&(R[y].targetOrigin=!0===R[y].checkOrigin?t(R[y].remoteHost):"*")}function x(){return y in R&&"iFrameResizer"in c}var y=g(c.id);x()?j(y,"Ignored iFrame, already setup."):(u(d),i(),e(),k(),p(w(y)),m())}function y(a,b){null===S&&(S=setTimeout(function(){S=null,a()},b))}function z(a,b,c){V[c]||(V[c]=setTimeout(function(){V[c]=null,a()},b))}function A(){function a(){function a(a){function b(b){return"0px"===(R[a]&&R[a].iframe.style[b])}function c(a){return null!==a.offsetParent}R[a]&&c(R[a].iframe)&&(b("height")||b("width"))&&v("Visibility change","resize",R[a].iframe,a)}for(var b in R)a(b)}function b(b){h("window","Mutation observed: "+b[0].target+" "+b[0].type),y(a,16)}function c(){var a=document.querySelector("body"),c={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new d(b).observe(a,c)}var d=window.MutationObserver||window.WebKitMutationObserver;d&&c()}function B(a){function b(){D("Window "+a,"resize")}h("window","Trigger event: "+a),y(b,16)}function C(){function a(){D("Tab Visable","resize")}"hidden"!==document.visibilityState&&(h("document","Trigger event: Visiblity change"),y(a,16))}function D(a,b){function c(a){return R[a]&&"parent"===R[a].resizeFrom&&R[a].autoResize&&!R[a].firstRun}for(var d in R)c(d)&&v(a,b,document.getElementById(d),d)}function E(){b(window,"message",l),b(window,"resize",function(){B("resize")}),b(document,"visibilitychange",C),b(document,"-webkit-visibilitychange",C),b(window,"focusin",function(){B("focus")}),b(window,"focus",function(){B("focus")})}function F(){function b(a,b){function c(){if(!b.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==b.tagName.toUpperCase())throw new TypeError("Expected