/*
* Name : sub.js
* Version : 1.0.0
* Product : prime05
* Author : 1px studio
* Date : 2024.04.04
* Desc : -
---------------------------------------------------
*/
$(function(){null==document.getElementById("isIndex")&&(function e(){let t=window.location.href;return!!$(".breadcrumb-navbar .navbar-wrapper").length&&($(".breadcrumb-navbar .navbar-wrapper > li").each(function(){let e=$(this);t.indexOf(e.find(">a").attr("href"))>-1&&e.find(">a").addClass("active")}),!!$(".breadcrumb-navbar .navdepth-wrapper").length&&void $(".breadcrumb-navbar .navbar-wrapper > li").each(function(){let e=$(this);if(t.indexOf(e.find(">a").attr("href"))>-1){let a=e.find(">a");$(".breadcrumb-navbar .navdepth-wrapper").append('
'+a[0].innerText+"")}}))}(),$(".zoom-gallery").magnificPopup({delegate:"a",type:"image",closeOnContentClick:!1,closeBtnInside:!1,mainClass:"mfp-with-zoom mfp-img-mobile",image:{verticalFit:!0},gallery:{enabled:!0},zoom:{enabled:!0,duration:300,opener:function(e){return e.find("img")}}}),function e(){if($(".masonry-group").length){let t=$(".masonry-group");t.imagesLoaded(function(){t.isotope({itemSelector:".gallery-item",columnWidth:".grid-sizer",masonry:{gutter:20}})}),$(".category-button-wrapper .button-filter").on("click",e=>{e.preventDefault();let a=$(e.currentTarget),r=a.data("filter");$(".category-button-wrapper .button-filter").removeClass("active"),a.addClass("active"),t.isotope({filter:r})})}}(),function e(){let t=$("#youtubeModal"),a=t.find(".youtube-wrapper>iframe");$(".play-youtube").on("click",e=>{e.preventDefault();let r=$(e.currentTarget).attr("href").split("v=")[1];t.modal("show"),a.attr("src","https://www.youtube.com/embed/"+r)}),t.on("hidden.bs.modal",()=>{a.attr("src","")})}())});