1jQuery(function($){ 2 3 function updateHash( hash ) { 4 history.replaceState(null, null, document.location.pathname + '#' + hash); 5 } 6 7 $('.featuretabs-tabs a').on('click.demme', function(e) { 8 e.preventDefault(); 9 updateHash($(this).attr('href').substring(1)); 10 11 //e.preventDefault(); 12 13 var tab_group = $(this).data('tab-group'); 14 var tab_id = $(this).data('tab-id'); 15 var section_id = $(this).closest('.section-featuretabs').attr('id'); 16 17 //window.location.hash = section_id + ':' + tab_group + ':' + tab_id; 18 19 $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a').removeClass('active'); 20 $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a[data-tab-id="' + tab_id + '"]').addClass('active'); 21 $('.featuretabs-tabs-wrapper[data-tab-group="' + tab_group + '"] .featuretabs-tab').hide(); 22 $('.featuretabs-tabs-wrapper[data-tab-group="' + tab_group + '"] .featuretabs-tab[data-tab-id="' + tab_id + '"]').show(); 23 }); 24 25 $('.tab-control.tab-previous').on('click.demme', function(e) { 26 e.preventDefault(); 27 //updateHash($(this).attr('href').substring(1)); 28 29 var tab_group = $(this).data('tab-group'); 30 31 var count = $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a').length - 1; 32 var current = $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a.active').data('tab-id'); 33 34 if (current - 1 < 0) { 35 current = count; 36 } else { 37 current = current - 1; 38 } 39 40 $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a[data-tab-id="' + current + '"]').trigger('click.demme'); 41 }); 42 43 $('.tab-control.tab-next').on('click.demme', function(e) { 44 e.preventDefault(); 45 //updateHash($(this).attr('href').substring(1)); 46 47 var tab_group = $(this).data('tab-group'); 48 49 var count = $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a').length - 1; 50 var current = $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a.active').data('tab-id'); 51 52 if (current + 1 > count) { 53 current = 0; 54 } else { 55 current = current + 1; 56 } 57 58 $('.featuretabs-tabs[data-tab-group="' + tab_group + '"] a[data-tab-id="' + current + '"]').trigger('click.demme'); 59 }); 60 61 $('.featuregrid-tab').on('click.demme', function (e) { 62 if ($(e.target).is('a') && !$(e.target).hasClass('btn-expand')) { 63 return true; 64 } 65 66 e.preventDefault(); 67 68 69 70 $(this).find('.btn-expand').trigger('click.demme'); 71 }); 72 73 $('.section.section-featuregrid .btn-expand').on('click.demme', function (e) { 74 e.preventDefault(); 75 e.stopPropagation(); 76 updateHash($(this).attr('href').substring(1)); 77 78 var tab_id = $(this).data('tab-id'); 79 var tab_group = $(this).data('tab-group'); 80 81 if ($(this).hasClass('active')) { 82 $(this).removeClass('active'); 83 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .featuregrid-tab').hide(); 84 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .btn-close').hide(); 85 } else { 86 $('.featuregrid-tabs-wrapper[data-tab-group="' + tab_group + '"] .btn-expand').removeClass('active'); 87 $(this).addClass('active'); 88 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .featuregrid-tab').hide(); 89 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .featuregrid-tab[data-tab-id="' + tab_id + '"]').show(); 90 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .btn-close').show(); 91 } 92 }); 93 94 $('.section.section-featuregrid .btn-close').on('click.demme', function(e) { 95 e.preventDefault(); 96 updateHash($(this).attr('href').substring(1)); 97 98 var tab_group = $(this).data('tab-group'); 99 100 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .featuregrid-tab').hide(); 101 $('.featuregrid-tabs-content-wrapper[data-tab-group="' + tab_group + '"] .btn-close').hide(); 102 $('.featuregrid-tabs-wrapper[data-tab-group="' + tab_group + '"] .btn-expand').removeClass('active'); 103 }); 104 105 $('.section.section-accordion .btn-expand').on('click.demme', function(e) { 106 e.preventDefault(); 107 updateHash($(this).attr('href').substring(1)); 108 109 var tab_id = $(this).data('tab-id'); 110 var tab_group = $(this).data('tab-group'); 111 112 if ($(this).hasClass('active')) { 113 $(this).removeClass('active'); 114 $('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab[data-tab-id=' + tab_id + '] .accordion-tab-intro').show(); 115 $('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab[data-tab-id=' + tab_id + '] .accordion-tab-content').hide(); 116 //$('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab-content').hide(); 117 } else { 118 //$('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .btn-expand').removeClass('active'); 119 $(this).addClass('active'); 120 //$('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab-content').hide(); 121 //$('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab-intro').show(); 122 123 $('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab[data-tab-id=' + tab_id + '] .accordion-tab-content').show(); 124 $('.accordion-tabs-wrapper[data-tab-group=' + tab_group + '] .accordion-tab[data-tab-id=' + tab_id + '] .accordion-tab-intro').hide(); 125 } 126 }); 127 128 $('#blog-sidebar-toggle').on('click.demme', function(e) { 129 $('body').toggleClass('blog-sidebar-hidden'); 130 }); 131 132 $('#blog-post-sidebar-toggle').on('click.demme', function(e) { 133 $('body').toggleClass('blog-post-sidebar-hidden'); 134 }); 135 136 $('.blog-sidebar-layouts a').on('click.demme', function(e) { 137 var layout = $(this).data('layout'); 138 139 $('body').removeClass('blog-listing-layout-list'); 140 $('body').removeClass('blog-listing-layout-grid'); 141 $('.blog-sidebar-layouts a').removeClass('active'); 142 $(this).addClass('active'); 143 $('body').addClass('blog-listing-layout-' + layout); 144 145 }); 146 147 $('#blog-listing-layout-widget').insertAfter('form li.sf-field-search'); 148 149 $('#search-listing-layout-widget').insertAfter('form li.sf-field-search'); 150 151 $('#search-sidebar-toggle').on('click.demme', function(e) { 152 $('body').toggleClass('search-sidebar-hidden'); 153 }); 154 155 $('#search-post-sidebar-toggle').on('click.demme', function(e) { 156 $('body').toggleClass('search-post-sidebar-hidden'); 157 }); 158 159 $('.search-sidebar-layouts a').on('click.demme', function(e) { 160 var layout = $(this).data('layout'); 161 162 $('body').removeClass('search-listing-layout-list'); 163 $('body').removeClass('search-listing-layout-grid'); 164 $('.search-sidebar-layouts a').removeClass('active'); 165 $(this).addClass('active'); 166 $('body').addClass('search-listing-layout-' + layout); 167 168 }); 169 170 var $div = $('.nav-secondary'); 171 var observer = new MutationObserver(function(mutations) { 172 mutations.forEach(function(mutation) { 173 if (mutation.attributeName === "style") { 174 if ($(mutation.target).is(':visible')) { 175 if (!$('.site-header .title-area').next().hasClass('widget-area')) { 176 $('.widget-area.header-widget-area').detach().insertAfter('.site-header .title-area'); 177 } 178 } else { 179 if ($('#genesis-nav-primary .wrap').find('.widget-area').length < 1) { 180 $('.widget-area.header-widget-area').detach().prependTo('#genesis-nav-primary .wrap'); 181 } 182 } 183 } 184 }); 185 }); 186 if (typeof $div[0] == 'Node') { 187 observer.observe($div[0], { 188 attributes: true 189 }); 190 } 191 192 var navigated = false; 193 194 if (window.location.hash.length > 0 && !navigated) { 195 if ($('a[href="' + window.location.hash + '"]').length > 0) { 196 $('a[href="' + window.location.hash + '"]').trigger('click.demme'); 197 navigated = true; 198 199 $([document.documentElement, document.body]).animate({ 200 scrollTop: $('[data-tab-slug="' + window.location.hash.substring(1) + '"]').closest('section').offset().top 201 }, 500); 202 } 203 } 204
205 $( window ).on( 'hashchange', function( e ) { 206 if (window.location.hash.length > 0 && (e.originalEvent.oldURL != e.originalEvent.newURL)) { 207 var slug = window.location.hash.substring(1); 208 209 if ($('a[href="' + window.location.hash + '"]').length > 0 && $('[data-tab-slug="' + slug + '"]').length > 0) { 210 $('a[href="' + window.location.hash + '"]').trigger('click.demme'); 211 $([document.documentElement, document.body]).animate({ 212 scrollTop: $('[data-tab-slug="' + slug + '"]').closest('section').offset().top 213 }, 500); 214 } 215 } 216 } ); 217 218 /*$(document).ready(function() { 219 // grab the initial top offset of the navigation 220 var stickyNavTop = $('.nav-primary').offset().top; 221 222 // our function that decides weather the navigation bar should have "fixed" css position or not. 223 var stickyNav = function(){ 224 var scrollTop = $(window).scrollTop(); // our current vertical position from the top 225 226 // if we've scrolled more than the navigation, change its position to fixed to stick to top, 227 // otherwise change it back to relative 228 if (scrollTop > stickyNavTop) { 229 $('.nav-primary,body').addClass('sticky'); 230 } else { 231 $('.nav-primary,body').removeClass('sticky'); 232 } 233 }; 234 235 stickyNav(); 236 // and run it again every time you scroll 237 $(window).scroll(function() { 238 stickyNav(); 239 }); 240 });*/ 241 242 var demmeLastScrollTop = 0; 243 var headerOffset = -1; 244 245 $(window).on('scroll.demme', function(e) { 246 var st = $(this).scrollTop(); 247 248 var offset = (headerOffset == -1) ? 249 ($('.before-header.widget-area').height() + $('.before-header.widget-area').scrollTop()) : 250 headerOffset; 251 252 var down = st > demmeLastScrollTop; 253 254 if (down){ 255 if (st >= offset && !$('body').hasClass('sticky')) { 256 $('body').addClass('sticky'); 257 } 258 $('body').removeClass('scrolled-up'); 259 } else { 260 if (st < 1) { 261 $('body').removeClass('scrolled-up'); 262 $('body').removeClass('sticky'); 263 } else { 264 if (!$('body').hasClass('scrolled-up')) { 265 $('body').addClass('scrolled-up'); 266 } 267 } 268 } 269 demmeLastScrollTop = st; 270 }); 271 272 $('a[href="#hs-chat-open"').on('click.demme', function(e) { 273 e.preventDefault(); 274 window.HubSpotConversations.widget.open(); 275 }); 276 277 // MOVE HEADER WIDGET AREA INTO MOBILE MENU UNDER 896PX 278 $(window).on("resize.demme", function() { 279 if (window.innerWidth < 896) { 280 $(".header-widget-area").prependTo(".nav-primary .menu"); 281 } else { 282 $(".header-widget-area").appendTo(".site-header > .wrap"); 283 } 284 }).resize(); 285 286 /*$(document).ready(function() { 287 // get the anchor link buttons 288 const menuBtn = $('.hubspot-chat-link'); 289 // when each button is clicked 290 menuBtn.click(()=>{ 291 // set a short timeout before taking action 292 // so as to allow hash to be set 293 setTimeout(()=>{ 294 // call removeHash function after set timeout 295 removeHash(); 296 }, 5); // 5 millisecond timeout in this case 297 }); 298 299 // removeHash function 300 // uses HTML5 history API to manipulate the location bar 301 function removeHash(){ 302 history.replaceState('', document.title, window.location.origin + window.location.pathname + window.location.search); 303 } 304 }); */ 305 306}); 307 308//!function(e,i){i(window).scroll(function(){i(".site-header").outerHeight()<=i(window).scrollTop()?i(".site-header").addClass("shrink"):i(".site-header").removeClass("shrink")}),i(window).on("load resize",function(){var e=i(".site-header"),s=0,o=0;"fixed"===e.css("position")&&(s=e.outerHeight()),"fixed"===e.css("position")&&i("body").hasClass("admin-bar")&&(o=i("#wpadminbar").outerHeight()),i(".site-inner").css("margin-top",s),e.css("margin-top",o)}),i(".site-header .search-form").append('<a href="javascript:document.getElementsByName("s").focus()" class="search-toggle"></a>'),i(".site-header .search-toggle").on("click",function(){i(this).toggleClass("active"),i(".nav-primary .menu-item").fadeToggle(),i('.site-header .search-form input[type="search"]').fadeToggle()}),i(".site-footer .enews form").append('<span class="send-icon"></span>'),i(window).on("resize",function(){window.innerWidth<896?i(".header-widget-area").prependTo(".nav-primary .menu"):(i(".header-widget-area").prependTo(".site-header .wrap"),i(".nav-primary .menu .header-widget-area").remove())}).resize(),jQuery(e).ready(function(o){Modernizr.objectfit||o(".front-page-9").each(function(){var e=o(this),s=e.find("img").prop("src");s&&e.css("backgroundImage","url("+s+")").addClass("no-object-fit"),e.find("img").css("display","none")})}),jQuery(e).ready(function(e){e(".front-page-2 .gallery").slick({dots:!1,infinite:!0,speed:1e3,arrows:!1,autoplay:!0,autoplaySpeed:5e3,fade:!1,slidesToShow:2,slidesToScroll:1,mobileFirst:!0,responsive:[{breakpoint:384,settings:{slidesToShow:3}},{breakpoint:768,settings:{slidesToShow:4}},{breakpoint:896,settings:{slidesToShow:5}},{breakpoint:1152,settings:{slidesToShow:6}}]})}),i('a[href*="#"]').not('[href="#"]').not('[href="#0"]').not('[href*="#tab-"]').click(function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var s=i(this.hash);(s=s.length?s:i("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),i("html, body").animate({scrollTop:s.offset().top},1e3,function(){var e=i(s);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}})}(document,jQuery); 309 310 311
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.