1$ = jQuery.noConflict(); 2$ = jQuery; 3 4$(document).ready(function() { 5 6 // Infinite Scroll and Masonry 7 if ($(".infinite-content.masonry").length > 0) { 8 var $grid = $(".infinite-content.masonry").masonry({ 9 itemSelector: ".item", 10 columnWidth: ".grid-sizer", 11 percentPosition: true, 12 horizontalOrder: true, 13 transitionDuration: "0.3s" 14 }); 15 var msnry = $grid.data("masonry"); 16 var $infiniteScrollContainer = $(".infinite-content").infiniteScroll({ 17 path: ".load-more-button a", 18 button: ".load-more-button a", 19 append: ".articles.infinite-content .item", 20 history: false, 21 outlayer: msnry, 22 loadOnScroll: false, 23 }); 24 var $loadMoreButton = $(".load-more-button a"); 25 $loadMoreButton.on( "click", function() { 26 $infiniteScrollContainer.infiniteScroll("loadNextPage"); 27 $infiniteScrollContainer.infiniteScroll( "option", { 28 loadOnScroll: true, 29 }); 30 $loadMoreButton.hide(); 31 }); 32 } 33 34 // Mirror image classes to parent div or figure 35 $(function() { 36 $(".text figure img,.text .image-wrap img").each(function(){ var theClasses = $(this).attr('class'); $(this).closest('div,figure').addClass(theClasses); }); 37 }); 38 39 // Navigation Dropdown Menu 40 $("nav.with-dropdown ul.menu > li, nav.with-dropdown ul.menu > li ul li, nav.with-dropdown ul.menu > li ul li ul li, nav.with-dropdown ul.menu > li ul li ul li ul li, nav.with-dropdown ul.menu > li ul li ul li ul li ul li").hover( 41 function(){ $("ul:first", this).css({display: 'block'}); }, 42 function(){ $("ul:first", this).css({display: 'none'}); } 43 ); 44 $("nav.with-dropdown ul.menu li ul").css({display: 'none'}); 45 46 // Loading animation 47 $(".nav-load-buttons a").click(function() { 48 $(".nav-load-buttons .loading").fadeToggle("fast").toggleClass("active"); 49 }); 50 51 // Fixed Menu Toggle 52 $("header .masterhead .nav.tablet-mobile-nav a.toggle,a.close-fixed-menu").click(function() { 53 $(".block.fixed-menu-container").toggleClass("active"); 54 $("body").toggleClass("no-scroll"); 55 $("#top").toggleClass("blur-active"); 56 }); 57 58 // Escape key action when #search is active 59 $(document.documentElement).keyup(function (event) { 60 if(window.location.hash == "#menu" && event.keyCode == 27) { // Escape Key Event 61 $(".block.fixed-menu-container").toggleClass("active"); 62 $("body").toggleClass("no-scroll"); 63 $("#top").toggleClass("blur-active"); 64 history.pushState("", document.title, window.location.pathname); // Remove Hash on Close 65 } 66 }); 67 68 // Remove #menu from URL on dimmer click 69 $("a.close-fixed-menu").click(function() { 70 history.pushState("", document.title, window.location.pathname); // Remove Hash on Close 71 }); 72 73 // Activate fixed menu if #menu exists in URL 74 if (window.location.hash == "#menu") { 75 $(".block.fixed-menu-container").toggleClass("active"); 76 $("body").toggleClass("no-scroll"); 77 $("#top").toggleClass("blur-active"); 78 } 79 80 // Search Toggle 81 $(".search-toggle a,a.content-search-toggle,a.close-search").click(function() { 82 $(".search-container").fadeToggle("fast"); 83 $(".search-container").toggleClass("active"); 84 $("body").toggleClass("no-scroll"); 85 $("#top").toggleClass("blur-active"); 86 $("#s").focus(); 87 }); 88 89 // Escape key action when #search is active 90 $(document.documentElement).keyup(function (event) { 91 if(window.location.hash == "#search" && event.keyCode == 27) { // Escape Key Event 92 $(".search-container").fadeToggle("fast"); 93 $(".search-container").toggleClass("active"); 94 $("body").toggleClass("no-scroll"); 95 $("#top").toggleClass("blur-active"); 96 history.pushState("", document.title, window.location.pathname); // Remove Hash on Close 97 } 98 }); 99 100 // Remove #search from URL on dimmer click 101 $("a.close-search").click(function() { 102 history.pushState("", document.title, window.location.pathname); // Remove Hash on Close 103 }); 104 105 // Activate search if #search exists in URL 106 if (window.location.hash == "#search") { 107 $(".search-container").fadeToggle("fast"); 108 $(".search-container").toggleClass("active"); 109 $("body").toggleClass("no-scroll"); 110 $("#top").toggleClass("blur-active"); 111 $("#s").focus(); 112 } 113 114 /* // Progress Bar 115 var progress = $('#progress'), 116 slideshow = $( '#banner' ); 117 slideshow.on( 'cycle-initialized cycle-before', function( e, opts ) { 118 progress.stop(true).css( 'width', 0 ); 119 }); 120 slideshow.on( 'cycle-initialized cycle-after', function( e, opts ) { 121 if ( ! slideshow.is('.cycle-paused') ) 122 progress.animate({ width: '100%' }, opts.timeout, 'linear' ); 123 }); 124 slideshow.on( 'cycle-paused', function( e, opts ) { 125 progress.stop(); 126 }); 127 slideshow.on( 'cycle-resumed', function( e, opts, timeoutRemaining ) { 128 progress.animate({ width: '100%' }, timeoutRemaining, 'linear' ); 129 }); 130 131 // Banner 132 $('#banner').cycle({ 133 'fx' : 'fade', 134 'slides' : '> li', 135 'delay' : 1, 136 'timeout' : 7000, 137 'speed' : 450, 138 'next' : '#banner-next', 139 'prev' : '#banner-previous', 140 'pager' : '#banner-pager', 141 'autoHeight' : false, 142 'pauseOnHover' : false, 143 'swipe' : true 144 }); */ 145 146 // Carousel (Ads) 147 $(".ad-carousel.owl-carousel").owlCarousel({ 148 loop: true, 149 slideBy : 1, 150 nav: false, 151 autoHeight: true, 152 autoplay: true, 153 autoplayTimeout: 5000, 154 autoplayHoverPause: false, 155 smartSpeed : 750, 156 responsive: { 157 0:{ items: 1 }, 158 321:{ items: 1 }, 159 481:{ items: 1 }, 160 641:{ items: 1 }, 161 769:{ items: 1 }, 162 901:{ items: 1 }, 163 1025:{ items: 1 }, 164 1281:{ items: 1 }, 165 1601:{ items: 1 }, 166 9999:{ items: 1 } 167 } 168 }); 169 170 // Carousel (Featured) 171 $(".featured .articles.owl-carousel").owlCarousel({ 172 loop: false, 173 rewind: true, 174 slideBy : 1, 175 nav: true, 176 autoHeight: true, 177 autoplay: true, 178 autoplayTimeout: 5000, 179 autoplayHoverPause: true, 180 smartSpeed : 3500, 181 navSpeed : 1000, 182 dotsSpeed : 1000, 183 responsive: { 184 0:{ items: 1 }, 185 321:{ items: 1 }, 186 481:{ items: 1 }, 187 641:{ items: 2 }, 188 769:{ items: 2 }, 189 901:{ items: 2 }, 190 1025:{ items: 2 }, 191 1281:{ items: 3 }, 192 1601:{ items: 3 }, 193 9999:{ items: 3 } 194 } 195 }); 196 197 // Content Blocks (Contained Width) 198 $(".block.carousel .articles-wrapper .articles").owlCarousel({ 199 loop: false, 200 rewind: true, 201 slideBy : 'page', 202 nav: true, 203 autoHeight: false, 204 responsive: { 205 0:{ items: 1 }, 206 321:{ items: 1 }, 207 481:{ items: 1 }, 208 641:{ items: 2 }, 209 769:{ items: 2 }, 210 901:{ items: 2 }, 211 1025:{ items: 3 }, 212 1281:{ items: 3 }, 213 1601:{ items: 3 }, 214 1921:{ items: 3 } 215 } 216 }); 217 218 // Content Blocks (Contained Width) 219 $(".articles.owl-carousel").owlCarousel({ 220 loop: true, 221 rewind: false, 222 slideBy : 'page', 223 nav: true, 224 autoHeight: true, 225 // autoplay: true, 226 // autoplayTimeout: 5000, 227 // autoplayHoverPause: true, 228 responsive: { 229 0:{ items: 1 }, 230 321:{ items: 1 }, 231 481:{ items: 1 }, 232 641:{ items: 2 }, 233 769:{ items: 2 }, 234 901:{ items: 2 }, 235 1025:{ items: 3 }, 236 1281:{ items: 3 }, 237 1601:{ items: 3 }, 238 1921:{ items: 3 } 239 } 240 }); 241 242 // Masonry 243 $(".masonry").masonry({ 244 itemSelector: ".item", 245 columnWidth: ".grid-sizer", 246 percentPosition: true, 247 horizontalOrder: true 248 }); 249 250 // Header Reduce 251 $(function() { 252 $(window).scroll(function() { 253 var c = $(window).scrollTop(); 254 if (c > 123) { 255 $(".masterhead").addClass("reduced"); 256 $(".page-wrapper").addClass("offset"); 257 $("body.single.slideshows .right").addClass("sticky"); 258 } else { 259 $(".masterhead").removeClass("reduced"); 260 $(".page-wrapper").removeClass("offset"); 261 $("body.single.slideshows .right").removeClass("sticky"); 262 } 263 }); 264 }); 265 266 // jQuery Tabs 267 $(".tabs").tabs(); 268 $(".tabs ul.tab-nav li a.masonry-refresh").click(function() { 269 // Masonry 270 $(".masonry").masonry({ 271 itemSelector: ".item", 272 columnWidth: ".grid-sizer", 273 percentPosition: true, 274 horizontalOrder: true 275 }); 276 }); 277 278 // Force all links in content area to open in new tab 279 $(document).ready(function(){ 280 $(".post .content .text a").not(".post .content .text a.close-sticky-video").not(".post .content .text .podcast-wrapper a").each(function() { 281 var a = new RegExp('/' + window.location.host + '/'); 282 if(!a.test(this.href)) { 283 $(this).click(function(event) { 284 event.preventDefault(); 285 event.stopPropagation(); 286 window.open(this.href, '_blank'); 287 }); 288 } 289 }); 290 }); 291 292 // Share Function 293 $(".share").click(function(g) { 294 g.preventDefault(); 295 var f = $(g.target).attr("href"); 296 var c = ($(window).height() / 2 - 225); 297 var d = ($(window).width() / 2 - 275); 298 window.open(f, "share", "height=550, width=550, top=" + c + ", left=" + d + ", title=yes, toolbar=no, location=no, menubar=no, directories=no, scrollbars=no, resizable=yes"); 299 return false;
300 }); 301 302 // Anchor Scroll 303 $(function() { 304 $('body.device-desktop a[href*="#"]:not(a.no-anchor-scroll):not([href="#"])').click(function() { 305 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 306 var target = $(this.hash); 307 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 308 if (target.length) { 309 $('html, body').animate({ 310 scrollTop: target.offset().top - 250 311 }, 500); 312 return false; 313 } 314 } 315 }); 316 }); 317 318 // Anchor Scroll 319 $(function() { 320 $('body.device-mobile-tablet a[href*="#"]:not(a.no-anchor-scroll):not([href="#"])').click(function() { 321 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 322 var target = $(this.hash); 323 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 324 if (target.length) { 325 $('html, body').animate({ 326 scrollTop: target.offset().top - 125 327 }, 500); 328 return false; 329 } 330 } 331 }); 332 }); 333 334 // Masonry adjust after async ads load 335 setTimeout(function(){ 336 $(".masonry").masonry({ 337 itemSelector: ".item", 338 columnWidth: ".grid-sizer", 339 percentPosition: true, 340 horizontalOrder: true 341 }); 342 }, 3500); 343 344}); 345 346// Window load functions 347$(window).on("load", function() { 348 349 // Masonry 350 $(".masonry").masonry({ 351 itemSelector: ".item", 352 columnWidth: ".grid-sizer", 353 percentPosition: true, 354 horizontalOrder: true 355 }); 356 357});
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.