PageSourceSearch

https://gardenshf.org/wp-content/themes/gardenshf/custom.js?ver=1692423252

js gardenshf.org collected 2026-09-24 11:23:40 UTC 7,759 bytes, 184 lines download raw bytes

1var currentMode = "";
2jQuery(document).ready(function() {
3jQuery( "#mobilemenubutton a" ).click(function() {
4       jQuery("#mainmenu").slideToggle( "slow" , function() { return false; });
5       if (jQuery("#mobilemenubutton a.fas").hasClass("fa-bars")) {
6           jQuery("#mobilemenubutton a.fas").removeClass("fa-bars");
7           jQuery("#mobilemenubutton a.fas").addClass("fa-times");
8		   jQuery("#mainmenu ul.mainmenu li.menu-item-has-children").each(function() {
9               if (!(jQuery(this).find("a").first().hasClass("updated"))) { 
10			       if (!(jQuery( this ).parent().hasClass("sub-menu"))) {
11				        jQuery( this ).find("a").first().append('<span class="expander"></span>');
12				        jQuery( this ).find("a").first().addClass("updated");
13				   }
14			    }
15           });
16		   jQuery("#mainmenu").append(jQuery("#___gcse_0"));
17       } else {
18           jQuery("#mobilemenubutton a.fas").removeClass("fa-times");
19           jQuery("#mobilemenubutton a.fas").addClass("fa-bars");
20       }
21       if(jQuery("#quickSearchWrapper").is(":visible"))
22       {
23           jQuery("#quickSearchWrapper").slideToggle( "slow" , function() {});
24       }
25});
26jQuery( "#searchicon a" ).click(function() {
27       jQuery("#quickSearchWrapper").slideToggle( "slow" , function() { return false; });
28       if((jQuery("#mainmenu").is(":visible")) && (jQuery("#mobilemenubutton").css("display") === "block"))
29       {
30           jQuery("#mainmenu").slideToggle( "slow" , function() {});
31           if (jQuery("#mobilemenubutton a.fas").hasClass( "fa-times")) {
32             jQuery("#mobilemenubutton a.fas").removeClass("fa-times");
33             jQuery("#mobilemenubutton a.fas").addClass("fa-bars");
34           }
35       }
36});
37updatePage();
38jQuery("#mainmenu.mobile .menu-main-menu-container ul li.menu-item-has-children a").on('click','span.expander',function(e) {
39       jQuery( this ).parent().parent().find("ul.sub-menu").slideToggle( "slow" , function() { return false; });
40       if (jQuery( this ).parent().hasClass("open")) {
41          jQuery( this ).parent().removeClass("open");
42       } else {
43          jQuery( this ).parent().addClass("open"); 
44       }
45       e.preventDefault();  
46});	
47	
48jQuery('a.scroll[href*="#"]').click(function() {
49    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
50    && location.hostname == this.hostname) {
51      var target = jQuery(this.hash);
52      target = target.length && target
53      || jQuery('[name=' + this.hash.slice(1) +']');
54      if (target.length) {
55        var targetOffset = target.offset().top - 100
56        jQuery('html,body')
57        .animate({scrollTop: targetOffset}, 1000);
58       return false;
59      }
60    }
61  });	
62jQuery(".resource").css("display", "none");
63jQuery(".open").next(".resource").css("display", "block");
64jQuery(".gallery-icon a").fancybox().attr('data-fancybox', 'wp-gallery-fancybox');	
65	
66//toggle the component with class
67jQuery(".accordionHead").click(function()
68{
69if(! jQuery(this).next(".resource").is(":visible"))
70{
71jQuery(this).attr("class", "open accordionHead");
72jQuery(this).children('i').attr("class","fas fa-minus-circle");
73jQuery(this).next(".resource").slideToggle(500);
74}
75else
76{
77jQuery(this).attr("class", "closed accordionHead");
78jQuery(this).children('i').attr("class","fas fa-plus-circle");
79jQuery(this).next(".resource").slideToggle(500);
80}
81});
82});
83jQuery(window).resize(function () {
84    updatePage();  //run on every window resize
85});
86jQuery(document).scroll(function() {
87	if (currentMode == "desktop") {
88    var headerheight = jQuery( '.wrapper.header' ).height();
89	var bannerheight = jQuery( '#banner').height();
90    var scrollpoint = bannerheight;
91	if (jQuery(this).scrollTop() > scrollpoint) {
92    	jQuery(".wrapper.header").addClass("sticky");
93	} else {
94		jQuery(".wrapper.header").removeClass("sticky");
95	}
96	}	
97
98});
99function updatePage(){
100	if ((jQuery("#mobilemenubutton").css("display") === "none") && (currentMode != "desktop")) { 
101	  currentMode = "desktop";
102      jQuery("#mainmenu").css("display","block");
103	  jQuery("#mainmenu").removeClass('mobile');	
104	  jQuery("#mainmenu").addClass('desktop');	
105	  jQuery("#quickSearchWrapper").append(jQuery("#___gcse_0"));
106      if (jQuery("#mobilemenubutton a.fas").hasClass( "fa-times")) {
107           jQuery("#mobilemenubutton a.fas").removeClass("fa-times");
108           jQuery("#mobilemenubutton a.fas").addClass("fa-bars");
109      }
110    } else if ((jQuery("#mobilemenubutton").css("display") === "block") && (currentMode != "mobile")) {	
111	  currentMode = "mobile";
112	  jQuery("#mainmenu").addClass('mobile');
113	  jQuery("#mainmenu").removeClass('desktop');
114	  jQuery("#mainmenu").append(jQuery("#___gcse_0"));	
115      if (jQuery("#mobilemenubutton a.fas").hasClass( "fa-bars")) {
116       jQuery("#mainmenu").css("display","none");     
117      }
118    }
119	jQuery( '.bannermidpage' ).each(function() {
120	 var bannerheight = jQuery(this).height();
121	 var copyheight = jQuery(this).find('#copywrapper').height();
122	 if (copyheight <= bannerheight) {
123		 var newbannerheight = copyheight + 100;
124		 var toppad = (bannerheight - copyheight)/2;
125		 jQuery(this).find('#copywrapper').css('top',toppad + 'px');
126		 jQuery(this).css('height',newbannerheight + 'px');
127	 } else if (bannerheight < copyheight) {
128		 var newheight = copyheight + 100;
129		 jQuery(this).css('height',newheight + 'px');
130		 jQuery(this).find('#copywrapper').css('top','50px');
131	 }
132	});
133	jQuery( '#banner.short.showtitle' ).each(function() {
134	 var bannerwidth = jQuery(this).width();
135	 var bannerheight;
136	 if (bannerwidth > 1200) { bannerheight = 300; }
137	 else if (bannerwidth > 900) { bannerheight = 250; }
138	 else if (bannerwidth > 600) { bannerheight = 200; }
139	 else { bannerheight = 150; }
140	 var titleheight = jQuery(this).find('h1').height();
141	 var bottompad = (bannerheight - titleheight)/2;
142	 jQuery(this).css('height',bannerheight + 'px');
143	 jQuery(this).find('h1').css('bottom',bottompad + 'px');
144	});
145	jQuery( '#banner.standard.showtitle' ).each(function() {
146	 var bannerwidth = jQuery(this).width();
147	 var bannerheight;
148	 if (bannerwidth > 1200) { bannerheight = 500; }
149	 else if (bannerwidth > 1000) { bannerheight = 400; }
150	 else if (bannerwidth > 768) { bannerheight = 300; }
151	 else if (bannerwidth > 600) { bannerheight = 250; }
152	 else if (bannerwidth > 450) { bannerheight = 200; }
153	 else { bannerheight = 150; }
154	 var titleheight = jQuery(this).find('h1').height();
155	 var bottompad = (bannerheight - titleheight)/2;
156	 jQuery(this).css('height',bannerheight + 'px');
157	 jQuery(this).find('h1').css('bottom',bottompad + 'px');
158	});
159	jQuery( '.photoandtext' ).each(function() {
160	 var photoheight = jQuery(this).find('.sideimagewrap').height();
161	 var copyheight = jQuery(this).find('.sidecopywrap').height();
162	 if (copyheight <= photoheight) {
163		 var newphotoheight = copyheight + 100;
164		 if (newphotoheight < 450) { newphotoheight = 450; }
165		 var toppad = (newphotoheight - copyheight)/2;
166		 jQuery(this).find('.sidecopywrap').css('margin-top',toppad + 'px');
167		 jQuery(this).find('.sideimagewrap').css('height',newphotoheight + 'px');
168	 } else if (photoheight < copyheight) {
169		 var newheight = copyheight + 100;
170		 jQuery(this).find('.sideimagewrap').css('height',newheight + 'px');
171		 jQuery(this).find('.sidecopywrap').css('margin-top','50px');
172	 }
173	});
174	jQuery( '.profilewrapper' ).each(function() {
175	 var photoheight = jQuery(this).find('.profileimage').height();
176	 var copyheight = jQuery(this).find('.profilecopywrap').height();
177	 if (copyheight < photoheight) {
178		 var toppad = (photoheight - copyheight)/2;
179		 jQuery(this).find('.profilecopywrap').css('padding-top',toppad + 'px');
180	 } else if (photoheight < copyheight) {
181		 jQuery(this).find('.profilecopywrap').css('padding-top','0px');
182	 }
183	});
184}

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.