aktuelles

Schließtage


document.addEventListener('DOMContentLoaded', function() { (function( $ ) { 'use strict'; let pbViewsFlag_2 = true; if ('default' == 'notification') { $(document).find('.ays-pb-modals').prependTo($(document.body)); } else { $(document).find('.ays-pb-modals:not(.ays-pb-modals.ays-pb-notification-modal)').appendTo($(document.body)); } let isMobile = false; let closePopupOverlay = 0; let isPageScrollDisabled = 0; let checkAnimSpeed = 1; let ays_pb_animation_close_speed = $(document).find('#ays_pb_animation_close_speed_2').val(); let ays_pb_effectIn_2 = $(document).find('#ays_pb_modal_animate_in_2').val(); let ays_pb_effectOut_2 = $(document).find('#ays_pb_modal_animate_out_2').val(); if (window.innerWidth < 768) { isMobile = true; closePopupOverlay = 0; isPageScrollDisabled = 0; checkAnimSpeed = 1; ays_pb_animation_close_speed = $(document).find('#ays_pb_animation_close_speed_mobile_2').val(); ays_pb_effectIn_2 = $(document).find('#ays_pb_modal_animate_in_mobile_2').val(); ays_pb_effectOut_2 = $(document).find('#ays_pb_modal_animate_out_mobile_2').val(); } let ays_pb_delayOpen_2 = parseInt($(document).find('.ays_pb_delay_2').val()); let ays_pb_scrollTop_2 = parseInt($(document).find('.ays_pb_scroll_2').val()); if (isMobile) { if (0) { ays_pb_scrollTop_2= parseInt($(document).find('.ays_pb_scroll_mobile_2').val()); } if (0) { ays_pb_delayOpen_2 = parseInt($(document).find('.ays_pb_delay_mobile_2').val()); } } let time_pb_2 = $(document).find('.ays_pb_timer_2 span').data('seconds'), ays_pb_animation_close_seconds = (ays_pb_animation_close_speed / 1000); // Only show immediately for pageLoaded and both trigger types, not for exitIntent let actionType = 'pageLoaded'; if( (actionType == 'pageLoaded' || actionType == 'both') && ays_pb_delayOpen_2 == 0 && ays_pb_scrollTop_2 == 0){ $(document).find('.av_pop_modals_2').css('display','block'); } if (window.innerWidth < 768) { var mobileTimer = +$(document).find('.ays_pb_timer_2 span').attr('data-ays-mobile-seconds'); $(document).find('.ays_pb_timer_2 span').html(mobileTimer); time_pb_2 = mobileTimer; } ays_pb_animation_close_speed = parseFloat(ays_pb_animation_close_speed) - 50; $(document).find('.ays_pb_music_sound').css({'display':'none'}); if(time_pb_2 !== undefined){ if(time_pb_2 !== 0){ // Only run this timer for non-exitIntent triggers let currentActionType = 'pageLoaded'; if(currentActionType != 'exitIntent'){ $(document).find('#ays-pb-modal-checkbox_2').trigger('click'); if(ays_pb_scrollTop_2 == 0){ var ays_pb_flag = true; $(document).find('.ays-pb-modal_2').css({ 'animation-duration': ays_pb_animation_close_seconds + 's' }); let timer_pb_2 = setInterval(function(){ let newTime_pb_2 = time_pb_2--; $(document).find('.ays_pb_timer_2 span').text(newTime_pb_2); if(newTime_pb_2 <= 0){ $(document).find('.ays-pb-modal-close_2').trigger('click'); $(document).find('.ays-pb-modal_2').attr('class', 'ays-pb-modal ays-pb-modal_2 ays-pb-bg-styles_2 ays-pb-border-mobile_2 '+ays_pb_effectOut_2); if(ays_pb_effectOut_2 != 'none'){ setTimeout(function(){ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); }, ays_pb_animation_close_speed); }else{ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); } clearInterval(timer_pb_2); } $(document).find('.ays-pb-modal-close_2').one('click', function(){ if (pbViewsFlag_2) { var pb_id = 2; $.ajax({ url: pbLocalizeObj.ajax, method: 'POST', dataType: 'text', data: { id: pb_id, action: 'ays_increment_pb_views', }, }); pbViewsFlag_2 = false; } $(document).find('.av_pop_modals_2').css('pointer-events', 'none'); $(document).find('.ays-pb-modal_2').attr('class', 'ays-pb-modal ays-pb-modal_2 ays-pb-bg-styles_2 ays-pb-border-mobile_2 '+ays_pb_effectOut_2); $(this).parents('.ays-pb-modals').find('iframe').each(function(){ var key = /https:\/\/www.youtube.com/; var src = $(this).attr('src'); $(this).attr('src', $(this).attr('src')); }); $(this).parents('.ays-pb-modals').find('video.wp-video-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); $(this).parents('.ays-pb-modals').find('audio.wp-audio-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); var close_sound_src = $(document).find('#ays_pb_close_sound_2').attr('src'); if(checkAnimSpeed && typeof close_sound_src !== 'undefined' && 'off' === 'on'){ if(checkAnimSpeed !== 0){ var playPromise = $(document).find('#ays_pb_close_sound_2').get(0).play(); if (playPromise !== undefined) { playPromise.then(function() { audio.pause(); }).catch(function(error) { }); } } } if(ays_pb_effectOut_2 != 'none'){ setTimeout(function(){ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } }, ays_pb_animation_close_speed); }else{ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } } $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0', 'display': 'none'}); clearInterval(timer_pb_2); }); $(document).on('keydown', function(event) { if('1' && ays_pb_flag){ var escClosingPopups = $(document).find('.ays-pb-close-popup-with-esc:visible'); if (event.keyCode == 27) { var topmostPopup = escClosingPopups.last(); topmostPopup.find('.ays-pb-modal-close_2').trigger('click'); } } else { ays_pb_flag = true; } ays_pb_flag = false; }); },1000); if(closePopupOverlay && 'On' == 'On'){ $(document).find('.av_pop_modals_2').on('click', function(e) { var pb_parent = $(this); var pb_div = $(this).find('.ays-pb-modal_2'); if (!pb_div.is(e.target) && pb_div.has(e.target).length === 0){ $(document).find('.ays-pb-modal-close_2').click(); } }); } } } } else { $(document).find('.ays_pb_timer_2').css('display','none'); $(document).find('.ays-pb-modal_2').css({ 'animation-duration': ays_pb_animation_close_seconds + 's' }); $(document).find('.ays-pb-modal-close_2').one('click', function(){ if (pbViewsFlag_2) { var pb_id = 2; $.ajax({ url: pbLocalizeObj.ajax, method: 'POST', dataType: 'text', data: { id: pb_id, action: 'ays_increment_pb_views', }, }); pbViewsFlag_2 = false; } $(document).find('.av_pop_modals_2').css('pointer-events', 'none'); $(document).find('.ays-pb-modal_2').attr('class', 'ays-pb-modal ays-pb-modal_2 ays-pb-bg-styles_2 ays-pb-border-mobile_2 '+ays_pb_effectOut_2); $(this).parents('.ays-pb-modals').find('iframe').each(function(){ var key = /https:\/\/www.youtube.com/; var src = $(this).attr('src'); $(this).attr('src', $(this).attr('src')); }); $(this).parents('.ays-pb-modals').find('video.wp-video-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); $(this).parents('.ays-pb-modals').find('audio.wp-audio-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); if(ays_pb_effectOut_2 != 'none'){ setTimeout(function(){ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } }, ays_pb_animation_close_speed); }else{ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } } $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0', 'display': 'none'}); }); } } let count = 0; if( ays_pb_scrollTop_2 !== 0 ){ $(window).scroll(function() { if(($(this).scrollTop() >= ays_pb_scrollTop_2) && (count === 0)) { count++; if( ays_pb_delayOpen_2 !== 0 ){ $(document).find('.ays-pb-modal_2').css('animation-delay', ays_pb_delayOpen_2/1000); setTimeout(function(){ $(document).find('.av_pop_modals_2').css('display','block'); $(document).find('.ays-pb-modal_2').addClass(ays_pb_effectIn_2); $(document).find('.ays-pb-modal_2').css('display', 'block'); if (window.innerWidth < 768 && $(document).find('#ays-pb-screen-shade_2').attr('data-mobile-overlay') == 'true') { $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.5'}); } else{ $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.500000'}); } $(document).find('.ays-pb-modal-check_2').prop('checked', true); }, ays_pb_delayOpen_2); }else{ $(document).find('.av_pop_modals_2').css('display','block'); $(document).find('.ays-pb-modal_2').addClass(ays_pb_effectIn_2); $(document).find('.ays-pb-modal_2').css('display', 'block'); if (window.innerWidth < 768 && $(document).find('#ays-pb-screen-shade_2').attr('data-mobile-overlay') == 'true') { $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.5'}); } else{ $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.500000'}); } $(document).find('.ays-pb-modal-check_2').prop('checked', true); } if('false' == 'true' && window.innerWidth < 768){ if(0 != 0 && 'off' != 'on'){ let close_button_delay_for_mobile = 0; if (ays_pb_delayOpen_2 != 0) { close_button_delay_for_mobile += Math.floor(ays_pb_delayOpen_2); } $(document).find('.ays-pb-modal-close_2').css({'display': 'none'}); setTimeout(function(){ $(document).find('.ays-pb-modal-close_2').css({'display': 'block'}); }, close_button_delay_for_mobile ); } } else { if(0 != 0 && 'off' != 'on'){ let close_button_delay = 0; if (ays_pb_delayOpen_2 != 0) { close_button_delay += Math.floor(ays_pb_delayOpen_2); } $(document).find('.ays-pb-modal-close_2').css({'display': 'none'}); setTimeout(function(){ $(document).find('.ays-pb-modal-close_2').css({'display': 'block'}); }, close_button_delay ); } } if(20 != 0){ $(document).find('.ays-pb-modal_2').css({ 'animation-duration': ays_pb_animation_close_seconds + 's' }); let timer_pb_2 = setInterval(function(){ let newTime_pb_2 = time_pb_2--; $(document).find('.ays_pb_timer_2 span').text(newTime_pb_2); if(newTime_pb_2 <= 0){ $(document).find('.ays-pb-modal-close_2').trigger('click'); $(document).find('.ays-pb-modal_2').attr('class', 'ays-pb-modal ays-pb-modal_2 '+ays_pb_effectOut_2); if(ays_pb_effectOut_2 != 'none'){ setTimeout(function(){ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); }, ays_pb_animation_close_speed); }else{ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); } clearInterval(timer_pb_2); } $(document).find('.ays-pb-modal-close_2').one('click', function(){ if (pbViewsFlag_2) { var pb_id = 2; $.ajax({ url: pbLocalizeObj.ajax, method: 'POST', dataType: 'text', data: { id: pb_id, action: 'ays_increment_pb_views', }, }); pbViewsFlag_2 = false; } $(document).find('.av_pop_modals_2').css('pointer-events', 'none'); $(document).find('.ays-pb-modal_2').attr('class', 'ays-pb-modal ays-pb-modal_2 ays-pb-bg-styles_2 ays-pb-border-mobile_2 '+ays_pb_effectOut_2); $(this).parents('.ays-pb-modals').find('iframe').each(function(){ var key = /https:\/\/www.youtube.com/; var src = $(this).attr('src'); $(this).attr('src', $(this).attr('src')); }); $(this).parents('.ays-pb-modals').find('video.wp-video-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); $(this).parents('.ays-pb-modals').find('audio.wp-audio-shortcode').each(function(){ if(typeof $(this).get(0) != 'undefined'){ if ( ! $(this).get(0).paused ) { $(this).get(0).pause(); } } }); if(ays_pb_effectOut_2 != 'none'){ setTimeout(function(){ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } }, ays_pb_animation_close_speed); }else{ $(document).find('.ays-pb-modal_2').css('display', 'none'); $(document).find('.av_pop_modals_2').css('display', 'none'); $(document).find('.ays-pb-modal_2').attr('data-ays-flag','true'); if($('#ays_pb_close_sound_2').get(0) != undefined){ if(!$('#ays_pb_close_sound_2').get(0).paused){ $(document).find('.ays-pb-modal_2').css('display', 'none'); var audio = $('#ays_pb_close_sound_2').get(0); audio.pause(); audio.currentTime = 0; } } } $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0', 'display': 'none'}); clearInterval(timer_pb_2); }); var ays_pb_flag = true; $(document).on('keydown', function(event) { if('1' && ays_pb_flag){ var escClosingPopups = $(document).find('.ays-pb-close-popup-with-esc:visible'); if (event.keyCode == 27) { var topmostPopup = escClosingPopups.last(); topmostPopup.find('.ays-pb-modal-close_2').trigger('click'); ays_pb_flag = false; } } else { ays_pb_flag = true; } }); },1000); } } }); }else{ // Only show automatically for pageLoaded and both trigger types, not for exitIntent let actionType = $(document).find('.ays_pb_abt_2').val(); if(actionType != 'exitIntent'){ if( ays_pb_delayOpen_2 !== 0 ){ $(document).find('.ays-pb-modal_2').css('animation-delay', ays_pb_delayOpen_2/1000); setTimeout(function(){ $(document).find('.av_pop_modals_2').css('display','block'); $(document).find('.ays-pb-modal_2').addClass(ays_pb_effectIn_2); $(document).find('.ays-pb-modal_2').css('display', 'block'); if (window.innerWidth < 768 && $(document).find('#ays-pb-screen-shade_2').attr('data-mobile-overlay') == 'true') { $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.5'}); } else{ $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.500000'}); } $(document).find('.ays-pb-modal-check_2').attr('checked', 'checked'); if(isPageScrollDisabled){ $(document).find('body').addClass('pb_disable_scroll_2'); $(document).find('html').removeClass('pb_enable_scroll'); } }, ays_pb_delayOpen_2); } else { if($(document).find('.ays_pb_abt_2').val() != 'clickSelector'){ $(document).find('.av_pop_modals_2').css('display','block'); $(document).find('.ays-pb-modal_2').addClass(ays_pb_effectIn_2); $(document).find('.ays-pb-modal_2').css('display', 'block'); if (window.innerWidth < 768 && $(document).find('#ays-pb-screen-shade_2').attr('data-mobile-overlay') == 'true') { $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.5'}); } else{ $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0.500000'}); } $(document).find('.ays-pb-modal-check_2').attr('checked', 'checked'); if(isPageScrollDisabled){ $(document).find('body').addClass('pb_disable_scroll_2'); $(document).find('html').addClass('pb_disable_scroll_2'); } } } } } if ('On' != 'On'){ $(document).find('#ays-pb-screen-shade_2').css({'opacity': '0', 'display': 'none !important', 'pointer-events': 'none', 'background': 'none'}); $(document).find('.ays-pb-modal_2').css('pointer-events', 'auto'); $(document).find('.av_pop_modals_2').css('pointer-events','none'); }; if($(document).find('.ays-pb-modals video').hasClass('wp-video-shortcode')){ var videoWidth = $(document).find('.ays-pb-modals video.wp-video-shortcode').attr('width'); var videoHeight = $(document).find('.ays-pb-modals video.wp-video-shortcode').attr('height'); setTimeout(function(){ $(document).find('.ays-pb-modals .wp-video').removeAttr('style'); $(document).find('.ays-pb-modals .mejs-container').removeAttr('style'); $(document).find('.ays-pb-modals video.wp-video-shortcode').removeAttr('style'); $(document).find('.ays-pb-modals .wp-video').css({'width': '100%'}); $(document).find('.ays-pb-modals .mejs-container').css({'width': '100%','height': videoHeight + 'px'}); $(document).find('.ays-pb-modals video.wp-video-shortcode').css({'width': '100%','height': videoHeight + 'px'}); },1000); } if($(document).find('.ays-pb-modals iframe').attr('style') != ''){ setTimeout(function(){ $(document).find('.ays-pb-modals iframe').removeAttr('style'); },500); } // if(20 == 0){ if(closePopupOverlay && 'On' == 'On'){ $(document).find('.av_pop_modals_2').on('click', function(e) { var pb_parent = $(this); var pb_div = $(this).find('.ays-pb-modal_2'); if (!pb_div.is(e.target) && pb_div.has(e.target).length === 0){ $(document).find('.ays-pb-modal-close_2').click(); } }); } var ays_pb_flag = true; $(document).on('keydown', function(event) { if('1' && ays_pb_flag){ var escClosingPopups = $(document).find('.ays-pb-close-popup-with-esc:visible'); if (event.keyCode == 27) { var topmostPopup = escClosingPopups.last(); topmostPopup.find('.ays-pb-modal-close_2').trigger('click'); ays_pb_flag = false; } } else { ays_pb_flag = true; } }); // } if('off' == 'on') { var video = $(document).find('video.wp-video-shortcode'); for (let i = 0; i < video.length; i++) { video[i].addEventListener('ended', function() { if ($(this).next().val() === 'on') { $(this).parents('.ays_video_window').find('.close-image-btn').trigger('click'); } }); } } jQuery(document).on('click', '.ays-pb-modal-close_2', function() { $(document).find('body').removeClass('pb_disable_scroll_2'); $(document).find('html').removeClass('pb_disable_scroll_2'); }); })( jQuery ); });