1jQuery(document).ready(function($) { 2 3 // The number of the next page to load (/page/x/). 4 var pageNum = parseInt(pbd_alp.startPage) + 1; 5 6 // The maximum number of pages the current query can return. 7 var max = parseInt(pbd_alp.maxPages); 8 9 // The link of the next page of posts. 10 var nextLink = pbd_alp.nextLink; 11 // Text 1. 12 var textLb1 = pbd_alp.textLb1; 13 // Text 2. 14 var textLb2 = pbd_alp.textLb2; 15 // check link. 16 var ot_permali = pbd_alp.ot_permali; 17 // Quick view. 18 var quick_view = pbd_alp.quick_view; 19 /** 20 * Replace the traditional navigation with our own, 21 * but only if there is at least one page of new posts to load. 22 */ 23 if(pageNum <= max) { 24 // Insert the "More Posts" link. 25 $('.tm_load_ajax') 26 .append('<div class="ajax-load-post pbd-alp-placeholder-'+ pageNum +'"></div>') 27 .append('<p id="pbd-alp-load-posts"><a href="#" class="light-button btn btn-default btn-lg btn-block">'+ textLb1 +'...</a></p>'); 28 29 // Remove the traditional navigation. 30 $('.navigation').remove(); 31 } 32 33 34 /** 35 * Load new posts when the link is clicked. 36 */ 37 $('#pbd-alp-load-posts a').click(function() { 38 39 // Are there more posts to load? 40 if(pageNum <= max) { 41 42 // Show that we're working. 43 $(this).text(textLb2+'...'); 44 45 $('.pbd-alp-placeholder-'+ pageNum).load(nextLink + ' .post_ajax_tm', 46 function() { 47 // Update page number and nextLink. 48 if (history.pushState) { 49 history.pushState(null, "", nextLink); 50 } 51 pageNum++; 52 if(ot_permali){ 53 nextLink = nextLink.replace(/\/page\/[0-9]?/, '/page/'); 54 nextLink = nextLink.replace(/\/page\/[0-9]?/, '/page/'+ pageNum); 55 } else { 56 //alert(pageNum); 57 nextLink = nextLink.replace(/paged\=[0-9]?/, 'paged='); 58 nextLink = nextLink.replace(/paged\=[0-9]?/, 'paged='+ pageNum); 59 //alert(nextLink); 60 } 61 // Add a new placeholder, for when user clicks again. 62 $('#pbd-alp-load-posts') 63 .before('<div class="ajax-load-post pbd-alp-placeholder-'+ pageNum +'"></div>') 64 65 // Update the button message. 66 if(pageNum <= max) { 67 $('#pbd-alp-load-posts a').text( textLb1+'...'); 68 } else { 69 $('#pbd-alp-load-posts a').css('display','none'); 70 } 71 72 if($('.blog-item .highlight').length > 0 && typeof highlight_searchquery !== 'undefined'){ 73 highlight_searchquery($('.search-listing-content').attr('data-search-query')); 74 } 75 } 76 ); 77 } else { 78 $('#pbd-alp-load-posts a').append('.'); 79 } 80 $(document).ajaxSuccess(function(){ 81 //jQuery(".html5lightbox").html5lightbox(); 82 jQuery(".youtube").colorbox({iframe:true, innerWidth:480, innerHeight:320}); 83 jQuery(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); 84 // Tooltip only Text 85 jQuery('.qv_tooltip').tooltipster({ 86 contentAsHTML: true, 87 position: 'right', 88 interactive: true, 89 fixedWidth:250, 90 //theme: 'tm-quickview' 91 }); 92 jQuery(".is-carousel").each(function(){ 93 var carousel_id = jQuery(this).attr('id'); 94 var carousel_effect = jQuery(this).data('effect')?jQuery(this).data('effect'):'scroll'; 95 var carousel_auto = jQuery(this).data('notauto')?false:true; 96 smartboxcarousel = jQuery(this).find(".smart-box-content"); 97 if(smartboxcarousel.length){ 98 smcarousel = smartboxcarousel.carouFredSel({ 99 responsive : true, 100 items : { 101 visible : 1, 102 width : 750, 103 height : "variable" 104 }, 105 circular: true, 106 infinite: true, 107 width : "100%", 108 height : "variable", 109 auto : false, 110 align : "left", 111 prev : { 112 button : "#"+carousel_id+" .prev", 113 key : "left" 114 }, 115 next : { 116 button : "#"+carousel_id+" .next", 117 key : "right" 118 }, 119 scroll : { 120 items : 1, 121 fx : carousel_effect 122 }, 123 swipe : { 124 onTouch : false, 125 onMouse : false, 126 items : 1 127 } 128 }).imagesLoaded( function() { 129 smcarousel.trigger("updateSizes"); 130 });
131 }//if length 132 133 simplecarousel = jQuery(this).find(".simple-carousel-content"); 134 if(simplecarousel.length){ 135 scarousel = simplecarousel.carouFredSel({ 136 responsive : true, 137 items : { 138 visible : 1, 139 width : 365, 140 height : "variable" 141 }, 142 circular: true, 143 infinite: true, 144 width : "100%", 145 auto : { 146 play : carousel_auto, 147 timeoutDuration : 2600, 148 duration : 600 149 }, 150 align : 'center', 151 pagination : "#"+carousel_id+" .carousel-pagination", 152 scroll : { 153 items : 1, 154 fx : "scroll", 155 }, 156 swipe : { 157 onTouch : true, 158 onMouse : false, 159 items : 1 160 } 161 }).imagesLoaded( function() { 162 scarousel.trigger("updateSizes"); 163 }); 164 }//if length 165 });//each 166// 167 }); 168 return false; 169 }); 170});
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.