PageSourceSearch

https://extendfertility.com/wp-content/themes/Extend%20Fertility/js/theme.min.js?ver=1790816433

js extendfertility.com collected 2026-10-02 07:19:03 UTC 20,450 bytes, 401 lines download raw bytes

1jQuery(document).ready(function($) {
2	//--------------------
3	//  WOW
4	///--------------------
5	wow = new WOW(
6        {
7          boxClass: 'wow',
8          animateClass: 'animated',
9          offset: 0,
10          mobile: false,
11          live: true
12        }
13    );
14    wow.init();
15
16	//--------------------
17	//  SMOOTH SCROLL
18	//--------------------
19	function menuScroll() {
20		var hash = location.hash;
21		$(".page-scroll__menu a").each(function() {
22			if ($(this).attr("href") === hash) {
23				$(this)
24					.siblings()
25					.removeClass("active");
26				$(this).addClass("active");
27			}
28		});
29	}
30
31	menuScroll();
32
33	$("#page-scroll-menu a").click(function(event) {
34		// On-page links
35		if (
36			location.pathname.replace(/^\//, "") ==
37				this.pathname.replace(/^\//, "") &&
38			location.hostname == this.hostname
39		) {
40			// Figure out element to scroll to
41			var target = $(this.hash);
42			target = target.length ? target : $("[id=" + this.hash.slice(1) + "]");
43
44			// Does a scroll target exist?
45			if (target.length) {
46				// Only prevent default if animation is actually gonna happen
47				//event.preventDefault();
48				$("html, body").animate(
49					{
50						scrollTop: target.offset().top
51					},
52					1000,
53					function() {
54						// Callback after animation
55						// Must change focus!
56						var $target = $(target);
57						$target.focus();
58						menuScroll();
59						if ($target.is(":focus")) {
60							// Checking if the target was focused
61							return false;
62						} else {
63							$target.attr("tabindex", "-1"); // Adding tabindex for elements not focusable
64							$target.focus(); // Set focus again
65						}
66					}
67				);
68			}
69		}
70	});
71
72	//--------------------
73	//  ACCORDION
74	//--------------------
75
76	$(".accordion__nav a").click(function(e) {
77		e.preventDefault();
78		$(this)
79			.addClass("active")
80			.siblings()
81			.removeClass("active");
82		$(".accordion__table")
83			.removeClass("active")
84			.siblings($(this).attr("href"))
85			.addClass("active");
86	});
87
88	//--------------------
89	//  A11Y NAV
90	//--------------------
91
92	$('#primary-menu, #primary-menu a, .header__button').focus(function () {
93		$(this).parents("li").addClass("focus");
94		$('.main-bar').addClass("focus");
95	}).blur(function () {
96		$(this).parents("li").removeClass("focus");
97	});
98
99	$('.search-toggle, .close').keypress(function (e) {
100		if (e.which && e.which == 13) { //  13 is character code for enter
101			// event.preventDefault();
102			$(this).click();
103		}
104	});
105
106	// // WATCHER
107	// var watcher = window.matchMedia("(max-width: 449px)");
108
109	// // Call listener function at run time
110	// windowWidth(watcher);
111
112	// // Attach listener function on state changes
113	// watcher.addListener(windowWidth);
114
115	// function windowWidth(watcher) {
116	// 	if (watcher.matches) {
117	// 		// If media query matches
118	// 		// console.log('x matches');
119	// 		$('.mobile-contact__button').detach('.header__wrapp').prependTo('.mobile-menu');
120	// 	} else {
121	// 		// console.log('x does not match');
122	// 		$('.mobile-contact__button').detach().prependTo('.header__wrapp');
123	// 	}
124	// }
125});
126
127jQuery(document).ready(function ($) {
128
129	// SCROLL POSITION FOR HEADER
130	$(window).scroll(function () {
131		var $height = $(window).scrollTop();
132
133		// console.log($height);
134
135		if ($height > 55) {
136			$('.main-bar_mobile').addClass('scrolled');
137		} else {
138			$('.main-bar_mobile').removeClass('scrolled');
139		}
140	});
141
142	// WATCHER
143	var sticky = window.matchMedia("(max-width: 1023px)");
144
145	// Call listener function at run time
146	windowWidth(sticky);
147
148	// Attach listener function on state changes
149	sticky.addListener(windowWidth);
150
151	function windowWidth(sticky) {
152		if (sticky.matches) {
153			// If media query matches
154			// console.log('window is less than 1023');
155			$('.site-header, .radio-header, .main-bar_mobile, .radio-header__row, .tob-bar').addClass('sticky-stick');
156		} else {
157			// console.log('window is greater than 1023');
158			$('.site-header, .radio-header, .main-bar_mobile, .radio-header__row, .tob-bar').removeClass('sticky-stick');
159		}
160	}
161});
162
163jQuery(document).ready(function ($) {
164    $('.team-button').on("click", function () {
165
166        const parent = $(this).parent().parent().next('.team-info').css('display', 'block');
167        $('.overlay').show();
168
169    });
170
171    $('.team-button_small').on("click", function () {
172        var positionTop = $(this).position()
173        var smallHeight= $('.team-block_small').height();
174        var sums = smallHeight - 47 ;
175        var sum = positionTop.top - sums;
176        var par = $(this).parent().parent().next('.team-info');
177        var parSmall = $(this).parent().parent().next('.team-info_small');
178
179        par.css('display', 'block');
180        parSmall.css('display', 'block').css('top', sum).css('max-height', smallHeight + +10);
181
182        $(window).resize(function () {
183            parSmall.css('display', 'none')
184            $('.overlay').hide();
185        })
186        $('.overlay').show();
187
188    });
189
190    $('.team-button_big').on("click", function () {
191
192        const par = $(this).parent().parent().next('.team-info');
193        par.css('display', 'block');
194        const th1 = $('.team > :nth-child(1)')[0];
195        const th2 = $('.team > :nth-child(2)')[0];
196        // console.log(th1);
197        // console.log(th2);
198
199        $('.team-block_big').each(function (i, pars) {
200            var addClass1 = i % 2 === 0 ? 'odd-big' : 'even-big';
201
202
203            const sum1 = th2.offsetLeft - th1.offsetLeft - th1.offsetWidth;
204            const right = '-' + (sum1 + th1.offsetWidth) + 'px';
205
206
207            $(window).resize(function () {
208
209                const sum1 = th2.offsetLeft - th1.offsetLeft - th1.offsetWidth;
210                const right = '-' + (sum1 + th1.offsetWidth) + 'px';
211
212                $('.odd-big').css('right', right);
213                $('.even-big').css('left', right);
214            });
215
216            $('.odd-big').css('right', right);
217            $('.even-big').css('left', right);
218            $(pars).find('.team-info_big').addClass(addClass1);
219
220        });
221
222        $('.overlay').show();
223
224    });
225
226
227    $('.overlay').on("click", function () {
228        $('.overlay').hide();
229        $('.team-info').hide();
230    });
231    $('.close').on("click", function () {
232        $('.overlay').hide();
233        $('.team-info').hide();
234    });
235});
236
237
238jQuery(document).ready(function($) {
239
240});
241
242jQuery(document).ready(function ($) {
243
244    $(".accordion-container__show > .show-item").on("click", function () {
245        if ($(this).hasClass("active")) {
246            $(this).removeClass("active");
247            $(this)
248                .siblings(".hidden-content")
249                .slideUp(200);
250            $(".accordion-container__show > .show-item > button span")
251                .removeClass("fa-minus")
252                .addClass("fa-plus");
253        } else {
254            $(".accordion-container__show > .show-item > button span")
255                .removeClass("fa-minus")
256                .addClass("fa-plus");
257            $(this)
258                .find("span")
259                .removeClass("fa-plus")
260                .addClass("fa-minus");
261            $(".accordion-container__show > button").removeClass("active");
262            $(this).addClass("active");
263            $(".hidden-content").slideUp(200);
264            $(this)
265                .siblings(".hidden-content")
266                .slideDown(200);
267        }
268    });
269
270    $(".hidden-content__block > .show-block").on("click", function () {
271        if ($(this).hasClass("active")) {
272            $(this).removeClass("active");
273            $(this)
274                .siblings(".show-subcontent")
275                .slideUp(200);
276            $(".hidden-content__block > .show-block > button span")
277                .removeClass("fa-minus")
278                .addClass("fa-plus");
279        } else {
280            $(".hidden-content__block > .show-block > button span")
281                .removeClass("fa-minus")
282                .addClass("fa-plus");
283            $(this)
284                .find("span")
285                .removeClass("fa-plus")
286                .addClass("fa-minus");
287            $(".hidden-content__block > .show-block > button").removeClass("active");
288            $(this).addClass("active");
289            $(".show-subcontent").slideUp(200);
290            $(this)
291                .siblings(".show-subcontent")
292                .slideDown(200);
293        }
294    });
295});
296jQuery(document).ready(function ($) {
297    $(".accordion-container__show > button").on("click", function () {
298        if ($(this).hasClass("active")) {
299            $(this).removeClass("active");
300            $(this)
301                .siblings(".hidden-content")
302                .slideUp(200);
303            $(".accordion-container__show > button span")
304                .removeClass("fa-minus")
305                .addClass("fa-plus");
306        } else {
307            $(".accordion-container__show > button span")
308                .removeClass("fa-minus")
309                .addClass("fa-plus");
310            $(this)
311                .find("span")
312                .removeClass("fa-plus")
313                .addClass("fa-minus");
314            $(".accordion-container__show > button").removeClass("active");
315            $(this).addClass("active");
316            $(".hidden-content").slideUp(200);
317            $(this)
318                .siblings(".hidden-content")
319                .slideDown(200);
320        }
321    });
322});
323$(document).ready(function () {
324    $('#pardot-form-footer').submit(function (e) {
325        var email = $('#email-footer').val();
326
327        $(".error").remove();
328
329        var regEx = /^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$/;
vendor: 10,931 bytes, lines 330-401
330        var validEmail = regEx.test(email);
331        if (!validEmail) {
332            e.preventDefault();
333            $('#email-footer').after('<p class="error">Enter a valid email</p>');
334
335        } else {
336            location.href = '/thank-you/';
337        }
338
339    });
340
341    $('#pardot-form').submit(function (e) {
342
343        var first_name = $('#first_name').val();
344        var last_name = $('#last_name').val();
345        var email = $('#email').val();
346        var phone = $('#phone').val();
347        var dob = $('#dob').val();
348        var numberOfCheckedRadio = $('input:radio:checked');
349
350        $(".error").remove();
351
352        if (first_name.length < 1 || last_name.length < 1 || email.length < 1 || phone.length > 1 || dob.length < 1 || numberOfCheckedRadio < 1) {
353            if (first_name.length < 1) {
354                e.preventDefault();
355                $('#first_name').after('<span class="error">This field is required</span>');
356            }
357            if (last_name.length < 1) {
358                e.preventDefault();
359                $('#last_name').after('<span class="error">This field is required</span>');
360            }
361            if (email.length < 1) {
362                e.preventDefault();
363                $('#email').after('<span class="error">This field is required</span>');
364            }
365            if (dob.length < 1) {
366                e.preventDefault();
367                $('#dob').after('<span class="error">This field is required</span>');
368            } 
369            if (numberOfCheckedRadio.length < 1) {
370                e.preventDefault();
371                $('.Service_Interested_In').after('<span class="error">This field is required</span>');
372            } else {
373                var regEx = /^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$/;
374                var validEmail = regEx.test(email);
375                if (!validEmail) {
376                    $('#email').after('<span class="error">Enter a valid email</span>');
377                }
378            }
379
380            if (phone.length > 1) {
381                var regExPhone = /^(\+)?(\(\d{2,3}\) ?\d|\d)(([ \-]?\d)|( ?\(\d{2,3}\) ?)){5,12}\d$/;
382                var validPhone = regExPhone.test(phone);
383                if (!validPhone) {
384                    e.preventDefault();
385                    $('#phone').after('<span class="error">Enter a valid phone</span>');
386                }
387            }
388
389        } else {
390            location.href = '/thank-you/';
391        }
392
393
394
395
396    });
397});
398
399/*! WOW - v1.1.3 - 2016-05-06
400* Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
401//# sourceMappingURL=../js/theme.min.js.map

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.