(function($){$.fn.initGalleryFancybox=function(){$('a.fancy-gallery',this).fancybox({backFocus:!1,caption:function(instance,item){var slideInfo=$('.slide-info',this);if($('> *',slideInfo).length){return slideInfo.clone().html()}},onInit:function(instance){instance.$refs.caption.addClass('fancybox-title');instance.$refs.caption.parent().addClass('slideinfo')}})};$.fn.initPortfolioFancybox=function(){$('[data-fancybox="thegem-portfolio"]',this).fancybox()};$.fn.initBlogFancybox=function(){$('a.fancy, .fancy-link-inner a',this).fancybox();$('.blog article a.youtube, .blog article a.vimeo',this).fancybox({type:'iframe'})};$.fn.initProductFancybox=function(){let isTouch=window.gemSettings.isTouch;$('a.fancy-product-gallery',this).fancybox({arrows:isTouch?!1:!0,infobar:!0,clickOutside:'close',buttons:['zoom','fullScreen','thumbs','close',],touch:{vertical:!1,momentum:!1},loop:!0,animationDuration:300,backFocus:!1,mobile:{fullScreen:!1,arrows:!1,animationEffect:'fade',buttons:['zoom','fullScreen','close',],clickContent:function(current,event){return current.type==="image"?"zoom":!1},clickSlide:function(current,event){return"close"},},})};$(document).initGalleryFancybox();$(document).initPortfolioFancybox();$(document).initBlogFancybox();$(document).initProductFancybox();$('a.fancy, .fancy-link-inner a').fancybox()})(jQuery)