1function getCookie(name) { 2 function escape(s) { return s.replace(/([.*+?\^$(){}|\[\]\/\\])/g, '\\$1'); } 3 var match = document.cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)')); 4 return match ? match[1] : null; 5} 6 7function SetCookie(c_name,value,expiredays) 8{ 9var exdate=new Date() 10exdate.setDate(exdate.getDate()+expiredays) 11document.cookie=c_name+ "=" +value+";path=/"+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) 12} 13 14function copyToClipboard(url) { 15 var $temp = jQuery("<input>"); 16 jQuery("body").append($temp); 17 $temp.val(url).select(); 18 document.execCommand("copy"); 19 $temp.remove(); 20} 21function getScrollBarWidth () { 22 var $outer = jQuery('<div>').css({visibility: 'hidden', width: 100, overflow: 'scroll'}).appendTo('body'), 23 widthWithScroll = jQuery('<div>').css({width: '100%'}).appendTo($outer).outerWidth(); 24 $outer.remove(); 25 return 100 - widthWithScroll; 26}; 27 28jQuery(function(){ 29 30 31 jQuery(".backtotop").click(function (event) { 32 33window.scrollTo({ top: 0, behavior: 'smooth' }); 34event.preventDefault(); 35 }); 36 37 jQuery(".copylink").click(function (event) { 38 39 event.preventDefault(); 40 copyToClipboard(jQuery(this).attr('href')); 41 if(jQuery(this).find('span').length == 0){ 42 jQuery(this).append('<span>Link copied</span>'); 43 } 44 45 jQuery(this).find('span').fadeOut(200).fadeIn(200).fadeOut(3000); 46 47 }); 48 49 50 jQuery(".copylink").click(function (event) { 51 52 53 }); 54 jQuery( ".mobilemenu .subnavshow" ).on('click mouseover', function (event) { 55 56 event.preventDefault(); 57 58 jQuery('.mainnav li').removeClass('active'); 59jQuery(this).parent('li').addClass('active'); 60 61 //jQuery( '.mobilemenu .mainnav li').removeClass('active'); 62 63 64 65 66}); 67 68 69 jQuery(".accordion-button").click(function (event) { 70 if(jQuery(this).hasClass('collapsed')){ 71 72jQuery(jQuery(this).data('bs-target')).addClass('show'); 73 jQuery(jQuery(this).data('bs-target')).attr("aria-expanded","true"); 74 jQuery(this).removeClass('collapsed'); 75 }else{ 76 jQuery(jQuery(this).data('bs-target')).removeClass('show'); 77 jQuery(this).addClass('collapsed'); 78jQuery(jQuery(this).data('bs-target')).attr("aria-expanded","false"); 79 } 80 81 82 }); 83 84 if(jQuery('.slider').length){ 85 86 87jQuery(".slider").flickity({ 88freeScroll: true, 89prevNextButtons: false, 90pageDots: false, 91wrapAround: true, 92imagesLoaded: true, 93lazyLoad: 3 94 }); 95 96 97 98 99} 100 101 if(jQuery('.tribe-events-widget-events-list__events').length){ 102 103 104jQuery(".tribe-events-widget-events-list__events").flickity({ 105freeScroll: true, 106prevNextButtons: false, 107pageDots: false, 108wrapAround: true, 109imagesLoaded: true, 110lazyLoad: 3 111 }); 112 113 114} 115 116 jQuery('.newsstory .loadimage').css('opacity',1); 117 jQuery('.newsstory .fullimage').css('opacity',0); 118 119 120 jQuery('.newsstory .fullimage').imagesLoaded( function() { 121 jQuery('.newsstory .fullimage').css('opacity',1); 122 }); 123 124 125jQuery('.foliosearch .searchterms').on('input', function(e) { 126 if('' == this.value) { 127 jQuery('#suggestionBox').html(''); 128 jQuery('#suggestionBox').removeClass('found'); 129 130 } 131}); 132 133 jQuery(document) 134 .ajaxStart(function () { 135 // jQuery('#loading').show(); 136 137 }) 138 .ajaxStop(function () { 139 140 jQuery('select').not('.acf-gallery-sort,#media-attachment-date-filters,#media-attachment-filters,select.multiple,.acf-input select').select2(); 141 142 jQuery('.foliodropdowns select').on('change', function() { 143 if(!jQuery('body').hasClass('wiaentries')){ 144 if(this.value ){ 145 window.location.href = this.value ; 146 } 147 } 148 }); 149 150 }); 151 152 153 154jQuery('select').on('select2:open', function (e) { 155jQuery(this).parent('.selector').addClass('active'); 156 157}); 158 159jQuery('select').on('select2:close ', function (e) { 160jQuery(this).parent('.selector').removeClass('active'); 161 162}); 163 164 165 jQuery(".searchterms").keyup(function () { 166 jQuery("#searchform h1,#searchform h2").css('display','none'); 167}); 168 169jQuery(".searchterms").on( "focus", function() { 170 jQuery("#searchform h1,#searchform h2").css('display','none'); 171 172}); 173 174jQuery( ".searchterms" ).on( "blur", function() { 175 if(!jQuery(this).val()){ 176 177 jQuery("#searchform h1,#searchform h2").css('display','inline-block'); 178 } 179 180}); 181 182 183 184 if(jQuery('#mediumdown').is(":visible")){ 185 186 jQuery('select').not('.acf-gallery-sort,#media-attachment-date-filters,#media-attachment-filters,.wiaform select').select2({width: '100%',minimumResultsForSearch: 90,dropdownAutoWidth : true}); 187 }else{ 188 jQuery('select').not('.acf-gallery-sort,#media-attachment-date-filters,#media-attachment-filters,.wiaform select,select.multiple').select2({ width: 'resolve',minimumResultsForSearch: 90,dropdownAutoWidth : true}); 189 jQuery('select.multiple').select2({ width: '100%',minimumResultsForSearch: -1,dropdownAutoWidth : true}); 190 } 191 jQuery('.foliodropdowns select').on('change', function() { 192 if(!jQuery('body').hasClass('wiaentries')){ 193 194 var filterurl = '?'; 195 196 jQuery('.foliodropdowns select').each(function() { 197 198 if(this.value ){ 199 filterurl += jQuery(this).attr('name')+'='+this.value+'&'; 200 201 202 } 203 });
204 if(jQuery('body').hasClass('news') || jQuery('body').hasClass('resources')){ 205 filterurl = this.value; 206 }else{ 207filterurl = filterurl.substring(0, filterurl.length - 1); 208 209 } 210 211 if(filterurl.length > 1){ 212 window.location.href = filterurl; 213 }else{ 214 window.location.href = window.location.href.split('?')[0]; 215 216 } 217 218 } 219 }); 220 221 if(getCookie('woocommerce_items_in_cart') > 0){ 222 223 /// jQuery('.incart').html(getCookie('woocommerce_items_in_cart')); 224 225 } 226 if(getCookie('aoi_loggedin') != "yes"){ 227 228 jQuery('#userlogin').addClass('out'); 229 230}else{ 231 232 233 234 235 jQuery('.mobilemenu .member-dashboard').removeClass('d-none'); 236 jQuery('#userlogin').removeClass('modal-launcher'); 237 jQuery('#becomeamember').html('Dashboard'); 238 jQuery('#becomeamember').attr('href',jQuery('#userlogin').attr('href')); 239 if(getCookie('aoi_member') == "yes"){ 240 241 jQuery('#becomeamember').html('Member Dashboard'); 242 243 } 244} 245//alert(getCookie('aoi_loggedin')); 246if( document.cookie.indexOf("eucookies") ===-1 ){ 247jQuery(".cookiebanner").show(); 248}else{ 249jQuery(".cookiebanner").remove(); 250} 251if( document.cookie.indexOf("betacookies") ===-1 ){ 252jQuery(".betabanner").show(); 253}else{ 254jQuery(".betabanner").remove(); 255} 256jQuery(".woocommerce-message .close").click(function (event) { 257 258 jQuery(this).closest('.woocommerce-message').animate({bottom:'-90px'}, 400) 259 260 261 event.preventDefault(); 262 263}); 264 265 266 267jQuery(".fbanner .close").click(function (event) { 268 269 jQuery(this).closest('.fbanner').animate({bottom:'-90px'}, 400) 270var cookiename = jQuery(this).closest('.fbanner').attr('rel'); 271SetCookie(cookiename,cookiename,365*10); 272 273 event.preventDefault(); 274 275}); 276 277 278 279jQuery(".firstlink").click(function (event) { 280 if(jQuery(this).find('a').eq(0).attr('href').length){ 281 window.location.href = jQuery(this).find('a').eq(0).attr('href'); 282 283 event.preventDefault(); 284 } 285 }); 286 287 jQuery(".scrollto").click(function (event) { 288 event.preventDefault(); 289 if(jQuery(jQuery(this).data('elem')).length){ 290 var elemid = '#'+jQuery(jQuery(this).data('elem')).attr('id'); 291 292 if(history.pushState) { 293 history.pushState(null, null,elemid); 294} else { 295 location.hash = elemid; 296} 297 298 jQuery([document.documentElement, document.body]).animate({ 299 scrollTop: jQuery(jQuery(this).data('elem')).offset().top-70 }, 500); 300 301 302 303 } 304 305 }); 306 307 308jQuery(".thehamburger").click(function (event) { 309 310 311 312 313if(!jQuery('body').hasClass('mobileopen')){ 314 jQuery('body').addClass('mobileopen'); 315 jQuery('body').addClass('scrolled'); 316} 317}); 318 319jQuery(".thehamburger .thehamburger").click(function (event) { 320 if(jQuery('body').hasClass('mobileopen')){ 321jQuery('body').removeClass('mobileopen'); 322 323 } 324}); 325 326 327jQuery(document).on('change', '.wia-menu .toggler', function() { 328 329 if(!this.checked) { 330jQuery('body').removeClass('wiaopen'); 331 332 333 }else{ 334 jQuery('body').addClass('wiaopen'); 335 336 } 337 338}); 339 340jQuery(document).on('change', '.thehamburger input', function() { 341 if(!this.checked) { 342jQuery('body').removeClass('mobileopen'); 343 344 345 } 346 347}); 348 349 350 jQuery(".togglejoin").click(function (event) { 351 jQuery(this).parent('h4').toggleClass('expand'); 352 event.preventDefault(); 353 }); 354 355 356 357jQuery(".toggleit").click(function (event) { 358jQuery("#"+jQuery(this).data('toggle')).toggle(); 359 event.preventDefault(); 360 }); 361 362 jQuery("#wiamodal .next").click(function (event) { 363 jQuery('.pig-figure.nextone').click(); 364 event.preventDefault(); 365 }); 366 jQuery("#wiamodal .previous").click(function (event) { 367 jQuery('.pig-figure.previousone').click(); 368 event.preventDefault(); 369 }); 370 371jQuery(document).on("click",".wiadetails .vote",function(event) { 372 373 htmx.ajax('POST', 'vote.php', {target:'#judgingstatus .action', values:jQuery(this).data()}); 374return false; 375 376}); 377 378jQuery(document).on("click",".modal-launcher,.wiaentries .pig-figure,.show_login",function(event) { 379 380if(jQuery(event.target).hasClass("vote")){ 381 382 383htmx.ajax('POST', 'vote.php', {target:'#judgingstatus .action', values:jQuery(event.target).data()}); 384return false; 385 386 387} 388 389 390jQuery('.thehamburger input').prop('checked', false) 391if(jQuery(this).attr('rel') == "searchmodal"){ 392 393 jQuery("#searchmodal #mainsearchform #s").get(0).focus(); 394 395 setTimeout(function() { jQuery("#searchmodal #mainsearchform #s").focus() }, 500); 396} 397 398 if(jQuery(this).data('discount')){ 399 jQuery(".discountdetails").html(''); 400 jQuery.ajax({ 401 url: jQuery(this).data('href')+'&id='+jQuery(this).data('discount'), 402 cache: false, 403 success: function(html){ 404 jQuery(".discountdetails").html(html); 405 } 406}); 407 408 409 } 410 411 412 413 if(jQuery(this).data('wia')){ 414 jQuery('.wiaentries .pig-figure').removeClass('previousone'); 415 jQuery('.wiaentries .pig-figure').removeClass('nextone'); 416 417 jQuery('a[href="'+jQuery(this).prev().attr('href')+'"]').addClass('nextone'); 418 jQuery('a[href="'+jQuery(this).next().attr('href')+'"]').addClass('previousone'); 419 var wiaurl = jQuery(this).attr('href'); 420 if(wiaurl.search("\\?") > 0){ 421 wiaurl = jQuery(this).attr('href')+'&modal=version'; 422 }else{ 423 wiaurl = jQuery(this).attr('href')+'?modal=version'; 424 } 425 jQuery(".wiadetails").html(''); 426 jQuery.ajax({ 427 url: wiaurl,
428 cache: false, 429 success: function(html){ 430 jQuery(".wiadetails").html(html); 431 } 432}); 433 434 435 } 436 437 438 if(jQuery('#wiamodal').hasClass('active')){ 439 jQuery(".wiadetails").html(''); 440 jQuery('#wiamodal').removeClass("active"); 441 442 443}else if(jQuery('#discountsmodal').hasClass('active')){ 444 jQuery(".discountdetails").html(''); 445 jQuery('#discountsmodal').removeClass("active"); 446 447 448}else{ 449 jQuery("#modal-background").toggleClass("active"); 450 451} 452if(jQuery(this).hasClass('show_login')){ 453 jQuery('#loginmodal').toggleClass("active"); 454 455 456} 457 458 jQuery('#'+jQuery(this).attr('rel')).toggleClass("active"); 459 460 461 jQuery('body').addClass('modalopen'); 462 event.preventDefault(); 463 event.stopPropagation(); 464 465 466 }); 467 468 jQuery("#modal-background, #modal-close").click(function (event) { 469 jQuery("#modal-background").removeClass("active"); 470 jQuery(".modal").removeClass("active"); 471 jQuery('body').removeClass('modalopen'); 472 event.preventDefault(); 473 }); 474}); 475 476 477 478 479jQuery(window).on("load",function() { 480 481if(jQuery('#mediumdown').is(":visible")){ 482var innertableheight = jQuery('.pricingtables.toggle:first-of-type .pricingtablecontainer').height()+200; 483 484 jQuery('.pricingtables').height(innertableheight); 485 486}; 487 var tallest = -1; 488 jQuery('.tallest,.tallest .slidecontain,.wia-category-block .slidecontain').each(function() { 489 tallest = tallest > jQuery(this).height() ? tallest : jQuery(this).height(); 490 491 }); 492 493 494 495 496 jQuery('.tallest,.tallest .slidecontain,.wia-category-block .slidecontain').height(tallest); 497 498 499 jQuery('.tallest.flagged').height(tallest+25); 500 501if( jQuery('.pricingtabletoggle').length > 1){ 502 var tablinks = ""; 503 jQuery('.pricingtabletoggle').each(function() { 504 505 if(jQuery(this).find('.row').html()){ 506 tablinks = tablinks+jQuery(this).find('.row').html(); 507 } 508 }); 509 510jQuery('.pricingtabletoggle:first .row').html(tablinks); 511if( window.location.hash){ 512elemid = window.location.hash.substring(1); 513 jQuery('.tabnav').removeClass('live'); 514 jQuery("a.tabnav[data-toggle='" + elemid +"']").addClass('live'); 515 516jQuery('.pricingtables.toggle').removeClass('show'); 517jQuery('.pricingtables.toggle').addClass('hide'); 518 519 jQuery('#'+elemid).removeClass('hide'); 520 jQuery('#'+elemid).addClass('show'); 521}else{ 522 jQuery('a.tabnav').first().addClass('live'); 523} 524} 525 526 527 528 jQuery(".tabnav").click(function (event) { 529 event.preventDefault(); 530 531 if(jQuery(this).hasClass('live')){ 532 //jQuery('.tabnav').removeClass('live'); 533 //jQuery(this).removeClass('live'); 534 535 }else{ 536 jQuery('.tabnav').removeClass('live'); 537 jQuery(this).addClass('live'); 538 } 539 elemid = '#'+jQuery(this).data('toggle'); 540 if(history.pushState) { 541 history.pushState(null, null,elemid); 542} else { 543 location.hash = elemid; 544} 545 546 jQuery('.'+jQuery(this).data('toggleoff')).removeClass('show'); 547 jQuery('.'+jQuery(this).data('toggleoff')).addClass('hide'); 548 549 jQuery('#'+jQuery(this).data('toggle')).removeClass('hide'); 550 jQuery('#'+jQuery(this).data('toggle')).addClass('show'); 551 552 553 554 if(jQuery('#mediumdown').is(":visible")){ 555 if(jQuery('#'+jQuery(this).data('toggle')).hasClass('pricingtables')){ 556 var innertableheight = jQuery('#'+jQuery(this).data('toggle')+' .pricingtablecontainer').height()+100; 557 558 jQuery('#'+jQuery(this).data('toggle')).height(innertableheight); 559 560}; 561 }; 562 563 }); 564 565 566 567 568 jQuery('.selector:not(.goselector,.multiple)').each(function() { 569 570 571if(jQuery('#mediumdown').is(":visible")){ 572 573 if(jQuery('body').hasClass('wiaentries')){ 574 var newwidth = '49%'; 575 576 }else if( jQuery('body').hasClass('resources') ){ 577 var newwidth = jQuery(this).find('.select2').width()+jQuery(this).find('label').width()-62; 578 }else if( jQuery('body').hasClass('resources') || jQuery('body').hasClass('events')){ 579 var newwidth = jQuery(this).find('.select2').width()+jQuery(this).find('label').width()-22; 580 581 582 583 584 }else{ 585 var newwidth = '32%'; 586 587 } 588}else{ 589 var newwidth = jQuery(this).find('.select2').width()+jQuery(this).find('label').width()+22; 590 591} 592 593if(jQuery('.woocommerce-products-header').length < 1) { 594 jQuery(this).width(newwidth); 595 596}else{ 597 jQuery(this).width(100); 598 599} 600 601 }); 602 603 604 jQuery('.selector.multiple').each(function() { 605 if(jQuery('#mediumdown').is(":visible")){ 606 607 if(jQuery('body').hasClass('wiaentries')){ 608 jQuery(this).width('100%'); 609 610 611 }} 612 613 }); 614 615 616 617 618 jQuery('.containfix').width(jQuery('.containfix').width()); 619 // jQuery('.wp-block-page-list').width(jQuery('.wp-block-page-list').width()); 620 function fade() { 621 622 var animation_height = jQuery(window).innerHeight() * 0.25; 623 var ratio = Math.round( (1 / animation_height) * 10000 ) / 10000; 624 625 jQuery('.fade:not(.no_fade_1)').each(function() { 626 627 var objectTop = jQuery(this).offset().top; 628 var windowBottom = jQuery(window).scrollTop() + jQuery(window).innerHeight(); 629 630 if ( objectTop < windowBottom ) { 631 if ( objectTop < windowBottom - animation_height ) { 632 633 jQuery(this).css( { 634 transition: 'opacity 0.2s linear', 635 opacity: 1 636 } ); 637 638 } else { 639 640 jQuery(this).css( { 641 transition: 'opacity 0.2s linear', 642 opacity: (windowBottom - objectTop) * ratio 643 } ); 644 } 645 } else { 646 647 jQuery(this).css( 'opacity', 0 ); 648 } 649 }); 650 } 651 jQuery('.fade:not(.no_fade_1)').css( 'opacity', 0 ); 652 fade(); 653 var lastScrollTop = 0; 654 jQuery(window).scroll(function() { 655 656 fade(); 657 658 659 st = jQuery(this).scrollTop(); 660 661 662 if(st > 50){ 663 jQuery('.backtotop').addClass('show'); 664 665 }else{ 666 jQuery('.backtotop').removeClass('show'); 667 668 } 669 670 lastScrollTop = st; 671 // if(jQuery('.wp-block-page-list').length){ 672 // if( st > jQuery('.wp-block-page-list').parent('.wp-block-column').offset().top-90 && st < jQuery('.wp-block-page-list').parent('.wp-block-column').offset().top+jQuery('.wp-block-page-list').parent('.wp-block-column').height()-jQuery('.wp-block-page-list').height()){ 673 // jQuery('.wp-block-page-list').addClass('fix'); 674 // }else{ 675 // jQuery('.wp-block-page-list').removeClass('fix'); 676 677 // } 678 679 680 // } 681 if(jQuery('.wia-menu').length){ 682 683 if(jQuery('body').hasClass('site_wia')){ 684 var scrollattach = 100; 685 686 }else{ 687 688 var scrollattach = 100; 689 } 690 691 if (st > scrollattach){ 692 jQuery('.wia-menu,.mobilemenu .enter').addClass('fix'); 693 694 }else{ 695 jQuery('.wia-menu,.mobilemenu .enter').removeClass('fix'); 696 697 } 698 699 } 700 701 702 703 if(jQuery('.fixit').length && !jQuery('#mediumdown').is(":visible") && jQuery('.fixit h2').text().length < 38 && !jQuery('#suggestionBox').hasClass('found')){ 704 705if(jQuery('.fixit').height()+220 < jQuery(window).height() ){ 706 var ht = jQuery('.fixit').offset().top; 707 708 709 if (st > 340 & jQuery(window).scrollTop()+jQuery(window).height() < jQuery(document).height()-600 ){
710 711 jQuery('.fixit').addClass('fix'); 712 713 714 }else{ 715 jQuery('.fixit').removeClass('fix'); 716 717 } 718 719} 720 } 721 722 723 724 725 726if(!jQuery('body').hasClass('site_wia')){ 727 if(st < 35){ 728 729 //jQuery('.nav .row').css('margin-top','-'+st/2+'px'); 730 jQuery('body').removeClass('scrolled'); 731 732 }else{ 733 //jQuery('.nav .row').css('margin-top','0px'); 734 735 736 jQuery('body').addClass('scrolled'); 737 738 739 } 740 741} 742 743 744 745 }); 746});
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.