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 $('a.fancy, .fancy-link-inner a', this).fancybox(); 20 21 $('.portfolio-item a.vimeo, .portfolio-item a.youtube', this).fancybox({ 22 type: 'iframe' 23 }); 24 25 $('.portfolio-item a.self_video', this).click(function(e) { 26 e.preventDefault(); 27 var $a = $(this); 28 $.fancybox.open({ 29 type: 'html', 30 maxWidth: 1200, 31 content: '<div id="fancybox-video"><video width="100%" height="100%" autoplay="autoplay" controls="controls" src="'+$a.attr('href')+'" preload="none"></video></div>', 32 afterShow: function(instance, current) { 33 $('video', current.$content).mediaelementplayer(); 34 } 35 }); 36 }); 37 }; 38 39 $.fn.initBlogFancybox = function() { 40 $('a.fancy, .fancy-link-inner a', this).fancybox(); 41 42 $('.blog article a.youtube, .blog article a.vimeo', this).fancybox({ 43 type: 'iframe' 44 }); 45 }; 46 47 $(document).initGalleryFancybox(); 48 $(document).initPortfolioFancybox(); 49 $(document).initBlogFancybox(); 50 51 $('a.fancy, .fancy-link-inner a').fancybox(); 52})(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.