PageSourceSearch

https://familiesfirstmediation.com/wp-content/themes/nanocare/assets/js/theme.js?ver=1.0.0

js familiesfirstmediation.com collected 2026-10-06 11:14:12 UTC 13,187 bytes, 300 lines download raw bytes

1( function( $ ) {
2	"use strict";
3
4	var $win = $(window), $doc = $(document), $body = $('body');
5
6$.fn['contentGrid'] = function() {
7	return this.each(function() {
8		var $this = $(this);
9
10		$this.imagesLoaded().then(function() {
11			$this.isotope(
12				$.extend({}, $this.data('grid'), {
13					layoutMode: 'packery',
14					percentPosition: true
15				})
16			);
17		});
18	});
19};
20$.fn['contentGridFilter'] = function() {
21	return this.each(function() {
22		var targetSelector = $(this).attr('data-filter-target'),
23			target = $(targetSelector),
24			filter = $(this);
25
26		filter.on('click', 'a', function(e) {
27			e.preventDefault();
28
29			$('.active', filter).removeClass('active');
30			$(this).closest('li').addClass('active');
31
32			target.isotope({
33				filter: $( this ).parent().attr( 'data-filter' )
34			});
35		});
36	});
37};
38$.headerSticky = function() {
39	$win.on( 'scroll load', function() {
40		$win.scrollTop() > $( '#site-header' ).outerHeight()
41			? $( '.site-header-sticky' ).addClass( 'active' )
42			: $( '.site-header-sticky' ).removeClass( 'active' );
43	} );
44};
45
46$.mobileMenu = function () {
47  $('ul.menu li.menu-item-has-children').each(function () {
48    var menuItem = $(this)
49    var menuToggle = $('<span class="menu-item-toggle"><span></span></span>')
50
51    menuToggle.insertAfter(menuItem.find('> a'))
52      .on('click', function () {
53        menuItem.toggleClass('menu-item-expand')
54      })
55  })
56}
57
58function NavSearch( element ) {
59	this.element = $( element );
60	this.toggler = $( '> a:first-child', this.element );
61	this.input   = $( 'input', this.element );
62
63	$doc.on( 'click', this.hide.bind( this ) );
64
65	this.toggler.on( 'click', this.toggle.bind( this ) );
66	this.element.on( 'click', function( e ) {
67		e.stopPropagation();
68	});
69
70	this.element.on( 'keydown', ( function( e ) {
71		if ( e.keyCode == 27 )
72			this.hide();
73	} ).bind( this ) );
74
75	$.each( ['transitionend', 'oTransitionEnd', 'webkitTransitionEnd'], ( function( index, eventName ) {
76		$( '> div', this.element ).on( eventName, ( function() {
77			if ( this.element.hasClass( 'active' ) )
78				this.input.get( 0 ).focus();
79		} ).bind( this ) );
80	} ).bind( this ) );
81};
82
83NavSearch.prototype = {
84	toggle: function( e ) {
85		e.preventDefault();
86		e.stopPropagation();
87
88		this.element.toggleClass( 'active' );
89	},
90
91	hide: function() {
92		this.element.removeClass( 'active' );
93	}
94};
95
96$.fn.navSearch = function( options ) {
97	return this.each( function() {
98		$( this ).data( '_navSearch', new NavSearch( this, options ) );
99	} );
100};
101
102$.fn['offCanvasToggle'] = function() {
103	return this.each(function() {
104		var activeClass = $(this).attr('data-target') + '-active';
105
106		$(this).on('click', function(e) {
107			e.preventDefault();
108			e.stopPropagation();
109			
110			$('body').toggleClass(activeClass);
111		});
112
113		$doc.on('click', function() {
114			$('body').removeClass(activeClass);
115		});
116
117		$('.off-canvas').on('click', function(e) {
118			e.stopPropagation();
119		});
120	});
121};
122
123$.fn['swiperSlider'] = function() {
124	return this.each(function() {
125		$(this).swiper($.extend({}, $(this).data('swiper'), {
126			nextButton: '.swiper-button-next',
127			prevButton: '.swiper-button-prev'
128		}));
129	});
130};
131$.gotop = function() {
132	$('.go-to-top a').on('click', function() {
133		$( 'html, body' ).animate({ scrollTop: 0 });
134	});
135
136	$win.on('scroll', function() {
137		if ($win.scrollTop() > 0) $('.go-to-top').addClass('active');
138		else $('.go-to-top').removeClass('active');
139	}).on('load', function() {
140		$win.trigger('scroll');
141	});
142};
143$.fn['googleMaps'] = function() {
144  return this.each(function() {
145    var
146    elm       = $(this),
147    elmCanvas = this,
148    locations = {},
149    geocoder  = {},
150    elmConfig = $.extend({
151      locations: encodeURIComponent('[]'),
152      zoomable: 'yes',
153      zoomlevel: 15,
154      draggable: 'yes',
155      type: 'roadmap',
156      style: 'default'
157    }, elm.data('options'));
158
159    if (elmConfig.locations) {
160      elmConfig.locations = decodeURIComponent(elmConfig.locations);
161    }
162
163    try {
164      var mapStyles = {
165        'subtle-grayscale': [{"featureType":"landscape","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]}
165,{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}],
166        'pale-dawn':        [{"featureType":"administrative","elementType":"all","stylers":[{"visibility":"on"},{"lightness":33}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2e5d4"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#c5dac6"}]},{"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":20}]},{"featureType":"road","elementType":"all","stylers":[{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#c5c6c6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#e4d7c6"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#fbfaf7"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"on"},{"color":"#acbcc9"}]}],
167        'blue-warter':      [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#46bcec"},{"visibility":"on"}]}],
168        'light-monochrome': [{"featureType":"administrative.locality","elementType":"all","stylers":[{"hue":"#2c2e33"},{"saturation":7},{"lightness":19},{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"simplified"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":-2},{"visibility":"simplified"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"hue":"#e9ebed"},{"saturation":-90},{"lightness":-8},{"visibility":"simplified"}]},{"featureType":"transit","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":10},{"lightness":69},{"visibility":"on"}]},{"featureType":"water","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":-78},{"lightness":67},{"visibility":"simplified"}]}],
169        'shades-of-gray':   [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]
170      };
171
172      var mapTypes = {
173        'roadmap'  : google.maps.MapTypeId.ROADMAP,
174        'satellite': google.maps.MapTypeId.SATELLITE,
175        'hybrid'   : google.maps.MapTypeId.HYBRID,
176        'terrain'  : google.maps.MapTypeId.TERRAIN
177      };
178
179      var createMarker = function(map, location, image) {
180        return new google.maps.Marker({
181          map: map,
182          position: location,
183          icon: image
184        });
185      };
186      
187      locations = $.parseJSON(elmConfig.locations);
188      geocoder = new google.maps.Geocoder();
189
190      if (locations.length && locations.length > 0) {
191        var centerLocation = locations.shift();
192        var map = {};
193
194        geocoder.geocode({ 'address': centerLocation.address }, function(results, status) {
195          if (status == google.maps.GeocoderStatus.OK) {
196            map = new google.maps.Map(elmCanvas, {
197              center     : results[0].geometry.location,
198              zoom       : parseInt(elmConfig.zoomlevel || 12),
199              mapTypeId  : mapTypes[elmConfig.type || 'roadmap'],
200              scrollwheel: elmConfig.zoomable == 'yes',
201              styles     : mapStyles[elmConfig.style],
202              panControl: true,
203              scaleControl: true,
204              streetViewControl: true,
205              zoomControl: true,
206              draggable: elmConfig.draggable == 'yes'
207            });
208
209            if (centerLocation.marker != '') {
210              var centerMarker = createMarker(map, results[0].geometry.location, centerLocation.marker);
211
212              if (centerLocation.content != '') {
213                var infoWindow = new google.maps.InfoWindow({
214                  content: centerLocation.content
215                });
216
217                centerMarker.addListener('click', function() {
218                  infoWindow.open(map, centerMarker);
219                });
220              }
221            }
222
223            if (locations.length > 0) {
224              $.map(locations, function(location) {
225                geocoder.geocode({ 'address': location.address }, function(results, status) {
226                  if (results.length > 0) {
227                    if (location.marker != '') {
228                      var marker = createMarker(map, results[0].geometry.location, location.marker);
229
230                      if (location.content != '') {
231                        var infoWindow = new google.maps.InfoWindow({
232                          content: location.content
233                        });
234                        
235                        marker.addListener('click', function() {
236                          infoWindow.open(map, marker);
237                        });
238                      }
239                    }
240                  }
241                });
242              });
243            }
244          }
245        });
246      }
247    }
248    catch(e) {}
249  });
250};
251
252$(function() {
253	// Initialize the header sticky
254	$.headerSticky();
255
256  // Initialize the menu mobile
257  $.mobileMenu();
258
259	// Initialize go-to-top button
260	$.gotop();
261
262	// Initialize scroll down arrow
263	$('.content-header .down-arrow a').on('click', function() {
264		var stickyHeaderHeight = $('#site-header-sticky').height() || 0;
265		var adminbarHeight = $('#wpadminbar').height() || 0;
266		var contentOffset = $('.content-header').offset().top + $('.content-header').outerHeight();
267
268		$( 'html, body' ).animate({
269			scrollTop: contentOffset - (stickyHeaderHeight + adminbarHeight)
270		});
271	});
272
273	// Initialize the off-canvas toggler
274	$('.off-canvas-toggle').offCanvasToggle();
275
276	// Initialize the search box toggler on the
277	// navigation bar
278	$('.navigator .search-box').navSearch();
279
280	// Initialize the grid component
281	$('[data-grid]').contentGrid();
282
283	// Initialize the grid items filter
284	$('[data-filter-target]').contentGridFilter();
285
286	// Initialize swiper slider
287	$('[data-swiper]').swiperSlider();
288
289	// Initialize lightbox
290	$('[rel^="prettyPhoto"]').prettyPhoto({
291		social_tools: ''
292	});
293});
294
295$(window).on('load', function() {
296  $('.elm-google-maps[data-options]').googleMaps();
297});
298
299
300} ).call( this, jQuery )

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.