PageSourceSearch

https://garringtoneastmidlands.co.uk/wp-content/themes/garrington/assets/js/general.js?ver=1633604906

js garringtoneastmidlands.co.uk collected 2026-10-07 17:26:58 UTC 6,538 bytes, 113 lines download raw bytes

1/*!
2 * jQuery Mousewheel 3.1.13
3 *
4 * Copyright 2015 jQuery Foundation and other contributors
5 * Released under the MIT license.
6 * http://jquery.org/license
7 */
8!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
9
10
11app = app || {};
12app.tabs = function($) {
13    return tabsInit = function() {
14        $(".tabs__tab").click(function(event) {
15            var jmpress = $(this).attr("href");
16            var innerDivStyle = $(this).position();
17            /** @type {number} */
18            newTop = parseInt(innerDivStyle.top) - 12;
19            /** @type {number} */
20            newHeight = parseInt($(this).outerHeight()) + 23;
21            group = $(this).data("tab");
22            $("[data-tab='" + group + "']").addClass("tabs__tab--active");
23            $("[data-tab='" + group + "']").siblings().removeClass("tabs__tab--active");
24            $(".tabs__content").not(jmpress).removeClass("tabs__content--active");
25            $(jmpress).addClass("tabs__content--active");
26            var params = $(this).offset();
27            var minMarginTop = $(window).scrollTop();
28            if ($(this).hasClass("tabs__tab--accordion") && params.top < minMarginTop) {
29                var brand_h = $(".brand").outerHeight();
30                /** @type {number} */
31                var brand_scroll_top = params.top - brand_h;
32                $("html, body").animate({
33                    scrollTop : brand_scroll_top
34                });
35            }
36            $(".tabs__highlight").css({
37                top : newTop + "px",
38                height : newHeight
39            });
40            event.preventDefault();
41        });
42    }, tabsResize = function() {
43        $(window).on("debouncedresize", function(n) {
44            if ($(".tabs").length) {
45                var innerDivStyle = $(".tabs__tab--active").position();
46                /** @type {number} */
47                newTop = parseInt(innerDivStyle.top) - 12;
48                /** @type {number} */
49                newHeight = parseInt($(".tabs__tab--active").outerHeight()) + 23;
50                $(".tabs__highlight").css({
51                    top : newTop + "px",
52                    height : newHeight
53                });
54            }
55        });
56    }, init = function() {
57        tabsInit();
58        tabsResize();
59    }, {
60        init : init
61    };
62}(jQuery, this), jQuery(app.tabs.init);
63
64
65jQuery(document).ready(function ($) {
66    var $b = $("body");
67
68    $("#mc-embedded-subscribe").on('click', function(e) {
69        e.preventDefault();
70        var email = $("#mce-EMAIL").val();
71        $("#input_3_4").val(email);
72        $(".signup-popup").show();
73        $b.addClass("signup-popup-opened");
74    });
75
76    $(".close-popup").on('click', function(e) {
77        $(".signup-popup").hide();
78        $b.removeClass("signup-popup-opened");
79    });
80
81    $(".gform_confirmation_message").on('click', ".close-this-window", function(e) {
82        $(".signup-popup").hide();
83        $b.removeClass("signup-popup-opened");
84
85    });
86
87    $b.on('DOMSubtreeModified', ".signup-popup", function() {
88        $(".close-this-window").on('click', function(e) {
89            $(".signup-popup").hide();
90            $b.removeClass("signup-popup-opened");
91        });
92    });
93
94
95
96    function h1_parallax(){
97        var home__carousel_text = $('.home__carousel .outer'),
98            home__carousel_height = $('.home__carousel #carousel').outerHeight(true),
99            home__carousel_flex_prev = $('.home__carousel .flex-prev'),
100            home__carousel_flex_next = $('.home__carousel .flex-next');
101
102        $(window).scroll(function() {
103            var scrollOffset = $(window).scrollTop();
104            if (scrollOffset < home__carousel_height) {
105                $(home__carousel_text).css('padding-top', (scrollOffset));
106                $(home__carousel_flex_prev).css('margin-top', ((scrollOffset/2)+5));
107                $(home__carousel_flex_next).css('margin-top', ((scrollOffset/2)+5));
108            }
109        });
110    }
111    h1_parallax()
112
113});

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.