1(function($) { 2 function initBlogDefault() { 3 if (window.tgpLazyItems !== undefined) { 4 var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) { 5 initBlogDefault.call(node); 6 }); 7 if (!isShowed) { 8 return; 9 } 10 } 11 12 var $blog = $(this); 13 14 $('.blog-load-more', $blog.parent()).on('click', function() { 15 window.thegemBlogLoadMoreRequest($blog, $(this), false); 16 }); 17 18 $('.portfolio-navigator', $blog.parent()).on('click', 'a', function (e) { 19 e.preventDefault(); 20 var current_page = $blog.data('current-page') ? $blog.data('current-page') : 1; 21 var pages_count = $blog.data('pages-count'); 22 if ($(this).hasClass('current')) 23 return false; 24 var page; 25 if ($(this).hasClass('prev')) { 26 page = current_page - 1; 27 } else if ($(this).hasClass('next')) { 28 page = current_page + 1 29 } else { 30 page = $(this).data('page'); 31 } 32 if (page < 1) 33 page = 1; 34 if (page > pages_count) 35 page = pages_count; 36 $blog.data('next-page', page); 37 $(this).parents('.portfolio-navigator ').find('a').removeClass('current'); 38 $(this).parents('.portfolio-navigator ').find('a[data-page="' + page + '"]').addClass('current'); 39 $blog.data('current-page', page); 40 if (page === 1) { 41 $(this).parents('.portfolio-navigator ').find('a.prev').hide(); 42 } else { 43 $(this).parents('.portfolio-navigator ').find('a.prev').show(); 44 } 45 if (page == pages_count) { 46 $(this).parents('.portfolio-navigator ').find('a.next').hide(); 47 } else { 48 $(this).parents('.portfolio-navigator ').find('a.next').show(); 49 } 50 window.thegemBlogLoadMoreRequest($blog, $(this), false); 51 52 $("html, body").animate({scrollTop: $blog.offset().top - 200}, 600); 53 }); 54 55 window.thegemInitBlogScrollNextPage($blog, $blog.siblings('.blog-scroll-pagination')); 56 57 var itemsAnimations = $blog.itemsAnimations({ 58 itemSelector: 'article', 59 scrollMonitor: true 60 }); 61 itemsAnimations.show(); 62 63 window.thegemBlogImagesLoaded($blog, 'article:not(.format-gallery) img, article.format-gallery .gem-gallery-item:first-child img', function() { 64 $blog.prev('.preloader').remove(); 65 if ($blog.hasClass('blog-style-justified-2x') || $blog.hasClass('blog-style-justified-3x') || $blog.hasClass('blog-style-justified-4x')) { 66 window.thegemBlogOneSizeArticles($blog); 67 } 68 69 $blog.buildSimpleGalleries(); 70 $blog.updateSimpleGalleries(); 71 }); 72 } 73 74 $('.blog:not(body,.blog-style-timeline_new,.blog-style-masonry)').each(initBlogDefault); 75 76 $(window).on('resize', function(){ 77 $(".blog-style-justified-2x, .blog-style-justified-3x, .blog-style-justified-4x").each(function(){ 78 window.thegemBlogOneSizeArticles($(this)); 79 }); 80 }); 81 82})(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.