1jQuery(document).foundation(); 2/* 3These functions make sure WordPress 4and Foundation play nice together. 5*/ 6 7jQuery(document).ready(function() { 8 9 // Remove empty P tags created by WP inside of Accordion and Orbit 10 jQuery('.accordion p:empty, .orbit p:empty').remove(); 11 12 // Makes sure last grid item floats left 13 jQuery('.archive-grid .columns').last().addClass('end'); 14 15 // Adds Flex Video to YouTube and Vimeo Embeds 16 jQuery('iframe[src*="youtube.com"], iframe[src*="vimeo.com"], iframe[src*="facebook.com"]').each(function() { 17 if (jQuery(this).innerWidth() / jQuery(this).innerHeight() > 1.5) { 18 jQuery(this).wrap("<div class='widescreen flex-video'/>"); 19 } else { 20 jQuery(this).wrap("<div class='flex-video'/>"); 21 } 22 }); 23 24 // close menu on click 25 jQuery('#menu-main-nav a').click(function() { 26 jQuery('#title-bar').foundation('toggleMenu'); 27 }); 28 29 // Duplicates buy links under albums for mobile views 30 jQuery('.album .links').each(function() { 31 jQuery(this).clone().addClass('hide-for-small-only').appendTo(jQuery(this).parent().parent().find('.column').first()); 32 jQuery(this).addClass('show-for-small-only'); 33 }); 34 35 // duplicate tracklist for the fancybox to display 36 jQuery('.tracklist').each(function(i) { 37 jQuery(this).clone().css('display', 'none').attr('id', "tracklist" + i).appendTo(jQuery(this).parent()); 38 jQuery(this).parent().find('.links').prepend('<a class="button" data-fancybox data-src="#tracklist' + i + '" href="javascript:;">Tracklist</a>'); 39 }); 40 41 jQuery('.top-bar-right .socials').clone().appendTo('.footer-socials'); 42 43 // add play button to soundcloud links 44 //jQuery('.soundcloud').prepend('<i class="fa fa-play-circle" aria-hidden="true"></i> '); 45 46 // OWL CAROUSEL STUFF 47 function owlresize() { 48 jQuery(window).trigger('resize').trigger('scroll'); 49 } 50 51 jQuery('#album-carousel').owlCarousel({ 52 loop: false, 53 margin: 30, 54 nav: true, 55 onResized: owlresize, 56 navText: ['<i class="fa fa-chevron-circle-left fa-lg" aria-hidden="true"></i>', '<i class="fa fa-chevron-circle-right fa-lg" aria-hidden="true"></i>'], 57 responsive: { 0: { items: 1 }, 1024: { items: 2 }, 1400: { items: 2 } } 58 }); 59 60 jQuery('#video-carousel').owlCarousel({ 61 loop: true, 62 margin: 30, 63 nav: true, 64 onResized: owlresize, 65 navText: ['<i class="fa fa-chevron-circle-left fa-lg" aria-hidden="true"></i>', '<i class="fa fa-chevron-circle-right fa-lg" aria-hidden="true"></i>'], 66 responsive: { 0: { items: 1 }, 600: { items: 2 }, 900: { items: 2 }, 1200: { items: 3 }, 1500: { items: 3 } } 67 }); 68 69 // resize cd to fill homepage 70 jQuery(window).resize(function() { 71 var cdheight = jQuery(window).height() - jQuery('.sticky-container').height() - jQuery('#home-banner').outerHeight(); 72 if (cdheight > 300) { 73 jQuery('.cd-cover').css('maxHeight', cdheight); 74 } 75 }); 76 77 // FANCYBOX STUFF 78 jQuery.fancybox.defaults.fullScreen = false; 79 jQuery.fancybox.defaults.smallBtn = false; 80 jQuery.fancybox.defaults.loop = false; 81 jQuery.fancybox.defaults.thumbs = false; 82 jQuery.fancybox.defaults.slideShow = false; 83 jQuery(".soundcloud").fancybox({ 84 iframe: { 85 css: { width: '300px', maxWidth: '600px', height: '170px' } 86 } 87 }); 88 jQuery(".mailinglist").fancybox({ 89 iframe: { 90 css: { maxWidth: '700px', height: '525px' }, 91 scrolling: 'yes' 92 } 93 }); 94 jQuery(".listen-lyrics").fancybox({ 95 iframe: { 96 css: { width: '300px', maxWidth: '600px', height: '400px' }, 97 scrolling: 'yes' 98 } 99 }); 100 101 //we've played around with the DOM so lets trigger resize so magallen, sticky and parallex update 102 jQuery(window).trigger('resize').trigger('scroll'); 103 104}); 105 106// respond to bands in town 107document.addEventListener("DOMContentLoaded", function() { 108 const resizeObserver = new ResizeObserver(() => { 109 jQuery(window).trigger('resize').trigger('scroll'); 110 }); 111 112 resizeObserver.observe(document.body); 113}); 114 115 116//typekit 117try { 118 Typekit.load({ 119 loading: function() { 120 // Javascript to execute when fonts start loading 121 }, 122 active: function() { 123 // Javascript to execute when fonts become active 124 console.log('typekit active'); 125 jQuery('.sticky').foundation('_calc', true); 126 jQuery('#menu-main-nav').foundation('reflow'); 127 }, 128 inactive: function() { 129 // Javascript to execute when fonts become inactive 130 } 131 }) 132} catch (e) {}; 133 134// ie jerky fix https://github.com/pixelcog/parallax.js/issues/73 135//if(navigator.userAgent.match(/MSIE/i) || navigator.userAgent.match(/Trident\/7\./) || navigator.userAgent.match(/Edge\/12\./)) { jQuery('body').on("mousewheel", function () { event.preventDefault(); var wd = event.wheelDelta; var csp = window.pageYOffset; window.scrollTo(0, csp - wd); }); }
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.