PageSourceSearch

https://www.careforwomen.com/js/ypo-functions.js

js careforwomen.com collected 2026-10-04 16:04:33 UTC 27,278 bytes, 763 lines download raw bytes

1(function ($, window) {
2	$.fn.ypoPlugin = function (options) {
3		var settings = $.extend({
4			scroller: false,
5			mobileWidth: false,
6			mobileMenu: false,
7			slideMenu: false,
8			siteMap: false,
9			country_code: [],
10			show_country_code: false,
11			phone_numbers: [],
12			phone_info: [],
13			phone_link: [],
14			response_banner: false,
15			swap_banner: false,
16			accordion: false,
17			stickyHeader: false,
18			stickyHieght: '',
19			onView: false,
20			onViewList: [],
21			parallaxEffect: false,
22			disableMobileLink: [],
23			accessibility: false,
24			fontResize: false,
25			fontResizeList: [],
26			removeElements: [],
27			removeId: [],
28			removeChildId: [],
29			removeClass: [],
30			removeAttrClass: [],
31			removeChildClass: []
32		}, options);
33		return this.each(function () {
34			var checkMode = getCookie("dfw_website");
35			if(checkMode == '' || checkMode == 'undefined'){
36				setCookie("dfw_website", "accessible_off");
37			}
38			
39			var scroller = settings.scroller;
40			
41			var mobileWidth = settings.mobileWidth;
42			
43			var mobileMenu = settings.mobileMenu;
44			
45			var slideMenu = settings.slideMenu;
46			
47			var siteMap = settings.siteMap;
48			
49			var country_code = settings.country_code;
50			var show_country_code = settings.show_country_code;
51			var phone_numbers = settings.phone_numbers;
52			var phone_info = settings.phone_info;
53			var phone_link = settings.phone_link;
54			var phone_numbers_length = phone_numbers.length;
55			var country_code_length = country_code.length;
56			var phone_link_length = phone_link.length;
57			
58			var response_banner = settings.response_banner;
59			
60			var swap_banner = settings.swap_banner;
61			
62			var accordion = settings.accordion;
63			
64			var stickyHeader = settings.stickyHeader;
65			var stickyHieght = settings.stickyHieght;
66			
67			var onView = settings.onView;
68			var onViewList = settings.onViewList;
69			
70			var parallaxEffect = settings.parallaxEffect;
71			
72			var disableMobileLink = settings.disableMobileLink;
73			
74			var url = window.location.href;
75			var url_id = url.split('#').pop();
76			var url_name = new Array();
77			var url_on = url.indexOf("dfw=on")>-1;
78			var url_off = url.indexOf("dfw=off")>-1;
79			var url_path;
80			if(url.indexOf('?') > -1){
81				url_name = url.split('?');
82				if(url_id != '') {
83					url_path = url_name[1].split('#');
84					url_path = url_path[0];
85				} else {
86					url_path = url_name[1];
87				}
88			} else {
89				url_path = "";
90			}
91			
92			var accessibility = settings.accessibility;
93			
94			var removeElements = settings.removeElements;
95			
96			var removeId = settings.removeId;
97			var removeChildId = settings.removeChildId;
98			
99			var removeClass = settings.removeClass;
100			var removeAttrClass = settings.removeAttrClass;
101			var removeChildClass = settings.removeChildClass;
102			
103			var fontResize = settings.fontResize;
104			var fontResizeList = settings.fontResizeList;
105			
106			var dfw = getCookie("dfw_website");
107			
108			var i,j;
109			var count = 1;
110			
111			var $window = $(window);
112			
113			var windowWidth = $(window).width();
114			
115			var windowHeight = $(window).height();
116						
117			/* Scroller */
118			if(scroller && dfw == 'accessible_off') {
119				$('body').append('<div id="backtotop" class="backtotop"><a href="javascript:void(0);" aria-label="Back to Top"><span>Top</span></a></div>');
120				$('body').append('<div id="backtobot" class="backtobot"><a href="javascript:void(0);" aria-label="Go to Down"><span>Bottom</span></a></div>');
121				$(window).scroll(function() {
122					if($(this).scrollTop() + $(this).height() == $(document).height()) {
123						$('#backtobot').fadeOut('slow');
124						$('#backtotop').fadeIn('fast');
125					} else if ($(this).scrollTop() == 0) {
126						$('#backtobot').fadeIn('fast');
127						$('#backtotop').fadeOut('slow');
128					} else if ($(this).scrollTop() != 0) {
129						$('#backtobot').fadeIn('fast');
130						$('#backtotop').fadeIn('slow');
131					}
132				});
133				$('#backtotop').click(function() {
134					$('body,html').animate({
135						scrollTop: 0
136					}, 900);
137				});
138				$('#backtobot').click(function() {
139					$('body,html').animate({
140						scrollTop: $(document).height()
141					}, 900);
142				});
143			}
144			
145			/* Menu Width */
146			if(mobileWidth) {							
147				$(window).resize(function mobile_width() {
148					var windowWidth = $(window).width();
149					if(windowWidth <= 980) {
150						var lengths = new Array();
151						var sublength = new Array();
152						var licount = 0, i = 0, j = 0;
153						var menucount = $('.menu li').not('.menu li li','.menu li li li').length;
154						$('.menu li a').not('.menu li li a','.menu li li li a').each(function() {
155							lengths[i] = $(this).text().length;
156							licount += lengths[i];
157							i++;
158						});
159						$('.menu li').not('.menu li li','.menu li li li').each(function() {
160							var liwidth = (lengths[j]/licount)*100;
161							$(this).css("width",liwidth+"%");
162							j++;
163						});
164					} else {
165						$('.menu li').removeAttr('style');
166					}
167				}).trigger('resize');
168			}
169			
170			/* Menu */			
171			$(".menu ul").not('.menu ul ul').addClass('subMenu');
172			if(accessibility) {
173				$('.menu li a').not('.menu ul li a, .menu ul ul li a').addClass('dfw-category');
174				$('.menu ul').not('.menu ul ul').addClass('dfw-dropDown');
175				$('.menu ul ul').addClass('dfw-subDown');
176				$('.menu ul ul').parent('li').find("a:first").addClass('dfw-subCategory');
177				$('.menu ul ul').parent('li').next('li').find("a:first").addClass('dfw-subCategory');
178				
179				$('a.dfw-category').on('focus', function () {
180					$('.dfw-dropDown').hide('fast');
181					if ($(this).next().hasClass('dfw-dropDown')) {
182						$(this).next('.dfw-dropDown').show('fast');
183					}
184				});
185				$('a.dfw-subCategory').on('focus', function () {
186					$('.dfw-subDown').hide('fast');
187					if ($(this).next().hasClass('dfw-subDown')) {
188						$(this).next('.dfw-subDown').show('fast');
189					}
190				});
191				window.onclick = function (event) {
192					$('.dfw-dropDown').removeAttr('style');
193					$('.dfw-subDown').removeAttr('style');
194				}
195			}
196			
197			if(mobileMenu || slideMenu) {
198				$(".menu").clone().appendTo(".Wrapper");
199				$('.Wrapper').find('ul').removeClass('menu');
200				$('.Wrapper').find('ul').removeClass('dfw-dropDown');
201				$('.Wrapper').find('ul').removeClass('dfw-subDown');
202				$('.Wrapper').find('li').removeAttr('class');
203				$('.Wrapper').find('li').removeAttr('style');
204				$('.Wrapper').find('a').removeAttr('class');
205				$('.Wrapper').find('ul:first').addClass('parentMenu');
206				$(".Wrapper .subMenu").parent(this).find("a:first").attr("href", "javascript:void(0);").addClass("parentList");
207				$(".parentList").each(function() {
208					$(this).click(function() {
209						$(this).parent('li').toggleClass('actMenu');
210						$(this).next(".subMenu").slideToggle();
211					});
212				});
213				$(".Wrapper .subMenu ul").parent(this).find("a:first").attr("href", "javascript:void(0);").removeClass('parentList').addClass("subparentList").next('ul').removeClass('subMenu').addClass('childMenu');
214				$('.subparentList').each(function() {
215					$(this).click(function() {
216						$(this).next(".childMenu").slideToggle();
217					});
218				});
219			}
220			
221			/* Mobile Menu */
222			if(mobileMenu && slideMenu) {
223				alert('Please Select Either "Mobile Menu" OR "Slide Menu"');
224			} else if(mobileMenu) {
225				$(".Wrapper").hide('fast').addClass('mobileMenu');
226				$('.toggleMenu').click(function() {
227					$(".Wrapper").slideToggle();
228				});
229			} else if(slideMenu) {
230				$('.Wrapper').insertBefore('#Container').addClass('hideMenu').show('fast');
231				$('.toggleMenu').click(function() {
232					var clicks = $(this).data('clicks');
233					if(!clicks) {
234                        $("#Container").addClass('slideContainer').removeClass('hideContainer');
235                        $(".Wrapper").addClass('slideMenu').removeClass('hideMenu');
236                    } else {
237                        $(".Wrapper").addClass('hideMenu').removeClass('slideMenu');
238                        $("#Container").addClass('hideContainer').removeClass('slideContainer');
239                    }
240                    $(this).data("clicks", !clicks);
241				});
242			}
243			
244			/* SiteMap */
245			if(siteMap) {
246				$('.menu').clone().appendTo('#siteMap');
247				$('#siteMap').find('*').removeAttr('class');
248				$('#siteMap').find('*').removeAttr('accesskey');
249				var siteMap_length = $('#siteMap > ul > li').length;
250				for(i = 1; i <= siteMap_length; i++) {
251					var siteMap_text = $('#siteMap > ul > li:nth-child('+i+') a').html().toLowerCase();
252					siteMap_text = siteMap_text.replace(/\&amp; /g,'');
253					siteMap_text = siteMap_text.replace(/\&rsquo;/g,'');
254					siteMap_text = siteMap_text.replace(/\&lsquo;/g,'');
255					siteMap_text = siteMap_text.replace(/\& /g,'');
256					siteMap_text = siteMap_text.replace(/\/ /g,'');
257					siteMap_text = siteMap_text.replace(/\\ /g,'');
258					siteMap_text = siteMap_text.replace(/\- /g,'');
259					siteMap_text = siteMap_text.replace(/\s/g,'-');
260					siteMap_text = siteMap_text.replace(/\'/g,'');
261					$('#siteMap > ul > li:nth-child('+i+')').attr('id', siteMap_text);
262				}
263			}
264			
265			/* Phone Numbers */
266			if(phone_numbers_length != 'undefined' || phone_numbers != '') {
267				var aria_label;
268				var number_format = new Array();
269				var number_length = new Array();
270				var aria_number = new Array();
271				var aria_format = new Array();
272				
273				/* Remove spaces and special characters and add spaces between two numbers */
274				for(i = 0; i < phone_numbers_length; i++) {
275					aria_number[i] = phone_numbers[i];
276					aria_number[i] = aria_number[i].replace(/\s/g,'');
277					aria_number[i] = aria_number[i].replace(/\+/g,'');
278					aria_number[i] = aria_number[i].replace(/\-/g,'');
279					aria_number[i] = aria_number[i].replace(/\./g,'');
280					aria_number[i] = aria_number[i].replace(/\(/g,'');
281					aria_number[i] = aria_number[i].replace(/\)/g,'');
282					aria_label = aria_number[i].split('').join(' ');
283					number_format[i] = aria_label;
284					aria_format[i] = number_format[i].substr(0, 6)+'.'+number_format[i].substr(5, 7)+'.'+number_format[i].substr(11, number_length[i]);
285				}
286				
287				/* Phone Numbers with Country Code */
288				if(show_country_code){
289					if(country_code_length > 1) {
290						for(i = 0; i < country_code_length; i++) {
291							phone_numbers[i] = country_code[i] + ' ' + phone_numbers[i];
292						}
293					} else {
294						for(i = 0; i < phone_numbers_length; i++) {
295							phone_numbers[i] = country_code + ' ' + phone_numbers[i];
296						}
297					}
298				}
299				
300				/* Phone Numbers According Screen */
301				if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
302					if(country_code_length > 1) {
303						for(i = 0; i < phone_numbers_length; i++){
304							j = count++;
305							if (aria_number[i].substr(0,1) == '0') {
306								aria_number[i] = aria_number[i].substr(1, number_length[i]);
307							}
308							$('.tel' + j).each(function(n, v) {
309								$(this).html('<a href="tel: '+country_code[i]+aria_number[i]+'" aria-label="'+aria_format[i]+' - '+phone_info[i]+'">'+phone_numbers[i]+'</a>');
310							});
311						}
312					} else {
313						for(i = 0; i < phone_numbers_length; i++){
314							j = count++;
315							if (aria_number[i].substr(0,1) == '0') {
316								aria_number[i] = aria_number[i].substr(1, number_length[i]);
317							}
318							$('.tel' + j).each(function(n, v) {
319								$(this).html('<a href="tel: '+country_code+aria_number[i]+'" aria-label="'+aria_format[i]+' - '+phone_info[i]+'">'+phone_numbers[i]+'</a>');
320							});
321						}
322					}
323				} else {
324					if(phone_link_length > 1) {
325						for(i = 0; i < phone_numbers_length; i++) {
326							j = count++;
327							$('.tel' + j).each(function(n, v) {
328								$(this).html('<a href="'+phone_link[i]+'" aria-label="'+aria_format[i]+' - '+phone_info[i]+'">'+phone_numbers[i]+'</a>');
329							});
330						}
331					} else {
332						for(i = 0; i < phone_numbers_length; i++) {
333							j = count++;
334							$('.tel' + j).each(function(n, v) {
335								$(this).html('<a href="'+phone_link+'" aria-label="'+aria_format[i]+' - '+phone_info[i]+'">'+phone_numbers[i]+'</a>');
336							});
337						}
338					}
339				}
340			}
341			
342			/* Response Banner */
343			if(response_banner) {
344				$(window).resize(function responseBanner() {
345					var windowWidth = $(window).width();
346					var bannerWidth = $('#Banner').width();
347					var bannerHeight = $('#Banner').height();
348					var resBan = (bannerHeight/bannerWidth)*windowWidth;
349					if(windowWidth < bannerWidth) {
350						$('#Banner-Container #Banner').css("height", resBan);
351					} else {
352						$('#Banner-Container #Banner').css("height", bannerHeight);
353					}
354				});
355			}
356			
357			/* Swap Banner */
358			if(swap_banner && dfw == 'accessible_off') {
359				$(window).resize(function checkWidth() {
360					var windowWidth = $(window).width();
361					if (windowWidth <= 800) {
362						$('.home').find('#Banner-Container').attr('id','Banner-Container-S');
363					} else {
364						$('.home').find('#Banner-Container-S').attr('id','Banner-Container');
365					}
366				}).trigger('resize');
367			}
368			
369			/* Accordion */
370			if(accordion && dfw == 'accessible_off') {
371				$('.show_accord').next(".accordane").slideDown('slow');
372				if(url_id != url) {
373					$(".accordion .accordead").removeClass('show_accord');
374					$(".accordion .accordane").removeAttr('style');
375					$('#'+url_id).addClass("show_accord");
376					$('#'+url_id).next(".accordane").slideDown('slow');
377				}
378				$(".accordion .accordead").click(function () {
379					$(this).next(".accordane").slideToggle("slow").siblings(".accordane:visible").slideUp("slow");
380					$(this).toggleClass("show_accord").siblings(".accordead").removeClass("show_accord");
381					var link = $(this).find('a').attr("href");
382					if(link == "javasrcipt:void(0);"){
383						return false;
384					}
385				});
386			} else {
387				$('.accordead').find('a').contents().unwrap();
388			}
389			
390			/* Sticky Header */
391			if(stickyHeader && !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) && (dfw == 'accessible_off')){
392				var didScroll;
393				var lastScrollTop = 0;
394				var delta = 5;
395				var navbarHeight = $('header').outerHeight();
396				$(window).scroll(function(event){
397					didScroll = true;
398					var $this = $(this);
399					if ($this.scrollTop() > stickyHieght) {
400						$('header').addClass('sticky');
401					} else {
402						$('header').removeClass('sticky');
403					}
404				});
405				setInterval(function() {
406					if (didScroll) {
407						hasScrolled();
408						didScroll = false;
409					}
410				}, 250);
411				
412				function hasScrolled() {
413					var st = $(this).scrollTop();
414					if(Math.abs(lastScrollTop - st) <= delta) {
415						return;
416					}
417					if (st > lastScrollTop && st > navbarHeight){
418						$('header').removeClass('sticky-up');
419					} else {
420						if(st + $(window).height() < $(document).height()) {
421							if(st < stickyHieght){
422								$('header').removeClass("sticky-up");
423							} else {
424								$('header').addClass("sticky-up");
425							}
426						}
427					}
428					lastScrollTop = st;
429				}
430			}
431			
432			/* On View */
433			if((onView || parallaxEffect) && (dfw == 'accessible_off')){
434				if(onViewList != '') {
435					$(onViewList).addClass('onView');
436				} else {
437					alert('Please add view List to add class "onView"');
438				}
439				var $animation_elements = $('.onView');
440				function check_if_in_view() {
441					var window_height = $(window).height();
442					var window_top_position = $window.scrollTop();
443					var window_bottom_position = (window_top_position + window_height);
444					$.each($animation_elements, function() {
445						var $element = $(this);
446						var element_height = $element.outerHeight();
447						var element_top_position = $element.offset().top;
448						var element_bottom_position = (element_top_position + element_height);
449						if ((element_bottom_position >= window_top_position) && (element_top_position <= window_bottom_position)) {
450							$element.addClass('inView');
451						} else {
452							$element.removeClass('inView');
453						}
454					});
455				}
456				$window.on('scroll resize', check_if_in_view);
457				$window.trigger('scroll');
458			}
459			
460			/* Parallax Effect */
461			if(parallaxEffect && dfw == 'accessible_off' && !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))){
462				$('[data-type="background"]').each(function(){
463					var $bgobj = $(this);
464					$(window).scroll(function() {
465						var yPos = -($window.scrollTop() / $bgobj.data('speed'));
466						yPos = yPos;
467						var coords = '50% '+ yPos + 'px';
468						$bgobj.css({ backgroundPosition: coords });
469					});
470				});
471			}
472			
473			/* For Mobile/Tab/iPad */
474			if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
475				$(".menu .subMenu").parent(this).find("a:first").attr("href", "javascript:void(0);");
476				$(".menu .subMenu ul").parent(this).find("a:first").attr("href", "javascript:void(0);");
477				if(disableMobileLink != ''){
478					$(disableMobileLink).find('a').attr("href", "javascript:void(0);");
479				}
480			}
481			
482			/* Target ID */
483			if((url_id != url) && dfw == 'accessible_off') {
484				$('html, body').animate({
485					scrollTop: $('#' + url_id).offset().top
486				}, 900);
487			}
488			
489			/* For CMS Accessibility */
490			if(accessibility || fontResize) {
491				function sendIframeMessage(type, value, action_type) {
492					action_type || 'unload';
493					$('iframe').each(function (k, el) {
494						if (action_type == 'load') {
495							var msg = '{"action":"' + type + '","action_type":"load","value":"' + value + '"}';
496						} else {
497							var msg = '{"action":"' + type + '","action_type":"unload","value":"' + value + '"}';
498						}
499						el.contentWindow.postMessage(msg, '*');
500					});
501				}
502			}
503			sendIframeMessage("","");
504			if(getCookie("accept-ypo-website-cookies")==""||getCookie("accept-ypo-website-cookies")==undefined) {
505				$(window).on("resize",function() {
506					var windowWidth=$(window).width();
507					if(windowWidth>640) {
508						$("footer").css("padding-bottom","150px");
509					} else {
510						$("footer").css("padding-bottom","250px");
511					}
512				}).resize();
513			} else {
514				$("footer").removeAttr("style");
515			}
516			$(document).on('click','.gdpCookie .cookie-main .cookie-button .accept',function() {
517				$("footer").removeAttr("style");
518			});
519			/* Accessibility */
520			if(accessibility) {	
521				$('#dfw-on').on('click', function() {
522					setCookie("dfw_website", "accessible_on");
523					dfw_mode = getCookie('dfwmode');
524					dfw_font = getCookie('dfwfont');
525					if(dfw_mode != '' || dfw_font != '') {
526						setCookie('dfw-body',dfw_mode, 30);
527						setCookie('fontAct',dfw_font, 30);
528					}
529				});
530				$('#dfw-off').on('click', function() {
531					setCookie("dfw_website", "accessible_off");
532					dfw_mode = getCookie('dfw-body');
533					dfw_font = getCookie('fontAct');
534					setCookie('dfw-body', '', 30);
535					setCookie('fontAct', 'reset', 30);
536					setCookie('dfwmode',dfw_mode, 30);
537					setCookie('dfwfont',dfw_font, 30);
538				});			
539				$(".dfw-contrast span").click(function () {
540					if ($(this).hasClass('dfw-contrastMode')) {
541						$('body').addClass('dfw-blackmode');
542						$('.dfw-contrastMode a').addClass('dfw-active');
543						$('.dfw-colorMode a').removeClass('dfw-active');
544						setCookie('dfw-body', 'dfw-blackmode', 30);
545						sendIframeMessage('contrast', 'dfw-blackmode');
546					} else if ($(this).hasClass('dfw-colorMode')) {
547						$('body').removeClass('dfw-blackmode');
548						$('.dfw-colorMode a').addClass('dfw-active');
549						$('.dfw-contrastMode a').removeClass('dfw-active');
550						setCookie('dfw-body', '', 30);
551						sendIframeMessage('contrast', 'dfw-whitemode');
552					}
553				});
554				
555				var recordedBody = getCookie("dfw-body");
556				if(dfw == 'accessible_on') {
557					$('body').addClass('accessible_on');
558					$('.dfw-off').hide('fast');
559					$('.dfw-on').show('fast');
560					if (recordedBody != "") {
561						$('body').addClass('dfw-blackmode');
562						$('.dfw-contrastMode a').addClass('dfw-active');
563						$('.dfw-colorMode a').removeClass('dfw-active');
564					} else {
565						$('body').removeClass('dfw-blackmode');
566						$('.dfw-colorMode a').addClass('dfw-active');
567						$('.dfw-contrastMode a').removeClass('dfw-active');
568					}
569				}
570				if(dfw == 'accessible_off') {
571					$('body').addClass('accessible_off');
572					$('.dfw-on').hide('fast');
573					$('.dfw-off').show('fast');
574					sendIframeMessage('contrast', '');
575				}			
576				/* Accessibility Page */
577				$(".menu").clone().appendTo(".accessKeys");
578				$('.accessKeys').find('ul').removeClass('menu').addClass('keysList');
579				$('.keysList').find('ul').remove('ul');
580				$('.accessKeys').find('li').removeAttr('class');
581				$('.accessKeys').find('a').removeAttr('class');
582				var keys_length = $('.accessKeys li').length;
583				for(i = 1; i <= keys_length; i++) {
584					var key_text = $('.accessKeys li:nth-child('+i+')').html();
585					var key_attr = $('.accessKeys li:nth-child('+i+') a').attr('accesskey').toUpperCase();
586					$('.accessKeys li:nth-child('+i+')').html(key_text + ' - ' + key_attr);
587				}
588				$('.accessKeys').find('a').removeAttr('accesskey');
589			}
590			
591			/* Remove Elements */
592			if(dfw == 'accessible_on' && removeElements != ''){
593				$(removeElements).remove();
594			}
595			
596			/* Remove Ids */
597			if(dfw == 'accessible_on' && removeId != '') {
598				$(removeId).removeAttr('id');
599			}
600			
601			/* Remove Child Ids */
602			if(dfw == 'accessible_on' && removeChildId != '') {
603				$(removeChildId).find('*').removeAttr('id');
604			}
605			
606			if(dfw == 'accessible_on' && removeAttrClass != ''){
607				$(removeAttrClass).not('#Access-Container .table-div').removeAttr('class');
608			}
609			
610			/* Remove Class */
611			if(dfw == 'accessible_on' && removeClass != '') {
612				$('body').find('*').not('#Access-Container .table-cell').removeClass(removeClass);
613			}
614			
615			/* Remove Child Class */
616			if(dfw == 'accessible_on' && removeChildClass != '') {
617				$(removeChildClass).find('*').removeAttr('class');
618			}
619			
620			/* Fonts Resize */
621			if(accessibility || fontResize) {
622				if(fontResizeList != '') {
623					$(fontResizeList).addClass('dfw-FontResize');
624				}
625				var actSize;
626				var recordedFontActive = getCookie("fontAct");
627				if (recordedFontActive == 'undefined' || recordedFontActive == '') {
628					recordedFontActive = 'reset';
629				}
630				var recordedFontActiveNumber = 0;
631				$('.fontsize span').removeClass('dfw-actSize');
632				if (recordedFontActive == 'reset') {
633					$('.fontreset').addClass('dfw-actSize');
634					recordedFontActiveNumber = 0;
635				} else if (recordedFontActive == 'larger') {
636					$('.fontplus').addClass('dfw-actSize');
637					recordedFontActiveNumber = 2;
638				} else if (recordedFontActive == 'largest') {
639					$('.fontplus').addClass('dfw-actSize');
640					recordedFontActiveNumber = 4;
641				} else if (recordedFontActive == 'smaller') {
642					$('.fontminus').addClass('dfw-actSize');
643					recordedFontActiveNumber = -2;
644				}
645				changeFontSize(recordedFontActiveNumber);
646				
647				$(".fontplus").on('click', function () {
648					var recordedFontActive = getCookie("fontAct");
649					if (recordedFontActive == 'undefined' || recordedFontActive == '') {
650						recordedFontActive = 'reset';
651					}
652					$('.fontsize span').removeClass('dfw-actSize');
653					if (recordedFontActive == 'reset') {
654						actSize = 'larger';
655						changeFontSize(2);
656						$('.fontplus').addClass('dfw-actSize');
657					} else if (recordedFontActive == 'larger') {
658						actSize = 'largest';
659						changeFontSize(2);
660						$('.fontplus').addClass('dfw-actSize');
661					} else if (recordedFontActive == 'smaller') {
662						actSize = 'reset';
663						changeFontSize(2);
664						$('.fontreset').addClass('dfw-actSize');
665					} else {
666						$('.fontplus').addClass('dfw-actSize');
667						actSize = recordedFontActive;
668					}
669					setCookie('fontAct', actSize, 30);
670				});
671				
672				$(".fontreset").on('click', function () {
673					var recordedFontActive = getCookie("fontAct");
674					if (recordedFontActive == 'undefined' || recordedFontActive == '') {
675						recordedFontActive = 'reset';
676					}
677					$('.fontsize span').removeClass('dfw-actSize');
678					if (recordedFontActive == 'smaller') {
679						changeFontSize(2);
680					} else if (recordedFontActive == 'larger') {
681						changeFontSize(-2);
682					} else if (recordedFontActive == 'largest') {
683						changeFontSize(-4);
684					}
685					actSize = 'reset';
686					$('.fontreset').addClass('dfw-actSize');
687					setCookie('fontAct', actSize, 30);
688				});
689				
690				$(".fontminus").on('click', function () {
691					var recordedFontActive = getCookie("fontAct");
692					if (recordedFontActive == 'undefined' || recordedFontActive == '') {
693						recordedFontActive = 'reset';
694					}
695					$('.fontsize span').removeClass('dfw-actSize');
696					if (recordedFontActive == 'reset') {
697						actSize = 'smaller';
698						changeFontSize(-2);
699						$('.fontminus').addClass('dfw-actSize');
700					} else if (recordedFontActive == 'larger') {
701						actSize = 'reset';
702						changeFontSize(-2);
703						$('.fontreset').addClass('dfw-actSize');
704					} else if (recordedFontActive == 'largest') {
705						actSize = 'larger';
706						changeFontSize(-2);
707						$('.fontplus').addClass('dfw-actSize');
708					} else {
709						$('.fontminus').addClass('dfw-actSize');
710						actSize = recordedFontActive;
711					}
712					setCookie('fontAct', actSize, 30);
713				});
714				function changeFontSize(direction) {
715					var affectElements = $('.dfw-FontResize,.textMain p,.textMain li,.navigation');
716					affectElements.each(function() {
717						var $this = $(this);
718						$this.css("font-size", parseInt($this.css("font-size")) + direction);
719					});
720					sendIframeMessage('font-size', direction);
721				}
722			}
723			
724			/* -- Set CMS Mode/Font-Size -- */
725			if(accessibility || fontResize) {
726				window.addEventListener("message", function (e) {
727					var msg = e.data;
728					var data = JSON.parse(e.data);
729					if (data.ada_type == 'load') {
730						if(dfw == 'accessible_on') {
731							if (recordedBody == "" || recordedBody == 'undefined') {
732								sendIframeMessage('contrast', 'dfw-whitemode', 'load');
733							} else {
734								sendIframeMessage('contrast', 'dfw-blackmode', 'load');
735							}
736						}
737						sendIframeMessage('font-size', recordedFontActiveNumber, 'load');
738					}
739				});
740			}
741			
742			/* -- Cookie Set -- */
743			function setCookie(cname, cvalue, exdays) {
744				var d = new Date();
745				d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
746				var expires = "expires=" + d.toGMTString();
747				document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/";
748			}
749			
750			/* -- Get Cookie -- */
751			function getCookie(cname) {
752				var name = cname + "=";
753				var ca = document.cookie.split(';');
754				for (var i = 0; i < ca.length; i++) {
755					var c = ca[i];
756					while (c.charAt(0) == ' ') c = c.substring(1);
757					if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
758				}
759				return "";
760			}
761		});
762	};	
763})(jQuery, this, 0);

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.