PageSourceSearch

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

js williamscullymd.com collected 2026-10-04 16:07:30 UTC 46,914 bytes, 931 lines download raw bytes

1(function ($, window) {
2    $.fn.customPlugin = function (options) {
3        var settings = $.extend({
4            scroller: false,
5            accordion: false,
6            stickyHeader: false,
7            stickyHieght: '',
8            menuClass: '',
9            mobileMenu: false,
10            mobileWidth: false,
11            slideMenu: false,
12            slideType: '',
13            menuScreenWidth: 640,
14            iframekey: 'abcs',
15            siteMap: false,
16            accessKeyValue: false,
17            contentExplore: false,
18            imageExplore: false,
19            response_height: false,
20            response_list: [],
21            swap_banner: false,
22            swap_banner_after: 800,
23            skipFunction: false,
24            pageName: '',
25            linkNames: [],
26            country_code: [],
27            show_country_code: false,
28            phone_numbers: [],
29            phone_info: [],
30            phone_link: [],
31            disableMobileLink: [],
32            accessibility: false,
33            removeElements: [],
34            removeId: [],
35            removeChildId: [],
36            removeClass: [],
37            removeAttrClass: [],
38            removeChildClass: [],
39            fontResize: false,
40            fontResizeList: [],
41            fontNotResizeList: []
42        }, options);
43        return this.each(function () {
44            var checkMode = getCookie("dfw_website");
45            if (checkMode == '' || checkMode == 'undefined') {
46                setCookie("dfw_website", "accessible_off");
47            }
48            var scroller = settings.scroller;
49            var stickyHeader = settings.stickyHeader;
50            var stickyHieght = settings.stickyHieght;
51            var mobileMenu = settings.mobileMenu;
52            var mobileWidth = settings.mobileWidth;
53            var menuClass = settings.menuClass;
54            var iframekey = settings.iframekey;
55            var menuScreenWidth = settings.menuScreenWidth;
56            var accordion = settings.accordion;
57            var siteMap = settings.siteMap;
58            var accessKeyValue = settings.accessKeyValue;
59            var slideMenu = settings.slideMenu;
60            var slideType = settings.slideType;
61            var contentExplore = settings.contentExplore;
62            var imageExplore = settings.imageExplore;
63            var response_height = settings.response_height;
64            var response_list = settings.response_list;
65            var response_list_length = response_list.length;
66            var swap_banner = settings.swap_banner;
67            var swap_banner_after = settings.swap_banner_after;
68            var skipFunction = settings.skipFunction;
69            var country_code = settings.country_code;
70            var show_country_code = settings.show_country_code;
71            var phone_numbers = settings.phone_numbers;
72            var phone_info = settings.phone_info;
73            var phone_link = settings.phone_link;
74            var phone_numbers_length = phone_numbers.length;
75            var country_code_length = country_code.length;
76            var phone_link_length = phone_link.length;
77            var disableMobileLink = settings.disableMobileLink;
78            var linkNames = settings.linkNames;
79            var pageName = settings.pageName;
80            /* ----- Bottom-Top JS ----- */
81     
82            if (scroller) {
83                $('body').append('<div id="backtotop" class="backtotop"><a href="javascript:void(0);" aria-label="Back to Top"></a></div>');
84                $('body').append('<div id="backtobot" class="backtobot"><a href="javascript:void(0);" aria-label="Go to Down"></a></div>');
85                $(window).scroll(function () {
86                    if ($(this).scrollTop() + $(this).height() == $(document).height()) {
87                        $('#backtobot').fadeOut('slow');
88                        $('#backtotop').fadeIn('fast');
89                    } else if ($(this).scrollTop() == 0) {
90                        $('#backtobot').fadeIn('fast');
91                        $('#backtotop').fadeOut('slow');
92                    } else if ($(this).scrollTop() != 0) {
93                        $('#backtobot').fadeIn('fast');
94                        $('#backtotop').fadeOut('slow');
95                    }
96                });
97                $('#backtotop').click(function () {
98                    $('body,html').animate({
99                        scrollTop: 0
100                    }, 900);
101                });
102                $('#backtobot').click(function () {
103                    $('body,html').animate({
104                        scrollTop: $(document).height()
105                    }, 900);
106                });
107            }
108            /* ----- Accordion ----- */
109            if (accordion) {
110                var accordurl = (window.location).href;
111                var id = accordurl.substring(accordurl.lastIndexOf('#') + 1);
112                if (id != accordurl) {
113                    $(".accordion h2").removeClass('current');
114                    $('#' + id).addClass("current");
115                    $('#' + id).next(".pane").slideDown('slow');
116                }
117                $(".accordion h2").click(function () {
118                    $(this).next(".pane").slideToggle("slow").siblings(".pane:visible").slideUp("slow");
119                    $(this).toggleClass("current").siblings("h2").removeClass("current");
120                    var link = $(this).find('a').attr("href");
121                    if (link == "javasrcipt:void(0);") {
122                        return false;
123                    }
124                });
125            }
126            //Iframe Titles for Your practice Education videos
127            if (('iframe[src*=' + iframekey + ']').length > 0) {
128                 $(window).resize(function responseiframe() {                       
129                    var windowsWidth = $(window).width();
130                    var resIframe = (480 / 1170) * windowsWidth;                      
131                    if (windowsWidth > 765) {
132                        $('iframe[src*=' + iframekey + ']').css('height',resIframe);         
133                    }
134                    else {
135                          $('iframe[src*=' + iframekey + ']').css('height',resIframe+100);         
136                    }         
137                }).trigger('resize');
138                $('iframe[src*=' + iframekey + ']').each(function () {
139                    var title = '', srcValue, ifameVideo, ifameVideoName, length, titleValue, i;
140                    var DefaultTitle = 'Ypo Education Video';
141                    srcValue = $(this).attr('src');
142                    ifameVideo = srcValue.split('/');
143                    //for all inner ifarmes
144                    if (ifameVideo[6] !== undefined) {
145                        ifameVideoName = ifameVideo[6].split('-');
146                        length = ifameVideoName.length;
147                        for (i = 0; i < length - 1; i++) {
148                            title += ifameVideoName[i] + ' ';
149                        }
150                        titleValue = DefaultTitle + ' of ' + title;
151                        $(this).attr('title', titleValue);                       
152                    }
153                    //for main Iframe 
154                    else {
155                        $(this).attr('title', DefaultTitle);                       
156                    }
157                });
158            }
159            //Aria-labels for short links
160            if (linkNames !== null || linkNames !== '') {
161                $('a').each(function () {
162                    var length = linkNames.length;
163                    var textvalue = $(this).text().toLowerCase();
164                    textvalue = textvalue.replace(/\s/g, '');
165                    var hostname = window.location.hostname;
166                    var domainName = 'http://' + hostname;
167                    for (var i = 0; i < length; i++) {
168                        if (textvalue == linkNames[i]) {
169                            var hrefVale = $(this).attr('href');
170                            if (hrefVale.indexOf(domainName) > -1) {
171                                hrefVale = hrefVale.replace(domainName, '');
172                            }
173                            if (hrefVale.indexOf(pageName) > -1) {
174                                hrefVale = hrefVale.replace(pageName, '');
175                            }
176                            if (hrefVale.indexOf('.html') > -1) {
177                                hrefVale = hrefVale.replace('.html', '');
178                            }
179                            if (hrefVale.indexOf('about') > -1) {
180                                hrefVale = hrefVale.replace('about', '');
181                            }
182                            if (hrefVale.indexOf('/') > -1) {
183                                hrefVale = hrefVale.replace('/', ' ');
184                            }
185                            if (hrefVale.indexOf('-') > -1) {
186                                hrefVale = hrefVale.replace(/\-/g, ' ');
187                            }
188                            var aria = $(this).attr('aria-label');
189                            if (aria != 'null' || aria !== undefined) {
190                                $(this).attr('aria-label', 'Know more about ' + hrefVale);
191                            }
192                        }
193                    }
194                });
195            }
196            
197            
198            //Menu Width Calculation
199            if (mobileWidth) {
200                var lengths = new Array();
201                var l = 0,
202                    k = 0;
203                var licount = 0;
204                //calculate the characters length of each text
205                $(menuClass + ' li a').not(menuClass + ' li li a', menuClass + ' li li li a').each(function () {
206                    lengths[l] = $(this).text().length;
207                    licount += lengths[l]; //calculate the total length of characters
208                    l++;
209                });
210                //calculate width and assign styles for each element
211                $(menuClass + ' li').not(menuClass + ' li li', menuClass + ' li li li').each(function () {
212                    var width = (lengths[k] / licount) * 100;
213                    $(this).css("width", width + "%");
214                    k++;
215                });
216            }
217            if (mobileMenu || slideMenu) {
218                $(menuClass + " ul").not(menuClass + ' ul ul').addClass('level2Menu');
219                $(menuClass).clone().appendTo(".wrapper");
220                $('.wrapper').find('ul').removeClass('menu dfw-dropdown dfw-subdown');
221                $('.wrapper').find('li, a').removeAttr('class');
222                $('.wrapper').find('li, a').removeAttr('style');
223                $('.wrapper').find('ul:first').addClass('parentMenu');
224                $(".wrapper ul").not('.wrapper ul.parentMenu,.wrapper ul.parentMenu ul').remove();
225                $(".wrapper .level2Menu").parent(this).find("a:first").attr("href", "javascript:void(0);").addClass("level1Menu");
226                $(".level1Menu").each(function () {
227                    $(this).click(function () {
228                        $(".level2Menu").not($(this).next(".level2Menu")).hide();
229                        $(this).next(".level2Menu").slideToggle();
230                    });
231                });
232                $(".wrapper .level2Menu ul").parent(this).find("a:first").attr("href", "javascript:void(0);").removeClass('level1Menu').addClass("subParent").next('ul').removeClass('level2Menu').addClass('childMenu');
233                $('.subParent').each(function () {
234                    $(this).click(function () {
235                        $(".childMenu").not($(this).next(".childMenu")).hide();
236                        $(this).next(".childMenu").slideToggle();
237                    });
238                });
239                if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
240                    $(menuClass + " .level2Menu").parent(this).find("a:first").attr("href", "javascript:void(0);");
241                    $(menuClass + " .level2Menu ul").parent(this).find("a:first").attr("href", "javascript:void(0);");
242                }
243            }
244
245            /* Mobile Menu */
246            if (mobileMenu && slideMenu) {
247                alert('Please Select Either "Mobile Menu" OR "Slide Menu"');
248            } else if (mobileMenu) {
249                $(".wrapper").hide('fast').addClass('mobileMenu');
250                $('.menuText').click(function () {
251                    $(".wrapper").slideToggle();
252                    $(this).toggleClass('menuActive');
253                });
254            } else if (slideMenu) {
255                $(".wrapper").show('fast').addClass('slideMenu');
256                $('.menuText').click(function () {
257                    $(".wrapper").toggleClass('showMenu');
258                    $(".mainWrapper").toggleClass('slideContainer');
259                    $(this).toggleClass('menuActive');
260                });
261            }
262
263            if (slideType == 'right' && slideMenu) {
264                $(".mainWrapper").addClass('slideRight');
265            } else if (slideType == 'left' && slideMenu) {
266                $(".mainWrapper").addClass('slideLeft');
267            }
268
269            if (siteMap) {
270                if ($('#siteMap').length > 0) {
271                    $(menuClass).clone().appendTo('#siteMap');
272                    $('#siteMap').find('*').removeAttr('class');
273                    $('#siteMap').find('*').removeAttr('style');
274                    $('#siteMap').find('*').removeAttr('accesskey');
275                    var siteMap_length = $('#siteMap > ul > li').length;
276                    for (i = 1; i <= siteMap_length; i++) {
277                        var siteMap_text = $('#siteMap > ul > li:nth-child(' + i + ') a').html().toLowerCase();
278                        siteMap_text = siteMap_text.replace(/\&amp; /g, '');
279                        siteMap_text = siteMap_text.replace(/\&rsquo;/g, '');
280                        siteMap_text = siteMap_text.replace(/\&lsquo;/g, '');
281                        siteMap_text = siteMap_text.replace(/\& /g, '');
282                        siteMap_text = siteMap_text.replace(/\s/g, '-');
283                        siteMap_text = siteMap_text.replace(/\'/g, '');
284                        $('#siteMap > ul > li:nth-child(' + i + ')').attr('id', siteMap_text + 'Menu');
285                    }
286                }
287            }
288            if (accessKeyValue) {
289                if ($('#accessKeyValue').length > 0) {
290                    $(menuClass).clone().appendTo('#accessKeyValue');
291                    $('#accessKeyValue').find('*').removeAttr('class');
292                    $('#accessKeyValue').find('*').removeAttr('style');
293                    //                    $('#accessKeyValue').find('*').removeAttr('accesskey');
294                    $('#accessKeyValue ul').find('ul').remove();
295                    var accessKey_length = $('#accessKeyValue > ul > li').length;
296                    for (i = 1; i <= accessKey_length; i++) {
297                        var accesskey_text = $('#accessKeyValue > ul > li:nth-child(' + i + ') a').attr("accesskey").toUpperCase();
298                        $('#accessKeyValue > ul > li:nth-child(' + i + ') a').append(' - ' + accesskey_text);
299                    }
300                    $('#accessKeyValue ul').append('<li><a href="javascript:void(0)">Accessibility Options - K</a></li>');
301                    $('#accessKeyValue').find('*').removeAttr('accesskey');
302                }
303            }
304
305
306            if (skipFunction) {
307                /* Skip Tab */
308                var skipCount = $('[data-skip]').length;
309                var skipNum = 0;
310                $('[data-skip]').each(function () {
311                    var skipList = $(this).attr('data-skip');
312                    var cssPosition = $(this).css('position');
313                    if (cssPosition != 'absolute') {
314                        $(this).css('position', 'relative');
315                    }
316                    if (skipCount == (skipNum + 1)) {
317                        var skipId = $('[data-skip]').eq(0).attr('id');
318                    } else {
319                        var skipId = $('[data-skip]').eq(skipNum + 1).attr('id');
320                    }
321                    $(this).prepend('<div class="dfw-skip"><a href="#' + skipId + '">Skip ' + skipList + '</a></div>');
322                    skipNum++;
323                });
324            }
325
326            /* Response Height */
327            if (response_height) {
328                if (response_list != '') {
329                    var bannerWidth = new Array;
330                    var bannerHeight = new Array;
331                    $(window).resize(function responseBanner() {
332                        for (var i = 0; i < response_list_length; i++) {
333                            var windowWidth = $(window).width();
334                            bannerWidth[i] = 1170;
335                            bannerHeight[i] = $(response_list[i]).attr('data-height');
336                            var resBan = (bannerHeight[i] / bannerWidth[i]) * windowWidth;
337                            if (windowWidth < bannerWidth[i]) {
338                                if (windowWidth > swap_banner_after) {
339                                    $(response_list[i] + ' li').height(resBan);
340                                }
341                                //else {
342                                //      $(response_list[i] + ' li').height(bannerHeight[i]);
343                                //}
344                            } else {
345                                $(response_list[i] + ' li').height(bannerHeight[i]);
346                            }
347                        }
348                    }).trigger('resize');
349                } else {
350                    alert('Please mention which div you want response height');
351                }
352            }
353
354            /* Swap Banner */
355            if (swap_banner) {
356                $(window).resize(function checkWidth() {
357                    var windowWidth = $(window).width();
358                    if (windowWidth <= swap_banner_after) {
359                        $('.home').find('#Banner').attr('id', 'BannerInner');
360                    } else {
361                        $('.home').find('#BannerInner').attr('id', 'Banner');
362                    }
363                }).trigger('resize');
364            }
365
366            var url = window.location.href;
367            var url_id = url.split('#').pop();
368            var url_name = new Array();
369            var url_on = url.indexOf("dfw=on") > -1;
370            var url_off = url.indexOf("dfw=off") > -1;
371            var url_path;
372            if (url.indexOf('?') > -1) {
373                url_name = url.split('?');
374                if (url_id != '') {
375                    url_path = url_name[1].split('#');
376                    url_path = url_path[0];
377                } else {
378                    url_path = url_name[1];
379                }
380            } else {
381                url_path = "";
382            }
383            var accessibility = settings.accessibility;
384            var removeElements = settings.removeElements;
385            var removeId = settings.removeId;
386            var removeChildId = settings.removeChildId;
387            var removeClass = settings.removeClass;
388            var removeAttrClass = settings.removeAttrClass;
389            var removeChildClass = settings.removeChildClass;
390            var fontResize = settings.fontResize;
391            var fontResizeList = settings.fontResizeList;
392            var fontNotResizeList = settings.fontNotResizeList;
393            var dfw = getCookie("dfw_website");
394            var i, j;
395            var count = 1;
396            var $window = $(window);
397            //Sticky Header
398            if (stickyHeader && !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) && (dfw == 'accessible_off')) {
399                var didScroll;
400                var lastScrollTop = 0;
401                var delta = 5;
402                var navbarHeight = $('header').outerHeight();
403                $(window).scroll(function (event) {
404                    didScroll = true;
405                    var $this = $(this);
406                    if ($this.scrollTop() > stickyHieght) {
407                        $('header').addClass('sticky');
408                    } else {
409                        $('header').removeClass('sticky');
410                    }
411                });
412                setInterval(function () {
413                    if (didScroll) {
414                        hasScrolled();
415                        didScroll = false;
416                    }
417                }, 250);
418
419                function hasScrolled() {
420                    var st = $(this).scrollTop();
421                    if (Math.abs(lastScrollTop - st) <= delta) {
422                        return;
423                    }
424                    if (st > lastScrollTop && st > navbarHeight) {
425                        $('header').removeClass('sticky-up');
426                    } else {
427                        if (st + $(window).height() < $(document).height()) {
428                            if (st < stickyHieght) {
429                                $('header').removeClass("sticky-up");
430                            } else {
431                                $('header').addClass("sticky-up");
432                            }
433                        }
434                    }
435                    lastScrollTop = st;
436                }
437            }
438            
439            /* Menu */
440            $(document).on('keydown', function (event) {
441                if (event.altKey) {
442                    $(menuClass).find('ul').removeClass('subMenu');
443                    $(menuClass).find('ul').removeClass('dfw-dropdown');
444                    $(menuClass).find('ul').removeClass('dfw-subdown');
445                    $(menuClass).find('ul').removeAttr('class');
446                    $(menuClass).find('ul').removeAttr('style');
447                }
448            }).on('keyup', function (event) {
449                if (event.altKey) {
450                    $(menuClass).find('ul').addClass('subMenu');
451                    $(menuClass).find('ul').addClass('dfw-dropdown');
452                    $(menuClass).find('ul').addClass('dfw-subdown');
453                }
454            });
455            $(menuClass + " ul").not(menuClass + ' ul ul').addClass('subMenu');
456            if (accessibility) {
457                $(menuClass + ' li a').not(menuClass + ' ul li a,' + menuClass + ' ul ul li a').addClass('dfw-category');
458                $(menuClass + ' ul').not(menuClass + ' ul ul').addClass('dfw-dropdown');
459                $(menuClass + ' ul ul').addClass('dfw-subdown');
460                $(menuClass + ' ul ul').parent('li').find("a:first").addClass('dfw-subcategory');
461                $(menuClass + ' ul ul').parent('li').next('li').find("a:first").addClass('dfw-subcategory');
462                $('a.dfw-category').on('focus', function () {
463                    $('.dfw-dropdown').hide('fast');
464                    if ($(this).next().hasClass('dfw-dropdown')) {
465                        $(this).next('.dfw-dropdown').show('fast');
466                    }
467                });
468                $('a.dfw-subcategory').on('focus', function () {
469                    $('.dfw-subdown').hide('fast');
470                    if ($(this).next().hasClass('dfw-subdown')) {
471                        $(this).next('.dfw-subdown').show('fast');
472                    }
473                });
474                window.onclick = function (event) {
475                    $('.dfw-dropdown').removeAttr('style');
476                    $('.dfw-subdown').removeAttr('style');
477                }
478            }
479            // Content Extract language Pages
480            if (contentExplore && dfw == 'accessible_off') {
481                if ($(window).width() > 767) {
482                    $('.content-explore li a').click(function (e) {
483                        e.preventDefault();
484                    });
485                    var count2 = 1;
486                    $('.content-explore li').each(function () {
487                        $(this).addClass("textAdded" + count2);
488                        var element2 = '.textAdded' + count2;
489                        count2++;
490                        if ($('.content-explore li #dataAppend').length > 0) {
491                            $('.content-explore li').find("#dataAppend").remove();
492                        }
493                        $(this).append('<div class="dataAppend"></div>');
494                        //			$(this).find("a").append('<img id="loader" src="images/loading.gif" />');
495                        var hrefValue = $(this).find("a").attr("href");
496                        $(this).find("span").css("z-index", "999999");
497                        var articlewidth = $('article').width();
498                        var articlewidth = articlewidth / 100 * 70;
499                        var hostValue = window.location.hostname;
500                        $("#dataAppend").css("width", articlewidth);
501                        var postData = {
502                            Hrefvalue: hrefValue,
503                            Hostvalue: hostValue
504                        };
505                        $.ajax({
506                            url: "http://" + hostValue + "/getContents.php",
507                            type: "POST",
508                            data: postData,
509                            success: function (data, textStatus, jqXHR) {
510                                $(element2 + " .dataAppend").html(data);
511                                //								$("#loader").remove();
512                            },
513                            error: function (jqXHR, textStatus, errorThrown) {
514                                //alert(errorThrown);  
515                            }
516                        });
517                    });
518                } else {
519                    $('.content-explore').removeClass('content-explore');
520                }
521            }
522            else {
523                    $('.content-explore').removeClass('content-explore');
524                }
525            // Images Extract Langing Pages
526            if (imageExplore && dfw == 'accessible_off') {
527                var countimg = 1;
528                $('.image-explore li a').each(function () {
529                    $(this).addClass("imageAdded" + countimg);
530                    var element = '.imageAdded' + countimg;
531                    countimg++;
532                    var conditionValue = $('.breadcrumbs a:nth-child(3)').text();
533                    var hrefValue = $(this).attr("href");
534                    var hostValue = window.location.hostname;
535                    var postData = {
536                        Hrefvalue: hrefValue,
537                        Hostvalue: hostValue,
538                        ConditionValue: conditionValue
539                    };
540                    $.ajax({
541                        url: "http://" + hostValue + "/getImage.php",
542                        type: "POST",
543                        data: postData,
544                        success: function (data, textStatus, jqXHR) {
545                            $(element).append(data);
546                        },
547                        error: function (jqXHR, textStatus, errorThrown) {
548                            //alert(errorThrown);  
549                        }
550                    });
551                });
552            }
553            else{
554                $('body').find('*').not('#Access-Container .table-cell').removeClass('image-explore');
555            }
556
557            /* Phone Numbers */
558            if (phone_numbers_length != 'undefined' || phone_numbers != '') {
559                var aria_label;
560                var number_format = new Array();
561                var number_length = new Array();
562                var aria_number = new Array();
563                var aria_format = new Array();
564                /* Remove spaces and special characters and add spaces between two numbers */
565                for (i = 0; i < phone_numbers_length; i++) {
566                    aria_number[i] = phone_numbers[i];
567                    aria_number[i] = aria_number[i].replace(/[^0-9]/g, '');
568                    aria_label = aria_number[i].split('').join(' ');
569                    number_format[i] = aria_label;
570                    aria_format[i] = number_format[i].substr(0, 6) + '.' + number_format[i].substr(5, 7) + '.' + number_format[i].substr(11, number_length[i]);
571                }
572                /* Phone Numbers with Country Code */
573                if (show_country_code) {
574                    if (country_code_length > 1) {
575                        for (i = 0; i < country_code_length; i++) {
576                            phone_numbers[i] = country_code[i] + ' ' + phone_numbers[i];
577                        }
578                    } else {
579                        for (i = 0; i < phone_numbers_length; i++) {
580                            phone_numbers[i] = country_code + ' ' + phone_numbers[i];
581                        }
582                    }
583                }
584                /* Phone Numbers According Screen */
585                if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
586                    if (country_code_length > 1) {
587                        for (i = 0; i < phone_numbers_length; i++) {
588                            j = count++;
589                            if (aria_number[i].substr(0, 1) == '0') {
590                                aria_number[i] = aria_number[i].substr(1, number_length[i]);
591                            }
592                            $('span.tel' + j).each(function (n, v) {
593                                $(this).html('<a href="tel:' + country_code[i] + aria_number[i] + '" onclick="gtag(\'event\', \'clicks\', { event_category: \'Phone Number\', event_action: \'Clicked\'});" aria-label="' + aria_format[i] + ' - ' + phone_info[i] + '">' + phone_numbers[i] + '</a>');
594                            });
595                        }
596                    } else {
597                        for (i = 0; i < phone_numbers_length; i++) {
598                            j = count++;
599                            if (aria_number[i].substr(0, 1) == '0') {
600                                aria_number[i] = aria_number[i].substr(1, number_length[i]);
601                            }
602                            $('span.tel' + j).each(function (n, v) {
603                                $(this).html('<a href="tel:' + country_code + aria_number[i] + '" onclick="gtag(\'event\', \'clicks\', { event_category: \'Phone Number\', event_action: \'Clicked\'});" aria-label="' + aria_format[i] + ' - ' + phone_info[i] + '">' + phone_numbers[i] + '</a>');
604                            });
605                        }
606                    }
607                } else {
608                    if (phone_link_length > 1) {
609                        for (i = 0; i < phone_numbers_length; i++) {
610                            if (aria_number[i].substr(0, 1) == '0') {
611                                aria_number[i] = aria_number[i].substr(1, number_length[i]);
612                            }
613                            j = count++;
614                            $('span.tel' + j).each(function (n, v) {
615                                $(this).html('<a href="tel:' + country_code + aria_number[i] + '" onclick="gtag(\'event\', \'clicks\', { event_category: \'Phone Number\', event_action: \'Clicked\'});" aria-label="' + aria_format[i] + ' - ' + phone_info[i] + '">' + phone_numbers[i] + '</a>');
616                            });
617                        }
618                    } else {
619                        for (i = 0; i < phone_numbers_length; i++) {
620                            if (aria_number[i].substr(0, 1) == '0') {
621                                aria_number[i] = aria_number[i].substr(1, number_length[i]);
622                            }
623                            j = count++;
624                            $('span.tel' + j).each(function (n, v) {
625                                $(this).html('<a href="tel:' + country_code + aria_number[i] + '"onclick="gtag(\'event\', \'clicks\', { event_category: \'Phone Number\', event_action: \'Clicked\'});" aria-label="' + aria_format[i] + ' - ' + phone_info[i] + '">' + phone_numbers[i] + '</a>');
626                            });
627                        }
628                    }
629                }
630            }
631            /* Target ID */
632            if ((url_id != url) && dfw == 'accessible_off') {
633                $('html, body').animate({
634                    scrollTop: $('#' + url_id).offset().top
635                }, 900);
636            }
637
638            /* For Mobile/Tab/iPad */
639            if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
640                $(menuClass + " .subMenu").parent(this).find("a:first").attr("href", "javascript:void(0);");
641                $(menuClass + " .subMenu ul").parent(this).find("a:first").attr("href", "javascript:void(0);");
642                if (disableMobileLink != '') {
643                    $(disableMobileLink).find('a').attr("href", "javascript:void(0);");
644                }
645            }
646            /* For CMS Accessibility */
647            function sendIframeMessage(type, value, action_type) {
648                action_type || 'unload';
649                $('iframe').each(function (k, el) {
650                    if (action_type == 'load') {
651                        var msg = '{"action":"' + type + '","action_type":"load","value":"' + value + '"}';
652                    } else {
653                        var msg = '{"action":"' + type + '","action_type":"unload","value":"' + value + '"}';
654                    }
655                    el.contentWindow.postMessage(msg, '*');
656                });
657            }
658            sendIframeMessage("","");
659			if(getCookie("accept-ypo-website-cookies")==""||getCookie("accept-ypo-website-cookies")==undefined) {
660				$(window).on("resize",function() {
661					var windowWidth=$(window).width();
662					if(windowWidth>640) {
663						$("footer").css("padding-bottom","150px");
664					} else {
665						$("footer").css("padding-bottom","250px");
666					}
667				}).resize();
668			} else {
669				$("footer").removeAttr("style");
670			}
671			$(document).on('click','.gdpCookie .cookie-main .cookie-button .accept',function() {
672				$("footer").removeAttr("style");
673			});
674			/*if(gdpr) {
675				addLink("https://common.yourpractice.online/gdpr/css/gdpr.css");
676				addScript("https://common.yourpractice.online/gdpr/js/gdpr.js");
677				$("body").append('<div class="gdpCookie" id="gdpCookie"></div>');
678				var h1Tag=$.trim($("h1").text()).toLowerCase();
679				if(h1Tag=="privacy") {
680					addScript("https://common.yourpractice.online/gdpr/js/gdpr-privacy.js");
681				}
682				if(getCookie("accept-ypo-website-cookies")==""||getCookie("accept-ypo-website-cookies")==undefined) {
683					$("footer").css("padding-bottom","110px");
684				} else {
685					$("footer").removeAttr("style");
686				}
687			}*/
688            /* Accessibility */
689            if (accessibility) {
690                if (dfw == 'accessible_on' || url_on || url_path == "dfw=on") {
691                    $('body').addClass('accessible_on');
692                    $('.dfw-off').hide('fast');
693                    $('.dfw-on').show('fast');
694                }
695                if (dfw == 'accessible_off' || url_off || url_path == "dfw=off") {
696                    $('body').addClass('accessible_off');
697                    $('.dfw-on').hide('fast');
698                    $('.dfw-off').show('fast');
699                }
700                $('#dfw-on').on('click', function () {
701                    setCookie("dfw_website", "accessible_on");
702                    var dfw_mode = getCookie('dfwmode');
703                    var dfw_font = getCookie('dfwfont');
704                    if (dfw_mode != '' || dfw_font != '') {
705                        setCookie('dfw-greyBody', dfw_mode, 30);
706                        setCookie('fontAct', dfw_font, 30);
707
708                    }
709                });
710                $('#dfw-off').on('click', function () {
711                    setCookie("dfw_website", "accessible_off");
712                    var dfw_mode = getCookie('dfw-greyBody');
713                    var dfw_font = getCookie('fontAct');
714                    setCookie('dfw-greyBody', '', 30);
715                    setCookie('fontAct', 'reset', 30);
716                    setCookie('dfwmode', dfw_mode, 30);
717                    setCookie('dfwfont', dfw_font, 30);
718                });
719                $(".dfw-contrast span").click(function () {
720                    if ($(this).hasClass('dfw-contrastMode')) {
721                        $('body').addClass('dfw-blackmode');
722                        $('.dfw-contrastMode a').addClass('dfw-active');
723                        $('.dfw-colorMode a').removeClass('dfw-active');
724                        setCookie('dfw-greyBody', 'dfw-blackmode', 30);
725                        sendIframeMessage('contrast', 'dfw-blackmode');
726                    } else if ($(this).hasClass('dfw-colorMode')) {
727                        $('body').removeClass('dfw-blackmode');
728                        $('.dfw-colorMode a').addClass('dfw-active');
729                        $('.dfw-contrastMode a').removeClass('dfw-active');
730                        setCookie('dfw-greyBody', '', 30);
731                        sendIframeMessage('contrast', 'dfw-whitemode');
732                    }
733                });
734                var recordedgreyBody = getCookie("dfw-greyBody");
735
736                if (recordedgreyBody != "") {
737                    $('body').addClass('dfw-blackmode');
738                    if ($('body').hasClass('dfw-blackmode')) {
739                        $('.dfw-contrastMode a').addClass('dfw-active');
740                        $('.dfw-colorMode a').removeClass('dfw-active');
741                    }
742
743                }
744
745            }
746            /* Remove Elements */
747            if (dfw == 'accessible_on' && removeElements !== '') {
748                $(removeElements).remove();
749            }
750            /* Remove Ids */
751            if (dfw == 'accessible_on' && removeId !== '') {
752                $(removeId).removeAttr('id');
753            }
754            /* Remove Child Ids */
755            if (dfw == 'accessible_on' && removeChildId !== '') {
756                $(removeChildId).find('*').removeAttr('id');
757            }
758            if (dfw == 'accessible_on' && removeAttrClass !== '') {
759                $(removeAttrClass).not('#Access-Container .table-div').removeAttr('class');
760            }
761            /* Remove Class */
762            if (dfw == 'accessible_on' && removeClass !== '') {
763                $('body').find('*').not('#Access-Container .table-cell').removeClass(removeClass);
764            }
765            /* Remove Child Class */
766            if (dfw == 'accessible_on' && removeChildClass !== '') {
767                $(removeChildClass).find('*').removeAttr('class');
768            }
769            /* Fonts Resize */
770            if (accessibility || fontResize) {
771                if ((fontResizeList !== '') && (dfw == 'accessible_on')) {
772                    $(fontResizeList).not('.dfw-skip a,#Accessibility a,#Accessibility span,#Accessibility li,h1 a,h2 a,h3 a').addClass('dfw-FontResize');
773                    $('a').parent('li').removeClass('dfw-FontResize');
774                    $('span').parent('a').removeClass('dfw-FontResize');
775                    $(fontNotResizeList).removeClass('dfw-FontResize');
776                }
777                var actSize;
778                var recordedFontActive = getCookie("fontAct");
779                if (recordedFontActive == 'undefined' || recordedFontActive == '') {
780                    recordedFontActive = 'reset';
781                }
782                var recordedFontActiveNumber = 0;
783                $('.fontsize span').removeClass('dfw-actSize');
784                if (recordedFontActive == 'reset') {
785                    $('.fontreset').addClass('dfw-actSize');
786                    recordedFontActiveNumber = 0;
787                } else if (recordedFontActive == 'larger') {
788                    $('.fontplus').addClass('dfw-actSize');
789                    recordedFontActiveNumber = 2;
790                } else if (recordedFontActive == 'largest') {
791                    $('.fontplus').addClass('dfw-actSize');
792                    recordedFontActiveNumber = 4;
793                } else if (recordedFontActive == 'smaller') {
794                    $('.fontminus').addClass('dfw-actSize');
795                    recordedFontActiveNumber = -2;
796                }
797                changeFontSize(recordedFontActiveNumber);
798                $(".fontplus").on('click', function () {
799                    var recordedFontActive = getCookie("fontAct");
800                    if (recordedFontActive == 'undefined' || recordedFontActive == '') {
801                        recordedFontActive = 'reset';
802                    }
803                    $('.fontsize span').removeClass('dfw-actSize');
804                    if (recordedFontActive == 'reset') {
805                        actSize = 'larger';
806                        changeFontSize(2);
807                        $('.fontplus').addClass('dfw-actSize');
808                    } else if (recordedFontActive == 'larger') {
809                        actSize = 'largest';
810                        changeFontSize(2);
811                        $('.fontplus').addClass('dfw-actSize');
812                    } else if (recordedFontActive == 'smaller') {
813                        actSize = 'reset';
814                        changeFontSize(2);
815                        $('.fontreset').addClass('dfw-actSize');
816                    } else {
817                        $('.fontplus').addClass('dfw-actSize');
818                        actSize = recordedFontActive;
819                    }
820                    setCookie('fontAct', actSize, 30);
821                });
822                $(".fontreset").on('click', function () {
823                    var recordedFontActive = getCookie("fontAct");
824                    if (recordedFontActive == 'undefined' || recordedFontActive == '') {
825                        recordedFontActive = 'reset';
826                    }
827                    $('.fontsize span').removeClass('dfw-actSize');
828                    if (recordedFontActive == 'smaller') {
829                        changeFontSize(2);
830                    } else if (recordedFontActive == 'larger') {
831                        changeFontSize(-2);
832                    } else if (recordedFontActive == 'largest') {
833                        changeFontSize(-4);
834                    }
835                    actSize = 'reset';
836                    $('.fontreset').addClass('dfw-actSize');
837                    setCookie('fontAct', actSize, 30);
838                });
839                $(".fontminus").on('click', function () {
840                    var recordedFontActive = getCookie("fontAct");
841                    if (recordedFontActive == 'undefined' || recordedFontActive == '') {
842                        recordedFontActive = 'reset';
843                    }
844                    $('.fontsize span').removeClass('dfw-actSize');
845                    if (recordedFontActive == 'reset') {
846                        actSize = 'smaller';
847                        changeFontSize(-2);
848                        $('.fontminus').addClass('dfw-actSize');
849                    } else if (recordedFontActive == 'larger') {
850                        actSize = 'reset';
851                        changeFontSize(-2);
852                        $('.fontreset').addClass('dfw-actSize');
853                    } else if (recordedFontActive == 'largest') {
854                        actSize = 'larger';
855                        changeFontSize(-2);
856                        $('.fontplus').addClass('dfw-actSize');
857                    } else {
858                        $('.fontminus').addClass('dfw-actSize');
859                        actSize = recordedFontActive;
860                    }
861                    setCookie('fontAct', actSize, 30);
862                });
863
864                function changeFontSize(direction) {
865                    var affectElements = $('.dfw-FontResize,.textMain p,.textMain li,.navigation');
866                    affectElements.each(function () {
867                        var $this = $(this);
868                        $this.css("font-size", parseInt($this.css("font-size")) + direction);
869                    });
870                    sendIframeMessage('font-size', direction);
871                }
872            }
873
874
875            /* -- Desable classes -- */
876
877            $(window).resize(deactivateforslicky);
878
879            function deactivateforslicky() {
880                // "639" changes repectively according to the site where it wil be the scrren width when u call the slickymenu
881                if ($(window).width() <= menuScreenWidth) {
882                    $('a.dfw-category').removeClass('dfw-category');
883                    $('a.dfw-subcategory').removeClass('dfw-subcategory');
884                    $('ul.dfw-dropdown').removeClass('dfw-dropdown');
885                    $('ul.dfw-subdown').removeClass('dfw-subdown');
886                    $('a.dfw-category').removeClass('dfw-category');
887                    $('ul.dfw-dropDown').removeClass('dfw-dropDown');
888                    $('ul.dfw-subDown').removeClass('dfw-subDown');
889                    $('ul.subMenu').removeClass('subMenu');
890                    $('a.dfw-subCategory').removeClass('dfw-subCategory');
891                    $('a.dfw-subCategory').removeClass('dfw-subCategory');
892                }
893            }
894            /* -- Set CMS Mode/Font-Size -- */
895            window.addEventListener("message", function (e) {
896                var msg = e.data;
897                var data = JSON.parse(e.data);
898                if (data.ada_type == 'load') {
899                    if (dfw == 'accessible_on') {
900                        if (recordedgreyBody == "" || recordedgreyBody == 'undefined') {
901                            sendIframeMessage('contrast', 'dfw-whitemode', 'load');
902                        } else {
903                            sendIframeMessage('contrast', 'dfw-blackmode', 'load');
904                        }
905                    }
906                    sendIframeMessage('font-size', recordedFontActiveNumber, 'load');
907                }
908            });
909            /* -- Cookie Set -- */
910            function setCookie(cname, cvalue, exdays) {
911                var d = new Date();
912                d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
913                var expires = "expires=" + d.toGMTString();
914                document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/";
915            }
916            /* -- Get Cookie -- */
917            function getCookie(cname) {
918                var name = cname + "=";
919                var ca = document.cookie.split(';');
920                for (var i = 0; i < ca.length; i++) {
921                    var c = ca[i];
922                    while (c.charAt(0) == ' ') c = c.substring(1);
923                    if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
924                }
925                return "";
926            }
927
928
929        });
930    };
931})(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.