jQuery(document).ready(function($){
$("div").find('[data-elementor-type="wp-page"]').addClass("page-without-header");
$("#mm-0").addClass("mm-menu_fx-menu-slide mm-menu_fx-panels-slide-100 mm-menu_fx-listitems-slide");
var strHash=window.location.hash.toString();
if(strHash.length > 0){
setTimeout(function (){
var target=$(strHash);
var offsetY=$('.stickyheader').height()+16;
var posY=target.offset().top - offsetY;
$('html,body').animate({scrollTop: posY}, 500);
}, 1000);
}});
jQuery(document).ready(function($){
$("body").on("click",".eael-accordion-list",function(e){
if($(window).width() > 1024)
$('html,body').stop().animate({scrollTop: $(this).offset().top-138}, 800);
else if($(window).width() > 767)
$('html,body').stop().animate({scrollTop: $(this).offset().top-120}, 800);
else
$('html,body').stop().animate({scrollTop: $(this).offset().top-84}, 800);
});
});
jQuery(document).ready(function($){
$('.image-overlay img').each(function(){
var ttl=$(this).attr('alt');
$(this).wrap('<div class="overlay-cont"></div>');
$(this).after('<div class="overlay1" title="'+ttl+'"><div class="overlay1-text">'+ttl+'</div></div>');
});
$('.image-header').append('<div class="wrap-ribbon"><div class="ribbon">QUALITÄT</div></div>');
$('.post-gal').find('img').addClass('post-gal-img');
$('img.post-gal').addClass('post-gal-img');
$('.post-gal a').attr('data-elementor-lightbox-slideshow','1234567');
$('img.post-gal').parent('a').attr('data-elementor-lightbox-slideshow','1234567');
$('img.post-gal').each(function(){
$(this).parent('a').attr('data-elementor-lightbox-title', $(this).prop('title'));
});
var indx=0;
$('.post-gal-img').each(function(){
$(this).attr('post-gal-index', indx);
indx++;
});
$('body').on('keydown', function(e){
if(e.keyCode==37||e.keyCode==39){
scroll_image(1);
}});
$("body").on("click", ".elementor-swiper-button", function(){
scroll_image(1);
});
$("body").on("mouseup", ".swiper-container", function(){
scroll_image(1);
});
$('body').on("touchmove", ".swiper-container", function(){
scroll_image(1);
});
$('.post-gal-img').click(function(){
scroll_image(0);
});
function scroll_image(x){
setTimeout(function(){
if(x==0)
$('.swiper-slide').addClass('scroll-img');
var sw_ind=$('.swiper-slide-active.elementor-lightbox-item.scroll-img').attr('data-swiper-slide-index');
$('.post-gal-img').each(function(){
if($(this).attr('post-gal-index')==sw_ind){
if($(window).width() > 1024)
$('html,body').stop().animate({scrollTop: $(this).offset().top-200}, 800);
else if($(window).width() > 767)
$('html,body').stop().animate({scrollTop: $(this).offset().top-180}, 800);
else
$('html,body').stop().animate({scrollTop: $(this).offset().top-140}, 800);
}});
}, 500);
}});