1(function($) { 2 3 $.fn.initGalleryFancybox = function() { 4 $('a.fancy-gallery', this).fancybox({ 5 caption : function( instance, item ) { 6 var slideInfo = $('.slide-info', this); 7 if ($('> *', slideInfo).length) { 8 return slideInfo.clone().html(); 9 } 10 }, 11 onInit: function(instance) { 12 instance.$refs.caption.addClass('fancybox-title'); 13 instance.$refs.caption.parent().addClass('slideinfo'); 14 } 15 }); 16 }; 17 18 $.fn.initPortfolioFancybox = function() { 19 $('[data-fancybox="thegem-portfolio"]', this).fancybox(); 20 }; 21 22 $.fn.initBlogFancybox = function() { 23 $('a.fancy, .fancy-link-inner a', this).fancybox(); 24 25 $('.blog article a.youtube, .blog article a.vimeo', this).fancybox({ 26 type: 'iframe' 27 }); 28 }; 29 30 $.fn.initProductFancybox = function() { 31 let isTouch = window.gemSettings.isTouch; 32 33 $('a.fancy-product-gallery', this).fancybox({ 34 arrows: isTouch ? false : true, 35 infobar: true, 36 clickOutside: 'close', 37 buttons: [ 38 'zoom', 39 'fullScreen', 40 'thumbs', 41 'close', 42 ], 43 touch: { 44 vertical: false, 45 momentum : false 46 }, 47 loop : true, 48 animationDuration: 300, 49 backFocus: false, 50 mobile: { 51 fullScreen: false, 52 arrows: false, 53 animationEffect : 'fade', 54 buttons: [ 55 'zoom', 56 'fullScreen', 57 'close', 58 ], 59 clickContent: function(current, event) { 60 return current.type === "image" ? "zoom" : false; 61 }, 62 clickSlide: function(current, event) { 63 return "close"; 64 }, 65 }, 66 }); 67 }; 68 69 $(document).initGalleryFancybox(); 70 $(document).initPortfolioFancybox(); 71 $(document).initBlogFancybox(); 72 $(document).initProductFancybox(); 73 74 $('a.fancy, .fancy-link-inner a').fancybox(); 75})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.