PageSourceSearch

https://snellingcenter.org/wp-content/themes/charitas-wpl/js/base.js?ver=490f8041074c9a9299806b7a96f6e05c

js snellingcenter.org collected 2026-09-26 07:37:54 UTC 6,859 bytes, 247 lines download raw bytes

1jQuery(document).ready(function($){
2	"use strict";
3
4	/* Mobile Menu */
5	jQuery(document).ready(function () {
6		jQuery('header nav.site-navigation').meanmenu();
7	});
8
9	/* Menu accessibility */
10	// Source: https://core.trac.wordpress.org/attachment/ticket/24839/24839-twentytwelve.diff
11	$( 'li.menu-item a' ).on({
12		focusin : function( e ) {
13			$( this ).addClass( 'focus' );
14
15			if( $( this ).parents( 'li' ).find( '> ul' ) ) {
16				$( this ).parents( 'li' ).each( function() {
17					$( this ).addClass( 'show' );
18				});
19			}
20		},
21		focusout : function( e ) {
22			$( this ).removeClass( 'focus' );
23
24			if( $( this ).parents( 'li' ).find( '> ul' ).is( ':visible' ) ) {
25				$( this ).parents( 'li' ).removeClass( 'show' );
26			}
27		}
28	});
29
30	/* Menu */
31	// Following http://stackoverflow.com/questions/11512032/detect-if-dropdown-navigation-would-go-off-screen-and-reposition-it
32	$( '.nav-menu li.menu-item-has-children' ).on('mouseenter mouseleave focusin', function (e) {
33		e.stopPropagation();
34
35		if (jQuery('ul.sub-menu', this).length) {
36			// Fix for focusin
37			if( $('ul.sub-menu', this).hasClass( 'off-screen' ) ) {
38				$('ul.sub-menu', this).addClass('off-screen');
39				return;
40			}
41
42			var elm = jQuery('ul:first', this);
43			var off = elm.offset();
44			var l = off.left;
45			var w = elm.width();
46			var docW = jQuery(window).width();
47
48			var isEntirelyVisible = (l + w <= docW);
49
50			if (!isEntirelyVisible) {
51				$('ul.sub-menu', this).addClass('off-screen');
52			} else {
53				$('ul.sub-menu', this).removeClass('off-screen');
54			}
55		}
56	});
57
58	/* FitVids */
59	jQuery(document).ready(function(){
60		// Target your .container, .wrapper, .post, etc.
61		jQuery(".WPlookLatestNews .image, iframe").fitVids();
62	});
63
64
65	jQuery('body').stellar({
66		responsive: true,
67		horizontalScrolling: false,
68		verticalScrolling: true,
69		parallaxBackgrounds: true,
70		parallaxElements: true,
71		hideDistantElements: true
72	});
73
74	/* Masonry */
75	jQuery(window).load(function() {
76		var jQuerycontainer = jQuery('.js-masonry');
77		jQuerycontainer.imagesLoaded(function(){
78			jQuerycontainer.masonry({
79				itemSelector: '.candidate',
80				columnWidth: 1,
81				isAnimated: true,
82				animationOptions: {
83					duration: 750,
84					easing: 'easeInOutCirc',
85					queue: false
86				}
87			});
88
89		});
90	});
91
92	/* Flex Slider Teaser */
93	jQuery(window).load(function() {
94		jQuery('.flexslider').flexslider({
95			animation: "fade",
96			animationLoop: true,
97			pauseOnAction: true,
98			pauseOnHover: true,
99			controlNav: "thumbnails",
100			start: function(slider) {
101				jQuery( '.flexslider' ).removeClass('loading');
102			}
103		});
104	});
105
106	/* Featured News Slider */
107	jQuery(window).ready(function() {
108		jQuery('.flexslider-news').flexslider({
109		controlNav: false,
110		directionNav:true,
111		animationLoop: true,
112		animation: "fade",
113		useCSS: true,
114		smoothHeight: true,
115		slideshow: false,
116		slideshowSpeed:3000,
117		pauseOnAction: true,
118		touch: true,
119		animationSpeed: 900,
120		start: function(slider) {
121				jQuery( '.flexslider-news' ).removeClass('loading');
122			}
123		});
124	});
125
126	/* Gallery Posts Slider */
127	jQuery(window).ready(function() {
128
129		jQuery('#flexslider-gallery-carousel').flexslider({
130			animation: "slide",
131			controlNav: false,
132			animationLoop: false,
133			slideshow: true,
134			itemWidth: 150,
135			asNavFor: '.flexslider-gallery'
136		});
137
138		jQuery('.flexslider-gallery').flexslider({
139			animation: "fade",
140			controlNav: false,
141			animationLoop: false,
142			slideshow: false,
143			sync: "#flexslider-gallery-carousel",
144			start: function(slider) {
145				jQuery( '.flexslider-gallery' ).removeClass('loading');
146			}
147		});
148
149	});
150
151	/* Toggle for Causes */
152	jQuery(".donate_now").click(function () {
153		jQuery(".paymend_detailes").toggle();
154	});
155
156	/* Toggle donate*/
157	jQuery(".toggle-content-donation .expand-button").click(function() {
158		jQuery(this).toggleClass('close').parent('div').find('.expand').slideToggle(250);
159	});
160
161	/* Toggle for Events */
162	if( $( '.wplook-google-map' ).length > 0 ) {
163		$( '.event-address' ).click(function () {
164			$( '.event-map' ).toggle( function() {
165				$( '.event-map .wplook-google-map' ).wplGoogleMaps();
166			});
167		});
168	}
169
170	/* Toggle for Share buttons */
171	jQuery(".share-buttons").click(function () {
172		jQuery(".share-items").toggle();
173	});
174
175	jQuery(".bookplace").click(function () {
176		jQuery(".book-your-place").toggle('slow');
177	});
178
179	/* Stick the menu */
180	jQuery(function() {
181		// grab the initial top offset of the navigation
182		var sticky_navigation_offset_top = jQuery('#sticky_navigation').offset().top+40;
183
184		// our function that decides weather the navigation bar should have "fixed" css position or not.
185		var sticky_navigation = function(){
186			var scroll_top = jQuery(document).scrollTop(); // our current vertical position from the top
187
188			// if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
189			if (scroll_top > sticky_navigation_offset_top) {
190				jQuery('#sticky_navigation').stop(true).animate({ 'padding':'5px 0;','min-height':'60px','opacity' : 0.99 }, 500);
191				jQuery('#sticky_navigation').css({'position': 'fixed', 'top':0, 'left':0 });
192			} else {
193				jQuery('#sticky_navigation').stop(true).animate({ 'padding':'20px 0;','min-height':'60px', 'opacity' : 1}, 100);
194				jQuery('#sticky_navigation').css({ 'position': 'relative' });
195			}
196		};
197
198		sticky_navigation();
199
200		jQuery(window).scroll(function() {
201			sticky_navigation();
202		});
203
204	});
205
206
207	/* Tabs */
208	jQuery('.panes div').hide();
209	jQuery(".tabs a:first").addClass("selected");
210	jQuery(".tabs_table").each(function(){
211			jQuery(this).find('.panes div:first').show();
212			jQuery(this).find('a:first').addClass("selected");
213	});
214	jQuery('.tabs a').click(function(){
215			var which = jQuery(this).attr("rel");
216			jQuery(this).parents(".tabs_table").find(".selected").removeClass("selected");
217			jQuery(this).addClass("selected");
218			jQuery(this).parents(".tabs_table").find(".panes").find("div").hide();
219			jQuery(this).parents(".tabs_table").find(".panes").find("#"+which).fadeIn(800);
220	});
221
222	/* Toggle */
223	jQuery(".toggle-content .expand-button").click(function() {
224		jQuery(this).toggleClass('close').parent('div').find('.expand').slideToggle(250);
225	});
226
227	/* Google Fonts */
228	WebFont.load({
229		google: {
230			families: ['Arimo:400,700,400italic,700italic', 'Archivo Narrow:400,400italic,700italic,700:latin,cyrillic-ext,greek-ext,vietnamese,greek,latin-ext,cyrillic']
231		}
232	});
233
234});
235
236// Share buttons
237function twwindows(object) {
238	window.open( object, "twshare", "height=400,width=550,resizable=1,toolbar=0,menubar=0,status=0,location=0" )
239}
240
241function fbwindows(object) {
242	window.open( object, "fbshare", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" )
243}
244
245function pinwindows(object) {
246	window.open( object, "pinshare", "height=270,width=630,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" )
247}

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.