PageSourceSearch

https://greenesoxford.com/wp-content/themes/greenes-v1.5/build/js/script-min.js

js greenesoxford.com collected 2026-10-02 14:49:39 UTC 11,696 bytes, 6 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jQuery)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=t(e);window.$=window.jQuery=o.default;var a=e=>`${e.charAt(0).toLowerCase()}${e.replace(/[\W_]/g,"|").split("|").map((e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`)).join("").slice(1)}`;var n={init(){const e=$(".menu-button"),t=$(".site-nav");function o(){$(window).width()>992?($("body").removeClass("open"),$("#menu-btn,#search-btn,#login-btn").remove()):$(window).width()<992&&($("#menu-btn").length||($(".site-header__content").after('<button id="search-btn" class="search unstyled"></button><a id="login-btn" class="login-btn"></a><button id="menu-btn" type="button" aria-label="open-menu"><span class="align"><span></span><span></span><span></span><span></span></span></button>'),$(".site-header__top-menu").before('<button class="close unstyled"></button>'))),function(){let e=$(".page_header__title").outerHeight(),t=0;$(window).width()<992&&(t=Math.round(e/2+16)),$(".page_header__image").css({"margin-bottom":t})}()}function a(){if($(window).width()>768)var e=280,t=16;else e=100,t=16;$(".gallery").justifiedGallery({rowHeight:e,lastRow:"justify",margins:t,captions:!1})}function n(){a()}var i;e.on("click",(function(){t.toggleClass("revealed")})),document.onkeydown=function(e){27==(e=e||window.event).keyCode&&t.removeClass("revealed")},t.find(".menu-item-has-children > button").each((function(){$(this).on("click",(function(e){e.preventDefault(),$(this).parent(".menu-item-has-children").toggleClass("sub-menu-open")}))}
1)),Array.prototype.slice.call(document.querySelectorAll(".accordion")).forEach((function(e){var t=e.hasAttribute("data-allow-multiple"),o=t||e.hasAttribute("data-allow-toggle"),a=Array.prototype.slice.call(e.querySelectorAll(".accordion-trigger"));if(Array.prototype.slice.call(e.querySelectorAll(".accordion-content")),e.addEventListener("click",(function(a){var n=a.target;if(n.classList.contains("accordion-trigger")){var i="true"==n.getAttribute("aria-expanded"),r=e.querySelector('[aria-expanded="true"]');!t&&r&&r!==n&&(r.setAttribute("aria-expanded","false"),document.getElementById(r.getAttribute("aria-controls")).setAttribute("hidden",""),o||r.removeAttribute("aria-disabled")),i?o&&i&&(n.setAttribute("aria-expanded","false"),document.getElementById(n.getAttribute("aria-controls")).setAttribute("hidden","")):(n.setAttribute("aria-expanded","true"),document.getElementById(n.getAttribute("aria-controls")).removeAttribute("hidden"),o||n.setAttribute("aria-disabled","true")),a.preventDefault()}})),e.addEventListener("keydown",(function(o){var n=o.target,i=o.which.toString();n.getAttribute("aria-expanded"),t||e.hasAttribute("data-allow-toggle");var r=o.ctrlKey&&i.match(/33|34/);if(n.classList.contains("accordion-trigger"))if(i.match(/38|40/)||r){var s=a.indexOf(n),c=i.match(/34|40/)?1:-1,l=a.length;a[(s+l+c)%l].focus(),o.preventDefault()}else if(i.match(/35|36/)){switch(i){case"36":a[0].focus();break;case"35":a[a.length-1].focus()}o.preventDefault()}})),e.querySelectorAll(".accordion-trigger").forEach((function(t){t.addEventListener("focus",(function(t){e.classList.add("focus")})),t.addEventListener("blur",(function(t){e.classList.remove("focus")}))})),!o){var n=e.querySelector('[aria-expanded="true"]');n&&n.setAttribute("aria-disabled","true")}})),$(".testimonial_slider-slider").each((function(){$(this).slick({arrows:!1,autoplay:!1,dots:!0})})),$(".gform_wrapper form select, .gform_wrapper form input").change((function(){var e=[];$(this);var t=$(this).parents("form").attr("id"),o=$(this).attr("id");$(this).is('input[type="checkbox"]')&&(o=$(this).parents(".gfield_checkbox").attr("id")),$(this).is('input[type="radio"]')&&(o=$(this).parents(".gfield_radio").attr("id")),$(".gform_wrapper form select").each((function(){var t={};t.field_id=$(this).attr("id"),t.field_type="select",t.value=$(this).val(),t.options=[],$(this).find("option").each((function(){t.options.push($(this).val())})),e.push(t)})),$(".gform_wrapper form .gfield_checkbox").each((function(){var t={};t.field_id=$(this).attr("id"),t.field_type="checkbox",t.checkboxes=[],$(this).find("input").each((function(){var e={};e.checkbox_id=$(this).attr("id"),e.value=$(this).val(),$(this).is(":checked")?e.selected="selected":e.selected="",t.checkboxes.push(e)})),e.push(t)})),$(".gform_wrapper form .gfield_radio").each((function(){var t={};t.field_id=$(this).attr("id"),t.field_type="radio",t.radio=[],$(this).find("input").each((function(){var e={};e.radio_id=$(this).attr("id"),e.value=$(this).val(),$(this).is(":checked")?e.selected="selected":e.selected="",t.radio.push(e)})),e.push(t)}));var a={url:CONFIG.ajax_url,type:"POST",nonce:CONFIG.nonce,data:{action:"greenes_gforms",form_id:t,field_id:o,form_data:e}};$.ajax(a).done((function(e){if(e.length){var t=$.parseJSON(e);$.each(t.form_data,(function(e,t){var o=t.field_id;if("select"==t.field_type){var a=$("#"+o);a.find("option").each((function(){$(this).remove()})),$.each(t.options,(function(e,t){a.append('<option value="'+t+'">'+t+"</option>")}))}}))}}))}
1)),$(".content_sections-content").each((function(){var e=$(this).find(".content_sections-slider").attr("id"),t=$(this).find(".content_sections-image-slider").attr("id");$("#"+e).slick({arrows:!1,dots:!0,autoplay:!1,infinite:!0,asNavFor:"#"+t}),$("#"+t).slick({arrows:!1,dots:!1,autoplay:!1,fade:!0,asNavFor:"#"+e})})),$("[data-proceed-trigger]").each((function(){$(this).on("click",(function(){$("#proceedURL").toggleClass("revealed")}))})),$("[data-brochure-trigger]").each((function(){$(this).on("click",(function(){$("#brochureForm").toggleClass("revealed"),$("#brochureForm").hasClass("revealed")&&$("#brochureForm .brochure-form-content form").focus()}))})),$("[data-video-toggle]").each((function(){$(this).on("click",(function(){$("#homeVideo").toggleClass("revealed")}))})),$("[data-download-modal-trigger]").each((function(){$(this).on("click",(function(e){if(e.preventDefault(),$("#downloadForm").toggleClass("revealed"),$(this).attr("href")){var t=$(this).attr("href");$("#input_7_4").val(t)}$("#downloadForm").hasClass("revealed")&&$("#downloadForm .download-form-content form").focus()}))})),$(".who_we_are-icons__list button").each((function(){$(this).on("click",(function(){var e=$
1(this).parent("li").attr("data-section-num");$(".who_we_are-content .active").removeClass("active"),$('[data-section-num="'+e+'"]').each((function(){console.log($(this)),$(this).addClass("active")}))}))})),document.onkeydown=function(e){27==(e=e||window.event).keyCode&&$("[data-modal]").each((function(){$(this).removeClass("revealed"),$(this).prop("hidden",!0)}))},(new WOW).init(),$("#datepicker").datepicker({dateFormat:"dd-mm-yy"}),$("body").on("click","#menu-btn",(function(){$("body").addClass("open")})),$(document).keyup((function(e){27==e.keyCode&&$("body").removeClass("open")})),$(".site-header__content").on("click","button.close",(function(){$("body").removeClass("open")})),$(window).on("resize",o),$(document).bind("ready",(function(){o()})),$("header").on("click",".search",(function(){$("#search-popup").fadeIn(),$("#search-popup form.search-form input[type=text]").focus()})),$("#search-popup button.close").on("click",(function(){$("#search-popup").fadeOut()})),$(document).keyup((function(e){27==e.keyCode&&$("#search-popup").fadeOut()})),$('a[href*="#"]:not(.skip-to-content)').not('[href="#"]').not('[href="#0"]').click((function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=$(this.hash);if((t=t.length?t:$("[name="+this.hash.slice(1)+"]")).length){e.preventDefault();var o=t.data("offset");o||(o=0),$("html, body").animate({scrollTop:t.offset().top-o}
1,1e3,(function(){var e=$(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}}})),$(".who_we_are-icons__list").on("change",(function(){let e=$(this).find("option:selected").val();$(".who_we_are-content .active").removeClass("active"),$('[data-section-num="'+e+'"]').addClass("active")})),$(".greenes-posts-grid-slider").slick({dots:!0,infinite:!0,autoplay:!1,slidesToShow:2,slidesToScroll:1,arrows:!1,responsive:[{breakpoint:768,settings:{slidesToShow:1}}]}),$(window).on("resize",n),$(document).bind("ready",(function(){n()})),$(document).ready((function(){a()})),$("select#contact-details").on("change",(function(){let e=$(this).find("option:selected").val();$(".contact_content-side-panel .contact-details div:visible").hide(),$(".contact_content-side-panel .contact-details div#"+e).show()})),$(".who_we_are-icons__list button").each((function(){$(this).on("click",(function(){var e=$(this).parent("li").attr("data-section-num");$(".who_we_are-content .active").removeClass("active"),$('[data-section-num="'+e+'"]').each((function(){console.log($(this)),$(this).addClass("active")}))}))})),$('[name="brochure_url"]').length&&window.open($('[name="brochure_url"]').val(),"_blank");var r=0,s=$("header").outerHeight();$(window).scroll((function(e){i=!0}
1)),setInterval((function(){i&&(!function(){var e=$(window).scrollTop();if(Math.abs(r-e)<=5)return;e>r&&e>s?$("header").removeClass("nav-down").addClass("nav-up"):$("header").removeClass("nav-up").addClass("nav-down");r=e}(),i=!1)}),250);var c=document.domain;$("a:not(#proceedButton)").each((function(){$(this).on("click",(function(e){var t=$(this).attr("href");t.replace(/^(http|https):\/\/(.){0,99}(\.com|\.net|\.org)/,""),"greenesoxford.com"==this.hostname&&"greenesoxford.com"!==c&&(e.preventDefault(),$("#proceedURL").addClass("revealed"),$("#proceedButton").attr("href",t),console.log(t)),"pt.greenesoxford.com"==this.hostname&&"pt.greenesoxford.com"!==c&&(e.preventDefault(),$("#proceedURL").addClass("revealed"),$("#proceedButton").attr("href",t),console.log(t))}))}))},finalize(){}},i={init(){$(".custom-search-container form").on("submit",(function(e){e.preventDefault();var t=$("#people").val(),o=$("#topic").val(),a={url:CONFIG.ajax_url,type:"POST",nonce:CONFIG.nonce,data:{action:"home_search",people:t,topic:o}};$.ajax(a).done((function(e){$(".custom-search-results").html(e),$(".custom-search-results").addClass("revealed"),$(".custom-search-results [data-brochure-trigger]").each((function(){$(this).on("click",(function(){$("#brochureForm").toggleClass("revealed"),$("#brochureForm").hasClass("revealed")&&$("#brochureForm .brochure-form-content form").focus()}))}))}))})),$(".testimonial-container").each((function(){$(this).slick({arrows:!1,dots:!0,autoplay:!0,autoplaySpeed:1e3,infinite:!0})}))},finalize(){}},r={init(){var e=new google.maps.Map(document.getElementById("google_map"),{zoom:16,mapTypeControl:!0,draggable:!1,scaleControl:!1,scrollwheel:!0,navigationControl:!0,streetViewControl:!0}),t=$(".lat").val(),o=$(".lng").val(),a=new google.maps.LatLng(parseFloat(t),parseFloat(o)),n={lat:parseFloat(t),lng:parseFloat(o)};new google.maps.Marker({position:n,map:e}),e.panTo(a)},finalize(){}};const s=new class{constructor(e){this.routes=e}fire(e,t="init",o){""!==e&&this.routes[e]&&"function"==typeof this.routes[e][t]&&this.routes[e][t](o)}loadEvents(){this.fire("common"),document.body.className.toLowerCase().replace(/-/g,"_").split(/\s+/).map(a).forEach((e=>{this.fire(e),this.fire(e,"finalize")})),this.fire("common","finalize")}}({common:n,home:i,pageTemplateContactPage:r});jQuery(document).ready((()=>s.loadEvents()))}));
2
3$('.accordion-trigger').on('click',function(){
4	$(this).parent().next('.accordion-item__content').slideToggle();
5	$(this).toggleClass('active');
6})

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.