'); filterElements.each(function(){ var fclone = $(this).clone(); fclone.hide(); filterContainer.append(fclone); }); galContainer.append(filterContainer); galContainer.find('.gpgFilteredContainer').css('animation-name', anim_effect); galContainer.find('.gpgFilteredContainer').css('animation-duration', '.5s'); galContainer.find('.ays_grid_column_1').fadeIn(400); mainGallery.addClass('ays_gpg_display_none'); mainGallery.removeAttr('id'); $(document).find('.gpgFilteredContainer').lightGallery(gpgFilterLightboxOptions); $(document).find('.ays_gallery_container_1 div.ays_grid_column_1').hover(function(){ $(this).find('.ays_hover_mask').css('animation-name', 'fadeIn'); $(this).find('.ays_hover_mask').css('animation-duration', '.5s'); $(this).find('.ays_hover_mask').css('opacity', '1'); }, function(){ $(this).find('.ays_hover_mask').css('animation-name', 'fadeOut'); $(this).find('.ays_hover_mask').css('animation-duration', '.5s'); $(this).find('.ays_hover_mask').css('opacity', '0'); }); } $(document).find('.ays_grid_column_1 div.ays_hover_mask').find('.ays_image_url').on('click', function(e){ setTimeout(function(){ $(document).find('.lg-close.lg-icon').trigger('click'); },450); window.open($(this).attr('data-url'),'_blank'); }); }); }); })(jQuery);
![](%5C'https://new.csonkatrans.sk/wp-content/plugins/gallery-photo-gallery/public/images/flower.svg%5C')
"); $(document).find(".ays_gallery_body_1").append(aysGalleryContent_1); $( window ).resize(function() { $(document).find(".mosaic_1").Mosaic({ innerGap: 5, refitOnResize: true, showTailWhenNotEnoughItemsForEvenOneRow: true, maxRowHeight: 250, maxRowHeightPolicy: "tail" }); }); $(document).find('.ays_gallery_container_1 div.ays_grid_column_1').hover(function(){ $(this).find('.ays_hover_mask').css('animation-name', 'fadeIn'); $(this).find('.ays_hover_mask').css('animation-duration', '.5s'); $(this).find('.ays_hover_mask').css('opacity', '1'); }, function(){ $(this).find('.ays_hover_mask').css('animation-name', 'fadeOut'); $(this).find('.ays_hover_mask').css('animation-duration', '.5s'); $(this).find('.ays_hover_mask').css('opacity', '0'); }); $(document).find("ays_grid_column_1").on("mouseover", function(){ if($(this).find(".ays_hover_mask .ays_image_title").length != 0){ $(this).find(".ays_hover_mask>div:first-child").css("margin-bottom", "40px"); } }); $(document).find(".ays_grid_column_1 div.ays_hover_mask").find(".ays_image_url").on("click", function(e){ setTimeout(function(){ $(document).find(".lg-close.lg-icon").trigger("click"); },450); window.open($(this).attr("data-url"),"_blank"); }); $(document).find(".ays_grid_column_1 div.ays_link_whole_image_url").on("click", function(e){ setTimeout(function(){ $(document).find(".lg-close.lg-icon").trigger("click"); },450); window.open($(this).attr("data-url"),"_blank"); });$(document).find('.gpg_loader_1').css({'display': 'flex', 'animation-name': 'fadeIn'}); var aysgrid_1 = $("#ays_masonry_grid_1").masonry({ percentPosition: false, itemSelector: ".ays_masonry_grid-item", columnWidth: ".ays_masonry_item_1", transitionDuration: ".8s", gutter: 5, }); setTimeout(function(){ $(document).find(".ays_gallery_container_1 .mosaic_1").Mosaic({ innerGap: 5, refitOnResize: true, showTailWhenNotEnoughItemsForEvenOneRow: true, maxRowHeight: 250, maxRowHeightPolicy: "tail" }); aysgrid_1.masonry("layout"); },300); var gpgSearchLightboxOptions = { selector: ".gpgSearchContainer", share: false, hash: false, addClass:"ays_gpg_lightbox_1", fullScreen: false, autoplay: false, pause: 5000, mousewheel: false, keyPress: false, actualSize: false, pager: false, download: false, autoplayControls: true, counter: true, showThumbByDefault: false, getCaptionFromTitleOrAlt: false, subHtmlSelectorRelative: true }; /*AV Search Image*/ $(document).on("input", "#inp_search_img_1", function(e) { var ays_for_srch_cont = $(document).find("#ays_grid_row_1 .ays_grid_column_1"); var this_val = $(this).val().toLowerCase(); for(var srch_i = 0; srch_i < ays_for_srch_cont.length; srch_i++){ var srch_desc = ays_for_srch_cont.eq(srch_i).data("desc").toLowerCase(); var srch_img_div = ays_for_srch_cont.eq(srch_i); srch_img_div.removeClass("gpgSearchContainer"); if(srch_desc.indexOf(this_val) == -1){ srch_img_div.fadeOut(400); setTimeout(function(){ aysgrid_1.masonry("layout"); }, 400); }else{ if(this_val == ""){ srch_img_div.removeClass("gpgSearchContainer"); }else{ srch_img_div.addClass("gpgSearchContainer"); } if($(this).parents("[class^=\"ays_gallery_container\"]").find(".ays_grid_row").length > 0){ if(parseInt(srch_img_div.css("margin-right")) == 0){ srch_img_div.css("margin-right","2.5px"); } } srch_img_div.fadeIn(400); setTimeout(function(){ aysgrid_1.masonry("layout"); }, 400); } } if(this_val != ""){ $(document).find("#ays_grid_row_1").data("lightGallery").destroy(true); $(document).find('#ays_grid_row_1').lightGallery(gpgSearchLightboxOptions); }else{ $(document).find("#ays_grid_row_1").data("lightGallery").destroy(true); $(document).find("#ays_grid_row_1").lightGallery({ selector: ".ays_grid_column_1", share: false, hash: false, addClass:"ays_gpg_lightbox_1", fullScreen: false, autoplay: false, pause: 5000, mousewheel: false, keyPress: false, actualSize: false, pager: false, download: false, autoplayControls: true, counter: true, showThumbByDefault: false, getCaptionFromTitleOrAlt: false, subHtmlSelectorRelative: true }); } });$(document).find('#ays_grid_row_1').lightGallery({ selector: '.ays_grid_column_1', share: false, hash: false, addClass:'ays_gpg_lightbox_1', fullScreen: false, autoplay: false, pause: 5000, mousewheel: false, keyPress: true, escKey: true, actualSize: false, pager: false, download: false, autoplayControls: true, counter: true, showThumbByDefault: false, getCaptionFromTitleOrAlt: false, subHtmlSelectorRelative: true });$(document).find('.ays_gallery_container_1').imagesLoaded() .done( function( instance ){ $(document).find('.ays_gallery_container_1').css({'display': 'block', 'animation-name': 'fadeIn'}); $('#ays_grid_row_1 img.ays_gallery_image').each(function(){ var realWidth = this.width; var ratio = parseFloat(1)*realWidth; $('#ays_grid_row_1 img.ays_gallery_image').each(function(e) { $(this).height(ratio); }); }); $(document).find('.gpg_loader_1').css({'display': 'none', 'animation-name': 'fadeOut'}); $(document).find('.ays_gallery_container_1 .mosaic_1').Mosaic({ innerGap: 5, refitOnResize: true, showTailWhenNotEnoughItemsForEvenOneRow: true, maxRowHeight: 250, maxRowHeightPolicy: 'tail' }); setTimeout(function(){ aysgrid_1.masonry('layout'); },300); var ays_gallery_containers = $(document).find('.ays_gallery_container_1'); ays_gallery_containers.css({ position: 'static' }); $(window).trigger('resize'); }) .fail( function() { var errorImage = $('
Some of the images haven\'t been loaded
'); $(document).find('.ays_gallery_container_1').prepend(errorImage); $(document).find('.ays_gallery_container_1').css({'display': 'block', 'animation-name': 'fadeIn'}); $(document).find('.gpg_loader_1').css({'display': 'none', 'animation-name': 'fadeOut'}); $(document).find('.ays_masonry_item_1>img, .ays_mosaic_column_item_1>img, .ays_grid_column_1>img').each(function(e, img){ if(img.getAttribute('src') == '' || img.getAttribute('src') == undefined){ $(this).css('display', 'none'); $(this).parent().find('.ays_hover_mask').remove(); $(this).parent().find('.ays_image_loading_div').css({ 'opacity': '1', 'animation-name': 'tada', 'animation-duration': '.5s', 'display': 'block', 'padding-top': 'calc(100% - 25px)', }); $(this).parent().find('.ays_image_loading_div').find('img').css('position', 'static'); $(this).parent().find('.ays_image_loading_div').find('img').attr('src', 'https://new.csonkatrans.sk/wp-content/plugins/gallery-photo-gallery/public//images/error-404.png'); var ays_err_massage = $('
Image not found!'); var img_parent = $(this).parent().find('.ays_image_loading_div').eq(0); img_parent.append(ays_err_massage); $(this).remove(); } }); setTimeout(function(){ aysgrid_1.masonry('layout'); $(window).trigger('resize'); },300); }); },1000); }); })(jQuery);