PageSourceSearch

https://cleviprex.com/wp-content/themes/html5-blank/js/scripts.js?ver=1714544113

js cleviprex.com collected 2026-09-26 05:52:39 UTC 120,289 bytes, 2,350 lines download raw bytes

1function getParameterByName(name) {
2    var res = new RegExp(
3        // Parameter names always start after a ? or &.
4        '[\?&]' +
5
6        // Make sure any [ or ] are escaped in the name.
7        name.replace(/\[/g, '\\\[').replace(/\]/g, '\\\]') +
8
9        // Either match a =... or match an empty value.
10        // Values can be terminated by an & a # or the end of the string ($).
11        '(?:=([^&#]*))?(?:[&#]|$)'
12    ).exec(window.location.search);
13
14    return res ?
15        (res[1] ? // res[1] will be undefined for a parameter without value.
16            decodeURIComponent(res[1].replace(/\+/g, ' ')) : ''
17        ) : null;
18}
19
20(function ($, root, undefined) {
21
22    $(function () {
23
24        'use strict';
25
26        $(window).scroll(function(){
27            if($(window).scrollTop()>1000){
28               $("#back-to-top-button").fadeIn();
29            }else{
30               $("#back-to-top-button").fadeOut();
31            }
32      
33      });
34
35        function isIE() {
36            // Or Edge
37            var ua = navigator.userAgent;
38            return ua.indexOf('MSIE ') > -1 || ua.indexOf('Trident/') > -1 || ua.indexOf('Edge/') > -1;
39        }
40
41        /* Cookie */
42        function needCookieConsent() {
43            let val = localStorage.getItem('dismisscookiebanner');
44            return val === null;
45        }
46
47        function dismissCookieBanner() {
48            let h = $('.section-cookie-banner').height();
49            let adj = '-=' + h;
50
51            $('.section-cookie-banner').slideUp();
52
53            // in desktop, header's contents are positioned, so header size
54            // must be adjusted to close the empty space where the
55            // cookie banner had been.
56            // $('header').animate({ "height": adj }, () => {
57            //     // once animation completes, adding this class will override
58            //     // the height we just set and force the height to be responsive.
59            $('header').addClass('cookie-consent-dismissed')
60            // })
61        }
62
63        function acceptCookies() {
64            let d = (new Date()).toString();
65            localStorage.setItem('dismisscookiebanner', d);
66
67            dismissCookieBanner();
68        }
69
70        function pushLayer(event, cat1, label1, cat2, label2) {
71            window.dataLayer = window.dataLayer || [];
72            event = event.toLowerCase();
73            cat1 = cat1.toLowerCase();
74            label1 = label1.toLowerCase();
75            if (cat2) { cat2 = cat2.toLowerCase() }
76            if (label2) { label2 = label2.toLowerCase() }
77            let evt = {};
78            if (label1 == 'request information') {
79                event = 'request_link';
80                if (cat1.includes('header')) {
81                    label1 = window.location.pathname + ':header';
82                }
83                else if (cat1.includes('footer')) {
84                    label1 = window.location.pathname + ":footer";
85                }
86                else {
87                    label1 = window.location.pathname + ":onpage";
88                }
89                evt['event'] = event;
90                evt[cat1] = label1;
91                if (cat2) {
92                    evt[cat2] = label2;
93                }
94            }
95            else if (event == 'pdf_download') {
96                evt['event'] = event;
97                evt['content_type'] = label1;
98                evt['event_items'] = window.location.pathname + ":" + cat1;
99            }
100            else {
101                evt['event'] = event;
102                evt[cat1] = label1;
103                if (cat2) {
104                    evt[cat2] = label2;
105                }
106            }
107            window.dataLayer.push(evt);
108            console.log(event);
109            console.log(cat1 + ':' + label1);
110        }
111
112
113
114        function cookieInit() {
115            if (needCookieConsent()) {
116                $('.section-cookie-banner').show();
117                $('header').removeClass('cookie-consent-dismissed');
118            }
119
120            $('#accept-link').click(acceptCookies);
121            $('#close-link').click(acceptCookies);
122        }
123
124        // in case we need logic to make the cookie banner
125        // reappear after it's been dismissed
126        function resetConsent() {
127            localStorage.removeItem('dismisscookiebanner');
128        }
129        cookieInit();
130
131        var site, ISIWidget, DosingCalculator, VideoForm, Tracking;
132        var touchClick = "ontouchstart" in document.documentElement ? "touchend" : window.navigator.pointerEnabled ? "pointerup" : "click";
133        var anyKindaClick = "touchend mouseup pointerup click";
134        var ISIClick = "click"
135        var ww = window.innerWidth,
136            wh = window.innerHeight;
137        var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
138        var noDoubleTrigger = false;
139        //let videoAble = (localStorage.getItem("videoAccess") == "true" || localStorage.getItem("videoRegistrationComplete") == "true") ? true : false;
140
141        site = {
142            config: {
143                header: $("header"),
144                main: $("main"),
145                sidebar: $("aside"),
146                footer: $("footer")
147            },
148            breakpoints: {
149                small: 768,
150                medium: 992,
151                large: 1200
152            },
153            init: function init() {
154                var qs = getParameterByName("ss");
155
156                if (qs == "true") {
157                    $("#isi-widget").remove();
158                }
159
160                // $("a[href='#isi']").on("click", function (e) {
161                //     e.preventDefault();
162                //     e.stopPropagation();
163                //     var isiPos = $("aside").offset().top + 20;
164                //     $("body,html").animate({
165                //         scrollTop: isiPos
166                //     }, 500);
167                // });
168                $("a[href$='.pdf']").attr("rel", "noopener").attr("target", "_blank");
169                this.handleHeaderNav();
170                // this.adjustCalloutContent();
171                this.handleTabs();
172                this.rearrangePharmacologyContent();
173                $(".two-column-module .col-sm-6 > div:first-child").matchHeight();
174                $(".three-column-module .col-sm-4 > div:first-child").matchHeight();
175
176                if ($(".home").length) {
177                    window.setTimeout(function () {
178                        site.adjustHeroColumns();
179                    }, 5);
180                    window.setTimeout(function () {
181                        $(window).trigger("resize");
182                    }, 125);
183                }
184
185                $(".tab-button").each(function () {
186                    $(this).find("p:eq(0)").wrapInner("<span>");
187                    $(this).find("h2:eq(0)").wrapInner("<span>");
188                    $(this).find("h3:eq(0)").wrapInner("<span>");
189                });
190                window.setTimeout(function () {
191                    $(".tab-button p span").matchHeight();
192                    $(".tab-button h2 span").matchHeight();
193                    $(".tab-button h3 span").matchHeight();
194                    $(".tab-button").matchHeight();
195                }, 25);
196                $(".video-container").each(function () {
197                    var iframe = $(this).find('iframe');
198                    var player = new Vimeo.Player(iframe);
199                    var videoPercent = 0;
200                    var hit25 = false,
201                        hit50 = false,
202                        hit75 = false;
203                    var fired25 = false,
204                        fired50 = false,
205                        fired75 = false;
206                    var $thisPage = $(this).data("video-page");
207                    var $thisVideo = $(this).data("video-name");
208
209                    var fire25 = function fire25() {
210                        ga('send', 'event', $thisPage, 'progress', $thisVideo + ' - 25%');
211                        fired25 = true;
212                    };
213
214                    var fire50 = function fire50() {
215                        ga('send', 'event', $thisPage, 'progress', $thisVideo + ' - 50%');
216                        fired50 = true;
217                    };
218
219                    var fire75 = function fire75() {
220                        ga('send', 'event', $thisPage, 'progress', $thisVideo + ' - 75%');
221                        fired75 = true;
222                    };
223
224                    player.on('play', function () {
225                        ga('send', 'event', $thisPage, 'play', $thisVideo);
226                        pushLayer('video_link', 'event_method', (window.location.pathname + ":" + $thisVideo));
227                    });
228                    player.on('pause', function () {
229                        ga('send', 'event', $thisPage, 'pause', $thisVideo);
230                    });
231                    player.on('ended', function () {
232                        ga('send', 'event', $thisPage, 'progress', $thisVideo + ' - 100%');
233                    });
234                    player.on('timeupdate', function (data) {
235                        videoPercent = data.percent * 100;
236
237                        if (videoPercent >= 75) {
238                            hit25 = hit50 = hit75 = true;
239                            hit25 && !fired25 ? fire25() : "";
240                            hit50 && !fired50 ? fire50() : "";
241                            hit75 && !fired75 ? fire75() : "";
242                        } else if (videoPercent >= 50 && videoPercent < 75) {
243                            hit25 = hit50 = true;
244                            hit25 && !fired25 ? fire25() : "";
245                            hit50 && !fired50 ? fire50() : "";
246                        } else if (videoPercent >= 25 && videoPercent < 50) {
247                            hit25 = true;
248                            hit25 && !fired25 ? fire25() : "";
249                        }
250                    });
251                    $(this).find("img").on("click", function (e) {
252                        /*if ($("body").hasClass("videos") && (!videoAble)) {
253                            return false;
254                        }*/
255                        e.preventDefault();
256                        e.stopPropagation();
257                        $(".video-container iframe").each(function () {
258                            player.pause();
259                            $(this).removeAttr("style");
260                            $(this).prev().fadeIn(250);
261                            $(this).parent().find(".timestamp").fadeIn(250);
262                        });
263                        $(this).fadeOut(250);
264                        $(this).parent().find(".timestamp").fadeOut(250);
265                        $(this).next().css("left", "0px");
266                        player.play();
267
268                        const videoGrid = $(this).parents('.video-grid');
269                        if (videoGrid && videoGrid.length > 0) {
270                            const videoGridArea = $(this).parents('.video-grid-area');
271                            const index = videoGridArea.index();
272                            videoGrid.attr('class', 'video-grid video' + (index + 1));
273                        }
274                    });
275                });
276
277                var formAlertClass = '.wpcf7-validation-errors';
278                var elWrapperClass = '.wpcf7-form-control-wrap';
279                var elInvalidClass = '.wpcf7-not-valid';
280                var elAlertClass = '.wpcf7-not-valid-tip';
281
282                if ($('#form-request-info').length > 0 || $("#access-video-info").length > 0) {
283                    document.addEventListener('change', function () {
284                        var el = event.target;
285                        clearErrors(el);
286                    });
287                    $('#permission-contact').one('change', function () {
288                        $('#permission-contact-copy').show(400);
289                    });
290                    $('#permission-email').one('change', function () {
291                        $('#permission-email-copy').show(400);
292                    });
293                }
294
295                function clearErrors(el) {
296                    var closestInvalid = $(el).closest(elInvalidClass);
297
298                    if (closestInvalid && closestInvalid.length > 0) {
299                        $(el).closest('form').find(formAlertClass).css('display', 'none');
300                        var closestGroupItem = $(el).closest('.validation-group-item');
301
302                        if (closestGroupItem && closestGroupItem.length > 0) {
303                            var validationGroup = $(el).closest('.validation-group').find('.validation-group-item');
304
305                            for (var i = 0; i < validationGroup.length; i++) {
306                                var validationItem = validationGroup[i];
307                                turnValid(validationItem);
308                            }
309                        } else {
310                            turnValid(el);
311                        }
312                    }
313                }
314
315                function turnValid(el) {
316                    $(el).closest(elWrapperClass).find(elAlertClass).css('display', 'none');
317                    $(el).closest(elInvalidClass).removeClass(elInvalidClass);
318                }
319
320                if ($(".one-column-module").length) {
321                    if ($(".one-column-module").find(".col-sm-offset-0").length) {
322                        $(".one-column-module").find(".col-sm-offset-0").wrapInner('<div class="content-block"></div>');
323                    }
324                }
325
326                if ($(".zoom").length) {
327                    $(".tab-content .zoom-trigger").on(anyKindaClick, function (e) {
328                        e.preventDefault();
329                        e.stopPropagation();
330                        var $zoomContainer = $("body").append("<div class='zoom-container'></div>");
331                        var $zoomChart = $(this).parents('.content-block').clone();
332                        $(".zoom-container").append($zoomChart).animate({
333                            opacity: 1
334                        }, 500, function () {
335                            $("body").addClass("no-scroll");
336                        });
337                    });
338                    $("body").on(anyKindaClick, ".zoom-container .zoom-trigger", function (e) {
339                        e.preventDefault();
340                        e.stopPropagation();
341                        $(".zoom-container").animate({
342                            opacity: 0
343                        }, 500, function () {
344                            $(".zoom-container").remove();
345                            $("body").removeClass("no-scroll");
346                        });
347                    });
348                    $("#tab3-content .tab-description .col-sm-10").css("padding", "2rem 5rem 3rem");
349                }
350
351                if (typeof (sessionStorage["isHCP"]) === 'undefined') {
352                    sessionStorage["isHCP"] = false;
353                }
354                if (!JSON.parse(sessionStorage["isHCP"])) {
355                    $("#hcp-ok").on("touchstart click", function (e) {
356                        e.preventDefault();
357                        sessionStorage["isHCP"] = true;
358                        sessionStorage["login-status"] = "med_professional";
359                        console.log('med_professional');
360
361                        $("#hcp-modal").modal("hide");
362                        $("body").removeClass("no-scroll");
363
364                        if ($(".home").length) {
365                            $(".background img").addClass("animate");
366                            $(".foreground img").addClass("animate");
367                        }
368
369                        if (window.location.hash) {
370                            switch (window.location.hash) {
371                                case '#email-updates':
372                                    if ($("body").hasClass("request-information")) {
373                                        $(".tab-button:eq(2)").trigger(touchClick);
374                                        window.setTimeout(function () {
375                                            $(window).scrollTop($(".tabs-module").offset().top);
376                                        }, 25);
377                                    }
378
379                                    break;
380
381                                default:
382                                    break;
383                            }
384                        }
385                    });
386                    $("#hcp-cancel").on("touchstart click", function (e) {
387                        e.preventDefault();
388                        window.location = "https://www.chiesiusa.com/";
389                        // if (document.referrer === null) window.location.replace("https://www.google.com/"); else window.history.back();
390                    });
391                    $("#hcp-modal").modal("show");
392                    $("body").addClass("no-scroll");
393                } else {
394                    $("#hcp-modal").hide();
395                    $("body").removeClass("no-scroll");
396
397                    if ($(".home").length) {
398                        $(".background img").addClass("animate");
399                        $(".foreground img").addClass("animate");
400                    }
401                }
402				var strippedHash =  window.location.hash.split('?')[0];
403                if (strippedHash) {
404                    switch (strippedHash) {
405                        case '#isi':
406                            $("a[href='#isi']").trigger(touchClick);
407                            break;
408
409                        case '#dosing-calculator':
410                            if ($("body").hasClass("dosing-administration")) {
411                                $(window).scrollTop($("#dosing-calculator").parents("section").offset().top);
412                            }
413
414                            break;
415
416                        case '#escape1':
417                            if ($("body").hasClass("efficacy")) {
418                                $(window).scrollTop($(".tabs-module").offset().top);
419                            }
420
421                            break;
422
423                        case '#escape2':
424                            if ($("body").hasClass("efficacy")) {
425                                $(".tab-button:eq(1)").trigger(touchClick);
426                                window.setTimeout(function () {
427                                    $(window).scrollTop($(".tabs-module").offset().top);
428                                }, 250);
429                            }
430
431                            break;
432
433                        case '#velocity':
434                            if ($("body").hasClass("efficacy")) {
435                                $(".tab-button:eq(2)").trigger(touchClick);
436                                window.setTimeout(function () {
437                                    $(window).scrollTop($(".tabs-module").offset().top);
438                                }, 250);
439                            }
440
441                            break;
442
443                        case '#accelerate':
444                            if ($("body").hasClass("efficacy")) {
445                                $(".tab-button:eq(3)").trigger(touchClick);
446                                window.setTimeout(function () {
447                                    $(window).scrollTop($(".tabs-module").offset().top);
448                                }, 250);
449                            }
450
451                            break;
452
453                        case '#before':
454                            if ($("body").hasClass("dosing-administration")) {
455                                $(window).scrollTop($(".tabs-module").offset().top);
456                            }
457
458                            break;
459
460                        case '#during':
461                            if ($("body").hasClass("dosing-administration")) {
462                                $(".tab-button:eq(1)").trigger(touchClick);
463                                window.setTimeout(function () {
464                                    $(window).scrollTop($(".tabs-module").offset().top);
465                                }, 25);
466                            }
467
468                            break;
469
470                        case '#email-updates':
471                            if ($("body").hasClass("request-information")) {
472                                $(".tab-button:eq(2)").trigger(touchClick);
473                                window.setTimeout(function () {
474                                    $(window).scrollTop($(".tabs-module").offset().top);
475                                }, 25);
476                            }
477
478                            break;
479
480                        case '#moa-video':
481                            if ($("body").hasClass("dosing-administration")) {
482                                window.setTimeout(function () {
483                                    $(window).scrollTop($("[data-ga-scroll-label='dosing and administration video']").offset().top - 80);
484                                }, 300);
485                            }
486
487                            break;
488
489                        case '#pharmacology-video':
490                            if ($("body").hasClass("pharmacology-moa")) {
491                                window.setTimeout(function () {
492                                    $(window).scrollTop($("#pharmacology-video").offset().top + 50);
493                                }, 300);
494                            }
495
496                            break;
497
498                        default:
499                            break;
500                    }
501                }
502
503                $('.button span').each(function (index, element) {
504                    var buttonText = $(element),
505                        word_array,
506                        last_word,
507                        first_part;
508                    word_array = buttonText.html().split(/\s+/);
509                    last_word = word_array.pop();
510                    first_part = word_array.join(' ');
511                    buttonText.html([first_part, ' <span>', last_word, '</span>'].join(''));
512                });
513
514                if ($("body").hasClass("nursing-resources-thank-you")) {
515                    $("#hanging-dosing-card, #lanyard-dosing-card, #IV-line-tags").on("touchstart click", function () {
516                        $("html, body").animate({ scrollTop: $("#form-nursing-resources-thank-you").offset().top }, "0");
517                        return false;
518                    });
519                }
520
521                if ($("body").hasClass("nursing-resources")) {
522                    $("#footer-codeline").html("04/2022&nbsp;PP&#8209;CP&#8209;0491&nbsp;V1.0");
523
524
525                    $("#hanging-dosing-card, #lanyard-dosing-card, #IV-line-tags").on("touchstart click", function () {
526                        // $(window).scrollTop($("#form-nursing-resources").offset().top);
527                        $("html, body").animate({ scrollTop: $("#form-nursing-resources").offset().top }, "slow");
528                        return false;
529
530                    });
531
532                    $("#isi-indications-wrapper").append('<div id="nursing-refs"><b>References: 1.</b> Powers WJ, Rabinstein AA, Ackerson T, et al; American Heart Association Stroke Council. 2018 Guidelines for the Early Management of Patients W
532ith Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association. <i> Stroke.</i> 2018;49(3):e46-e110. <b>2.</b>CLEVIPREX<sup>®</sup> (clevidipine) Prescribing Information. 2021.</div>');
533                }
534
535                if ($("body").hasClass("nursing-resources-thank-you")) {
536                    $("html, body").animate({ scrollTop: $("#form-nursing-resources-thank-you").offset().top - 100 }, "fast");
537                    $("#footer-codeline").html("04/2022&nbsp;PP&#8209;CP&#8209;0491&nbsp;V1.0");
538
539                    $("#hanging-dosing-card, #lanyard-dosing-card, #IV-line-tags").on("touchstart click", function () {
540                        $("html, body").animate({ scrollTop: $("#form-nursing-resources").offset().top }, "0");
541                        return false;
542                    });
543
544
545                    $("#isi-indications-wrapper").append('<div id="nursing-refs"><b>References: 1.</b> Powers WJ, Rabinstein AA, Ackerson T, et al; American Heart Association Stroke Council. 2018 Guidelines for the Early Management of Patients W
545ith Acute Ischemic Stroke: A Guideline for Healthcare Professionals From the American Heart Association/American Stroke Association. <i> Stroke.</i> 2018;49(3):e46-e110. <b>2.</b>CLEVIPREX<sup>®</sup> (clevidipine) Prescribing Information. 2021.</div>');
546                }
547
548                if ($("body").hasClass("dr-obrien-thanks")) {
549                    $("html, body").animate({ scrollTop: $("#dr-obrien-thank-you").offset().top - 100 }, "fast");
550
551                }
552
553                // Some pages are being excluded as a result of new design changes.
554                if ($("body").hasClass("safety") == false 
555                    && $("body").hasClass("dosing-administration") == false
556                    && $("body").hasClass("transition") == false
557                    && $("body").hasClass("efficacy") == false
558                    && $("body").hasClass("pharmacology-moa") == false
559                    && $("body").hasClass("low-volume-dosing-option") == false
560                    && $("body").hasClass("resources") == false) {
561                    $(".general-content").wrapAll("<div class='bg-tan-container' />");
562                }
563
564                $(".bg-tan").wrapAll("<div class='bg-tan-container' />");
565                $(".bg-tan2").wrapAll("<div class='bg-tan2-container' />");
566
567                $(".bg-grey").wrapAll("<div class='bg-grey-container' />");
568                $(".bg-grey2").wrapAll("<div class='bg-grey2-container' />");
569
570                if ($("body").hasClass("resources") == true) {
571                    $(".resource-card-contents").parents('.content-block').wrap("<div class='resources-card-container' />");
572                    $(".resource-card-contents").siblings('img').css('height', '196px');
573                }
574
575            },
576            handleHeaderNav: function handleHeaderNav() {
577                if (ww >= site.breakpoints.small) {
578                    $("#menu-header-menu > li > a, #menu-tablet-header-menu > li > a").on("mouseenter", function () {
579                        $("a.hovering").removeClass("hovering");
580                        $(".sub-menu").hide();
581                    });
582                    $(".menu-item-has-children > a").each(function () {
583                        var $this = $(this);
584                        $this.on("mouseenter click", function (e) {
585                            $this.addClass("hovering");
586                            $this.next().show();
587                        }).on("mouseleave", function (e) {
588                            $(".utility-nav").on("mouseenter", function () {
589                                $this.removeClass("hovering");
590                                $this.next().hide();
591                            });
592                        });
593                        $this.next().on("mouseleave", function () {
594                            $this.removeClass("hovering");
595                            $this.next().hide();
596                        });
597                    });
598                } else {
599                    $(".menu-item-has-children a").on(touchClick, function () {
600                        $(this).next().toggle();
601                        $(this).parent('.menu-item-has-children').toggleClass("open");
602                    });
603                }
604
605                $(".header-nav > a").on("click", function (e) {
606                    e.preventDefault();
607                    e.stopPropagation();
608                    $("#menu-header-menu").toggle();
609                    $("#menu-medium-header-menu").toggle();
610                    $(this).toggleClass("open");
611                });
612            },
613            adjustHeroColumns: function adjustHeroColumns() {
614                var $calloutHeroHeight = $(".hero .container:eq(0)").height();
615
616                if (ww >= site.breakpoints.small) {
617                    $(".hero .col-sm-6:eq(0)").css("height", $calloutHeroHeight);
618                } else {
619                    $(".hero .col-sm-6:eq(0)").removeAttr("style");
620                }
621
622                if (isIE()) {
623                    $("#hero-ie, #hero-ie .background, #hero-ie .foreground").css('height', '400px');
624                }
625            },
626            adjustCalloutContent: function adjustCalloutContent() {
627                var $calloutContentHeight = $(".callout .container").height(),
628                    $calloutButton = $(".callout .button");
629
630                if (ww >= site.breakpoints.small) {
631                    $calloutButton.css("top", parseInt($calloutContentHeight - $calloutButton.height()) / 2);
632                } else {
633                    $calloutButton.removeAttr("style");
634                }
635            },
636            handleTabs: function handleTabs() {
637                if ($(".tabs-module").length) {
638                    $(".tab-button").on(anyKindaClick, function (e) {
639                        e.preventDefault();
640                        e.stopPropagation();
641
642                        if ($(".tabs-container").is(":hidden")) {
643                            $(".tabs-container").show();
644                        }
645
646                        $(".tab-button").removeClass("tab-current-item");
647                        $(this).addClass("tab-current-item");
648                        $(".tab-content").hide();
649                        $("#" + $(this).attr("data-tab")).show();
650                        $(".tabs-module .unequal-columns-module .row > div").matchHeight();
651                        var tabLength = $(".tab-button").length,
652                            currentTab = $(".tab-content:visible").index();
653                        $(".prev").removeClass("inactive");
654                        $(".next").removeClass("inactive");
655
656                        if (currentTab == 0) {
657                            $(".prev").addClass("inactive");
658                        } else if (currentTab == tabLength - 1) {
659                            $(".next").addClass("inactive");
660                        }
661
662                        if (ww < site.breakpoints.small) {
663                            $(".tab-button").hide();
664                            $(".tab-button:eq(" + currentTab + ")").show();
665                        }
666                    });
667                    $(".tab-links a").on(anyKindaClick, function (e) {
668                        e.preventDefault();
669                        e.stopPropagation();
670                        var $this = $(this);
671                        noDoubleTrigger = true;
672                        $("html,body").stop().animate({
673                            scrollTop: $(".tabs-module").offset().top
674                        });
675                        $(".tab-button").each(function () {
676                            if ($(this).attr("data-href") === $this.attr("href")) {
677                                $(this).trigger(touchClick);
678                            }
679                        });
680                        var tabLength = $(".tab-button").length,
681                            currentTab = $(".tab-content:visible").index();
682                        $(".prev").removeClass("inactive");
683                        $(".next").removeClass("inactive");
684
685                        if (currentTab == 0) {
686                            $(".prev").addClass("inactive");
687                        } else if (currentTab == tabLength - 1) {
688                            $(".next").addClass("inactive");
689                        }
690
691                        if (ww < site.breakpoints.small) {
692                            $(".tab-button").hide();
693                            $(".tab-button:eq(" + currentTab + ")").show();
694                        }
695
696                        window.setTimeout(function () {
697                            noDoubleTrigger = false;
698                        }, 1000);
699                    });
700
701                    if (ww < site.breakpoints.small) {
702                        $(".tab-button").hide();
703                        $(".tab-button:eq(0)").show();
704                        var tabLength = $(".tab-button").length,
705                            currentTab = $(".tab-content:visible").index();
706
707                        if ($("body").hasClass("request-information")) {
708                            if ($(".tab-current-item").length) {
709                                $(".tab-button").hide();
710                                $(".tab-current-item").show();
711                            } else {
712                                currentTab = 0;
713                            }
714                        } else {
715                            $(".tab-button").hide();
716                            $(".tab-current-item").show();
717                        }
718
719                        $(".next").on(touchClick, function (e) {
720                            e.preventDefault();
721                            e.stopPropagation();
722
723                            if (currentTab !== tabLength - 1) {
724                                currentTab++;
725                                $(".prev").removeClass("inactive");
726                                $(".tab-button").hide();
727                                $(".tab-button:eq(" + currentTab + ")").show();
728                                $(".tab-button:eq(" + currentTab + ")").trigger(touchClick);
729
730                                if (currentTab == tabLength - 1) {
731                                    $(".next").addClass("inactive");
732                                }
733                            }
734                        });
735                        $(".prev").on(touchClick, function (e) {
736                            e.preventDefault();
737                            e.stopPropagation();
738
739                            if (currentTab !== 0) {
740                                currentTab--;
741                                $(".next").removeClass("inactive");
742                                $(".tab-button").hide();
743                                $(".tab-button:eq(" + currentTab + ")").show();
744                                $(".tab-button:eq(" + currentTab + ")").trigger(touchClick);
745
746                                if (currentTab == 0) {
747                                    $(".prev").addClass("inactive");
748                                }
749                            }
750                        });
751                    } else {
752                        $(".tab-button").show();
753                    }
754                }
755            },
756            rearrangePharmacologyContent: function rearrangePharmacologyContent() {
757                if ($(".pharmacology-moa").length) {
758                    var pharmVideo = $("article section:eq(2) .container .row .col-sm-8"),
759                        pharmContent = $("article section:eq(2) .container .row .col-sm-4");
760
761                    if (ww >= site.breakpoints.small) {
762                        pharmVideo.css("float", "right");
763                        pharmContent.css("float", "right");
764                    } else {
765                        pharmVideo.removeAttr("style");
766                        pharmContent.removeAttr("style");
767                    }
768                }
769            }
770        };
771        DosingCalculator = {
772            config: {
773                mg: $("#mg"),
774                mL: $("#mL"),
775                btn: $("#dosing-calculator button")
776            },
777            init: function init() {
778                var _this = this;
779
780                this.config.mg.on("focus focusin", function (e) {
781                    e.preventDefault();
782                    e.stopPropagation();
783
784                    _this.clearInputs();
785                }).on("blur focusout", function (e) {
786                    e.preventDefault();
787                    e.stopPropagation();
788                    var $pattern = /^[0-9]*$/g;
789
790                    if (_this.config.mg.val() !== "") {
791                        if (_this.config.mg.val() > 32 || _this.config.mg.val() < 1) {
792                            _this.config.mL.val("");
793
794                            _this.config.mg.parent().find(".number").hide();
795
796                            _this.config.mg.parent().find(".range").show();
797
798                            _this.config.mg.addClass("invalid");
799                        } else if (!$pattern.test(_this.config.mg.val())) {
800                            _this.config.mL.val("");
801
802                            _this.config.mg.parent().find(".number").show();
803
804                            _this.config.mg.parent().find(".range").hide();
805
806                            _this.config.mg.addClass("invalid");
807                        } else {
808                            if (!_this.config.mg.parent().find(".number").is(":visible")) {
809                                _this.config.mg.parent().find(".error").hide();
810
811                                _this.config.mg.removeClass("invalid");
812
813                                _this.calculateML();
814                            }
815                        }
816                    }
817                }).on("keyup", function (e) {
818                    e.preventDefault();
819                    var $pattern = /^[0-9]*$/g;
820
821                    if (!$pattern.test(_this.config.mg.val())) {
822                        _this.config.mL.val("");
823
824                        _this.config.mg.parent().find(".number").show();
825
826                        _this.config.mg.parent().find(".range").hide();
827
828                        _this.config.mg.addClass("invalid");
829                    } else {
830                        _this.config.mg.parent().find(".error").hide();
831
832                        _this.config.mg.removeClass("invalid");
833
834                        if (e.keyCode == 13) {
835                            if (_this.config.mg.val() !== "") {
836                                if (_this.config.mg.val() > 32 || _this.config.mg.val() < 1) {
837                                    _this.config.mL.val("");
838
839                                    _this.config.mg.parent().find(".number").hide();
840
841                                    _this.config.mg.parent().find(".range").show();
842
843                                    _this.config.mg.addClass("invalid");
844                                } else {
845                                    if (!_this.config.mg.parent().find(".number").is(":visible")) {
846                                        _this.config.mg.parent().find(".error").hide();
847
848                                        _this.config.mg.removeClass("invalid");
849
850                                        _this.calculateML();
851                                    }
852                                }
853                            }
854                        }
855                    }
856                });
857                this.config.mL.on("focus focusin", function (e) {
858                    e.preventDefault();
859                    e.stopPropagation();
860
861                    _this.clearInputs();
862                }).on("blur focusout", function (e) {
863                    e.preventDefault();
864                    e.stopPropagation();
865                    var $pattern = /^[0-9]*$/g;
866
867                    if (_this.config.mL.val() !== "") {
868                        if (_this.config.mL.val() > 64 || _this.config.mL.val() < 2 || _this.config.mL.val() % 2 == 1) {
869                            _this.config.mg.val("");
870
871                            _this.config.mL.parent().find(".number").hide();
872
873                            _this.config.mL.parent().find(".range").show();
874
875                            _this.config.mL.addClass("invalid");
876                        } else if (!$pattern.test(_this.config.mL.val())) {
877                            _this.config.mg.val("");
878
879                            _this.config.mL.parent().find(".number").show();
880
881                            _this.config.mL.parent().find(".range").hide();
882
883                            _this.config.mL.addClass("invalid");
884                        } else {
885                            if (!_this.config.mL.parent().find(".number").is(":visible")) {
886                                _this.config.mL.parent().find(".error").hide();
887
888                                _this.config.mL.removeClass("invalid");
889
890                                _this.calculateMG();
891                            }
892                        }
893                    }
894                }).on("keyup", function (e) {
895                    e.preventDefault();
896                    var $pattern = /^[0-9]*$/g;
897
898                    if (!$pattern.test(_this.config.mL.val())) {
899                        _this.config.mg.val("");
900
901                        _this.config.mL.parent().find(".number").show();
902
903                        _this.config.mL.parent().find(".range").hide();
904
905                        _this.config.mL.addClass("invalid");
906                    } else {
907                        _this.config.mg.parent().find(".error").hide();
908
909                        _this.config.mL.removeClass("invalid");
910
911                        if (e.keyCode == 13) {
912                            if (_this.config.mL.val() !== "") {
913                                if (_this.config.mL.val() > 64 || _this.config.mL.val() < 2 || _this.config.mL.val() % 2 == 1) {
914                                    _this.config.mg.val("");
915
916                                    _this.config.mL.parent().find(".number").hide();
917
918                                    _this.config.mL.parent().find(".range").show();
919
920                                    _this.config.mL.addClass("invalid");
921                                } else {
922                                    if (!_this.config.mL.parent().find(".number").is(":visible")) {
923                                        _this.config.mL.parent().find(".error").hide();
924
925                                        _this.config.mL.removeClass("invalid");
926
927                                        _this.calculateMG();
928                                    }
929                                }
930                            }
931                        }
932                    }
933                });
934                this.config.btn.on(touchClick, function (e) {
935                    e.preventDefault();
936                    e.stopPropagation();
937
938                    if (_this.config.mg.val() == "" && _this.config.mL.val() == "") {
939                        _this.config.mg.parent().animate({
940                            opacity: 0
941                        }, 200, function () {
942                            _this.config.mg.parent().delay(100).animate({
943                                opacity: 1
944                            }, 200);
945                        });
946
947                        _this.config.mL.parent().animate({
948                            opacity: 0
949                        }, 200, function () {
950                            _this.config.mL.parent().delay(100).animate({
951                                opacity: 1
952                            }, 200);
953                        });
954                    } else {
955                        if (_this.config.mg.val() !== "" && _this.config.mg.val() !== undefined) {
956                            if (_this.config.mg.val() > 32 || _this.config.mg.val() < 1) {
957                                _this.config.mL.val("");
958
959                                _this.config.mg.parent().find(".number").hide();
960
961                                _this.config.mg.parent().find(".range").show();
962
963                                _this.config.mg.addClass("invalid");
964                            } else {
965                                if (!_this.config.mg.parent().find(".number").is(":visible")) {
966                                    _this.config.mg.parent().find(".error").hide();
967
968                                    _this.config.mg.removeClass("invalid");
969
970                                    _this.calculateML();
971                                }
972                            }
973                        } else if (_this.config.mL.val() !== "" && _this.config.mL.val() !== undefined) {
974                            if (_this.config.mL.val() > 64 || _this.config.mL.val() < 2 || _this.config.mL.val() % 2 == 1) {
975                                _this.config.mg.val("");
976
977                                _this.config.mL.parent().find(".number").hide();
978
979                                _this.config.mL.parent().find(".range").show();
980
981                                _this.config.mL.addClass("invalid");
982                            } else {
983                                if (!_this.config.mL.parent().find(".number").is(":visible")) {
984                                    _this.config.mL.parent().find(".error").hide();
985
986                                    _this.config.mL.removeClass("invalid");
987
988                                    _this.calculateMG();
989                                }
990                            }
991                        }
992                    }
993
994                    _this.config.mL.trigger("blur");
995
996                    _this.config.mg.trigger("blur");
997                });
998            },
999            calculateML: function calculateML() {
1000                this.config.mL.val(this.config.mg.val() * 2);
1001            },
1002            calculateMG: function calculateMG() {
1003                this.config.mg.val(this.config.mL.val() / 2);
1004            },
1005            clearInputs: function clearInputs() {
1006                this.config.mg.val("");
1007                this.config.mL.val("");
1008                this.config.mg.parent().find(".error").hide();
1009                this.config.mg.removeClass("invalid");
1010                this.config.mL.parent().find(".error").hide();
1011                this.config.mL.removeClass("invalid");
1012            }
1013        };
1014        ISIWidget = {
1015            config: {
1016                element: $("#isi-widget"),
1017                bar: $("#isi-widget-bar .container .row .col-xs-12"),
1018                contentWrapper: $("#isi-widget-content-wrapper"),
1019                contentContainer: $("#isi-widget-content"),
1020                expandLink: $(".isi-open"),
1021                minimizeLink: $(".isi-close"),
1022                triggerLink: $(".isi-trigger"),
1023                offset: 0,
1024                interacted: false
1025            },
1026            init: function init() {
1027                var $isiHeader = $("#isi-indications-wrapper .col-xs-12:eq(0) h3").clone();
1028                var $isiContent = $("#isi-indications-wrapper .col-xs-12:eq(0) div").clone();
1029                var $indicationsHeader = $("#isi-indications-wrapper .col-xs-12:eq(1) h3").clone();
1030                var $indicationsContent = $("#isi-indications-wrapper .col-xs-12:eq(1) div").clone();
1031                var $barRow = $('<div class="row"></div>').appendTo(this.config.bar);
1032                $('<div class="col-xs-12 col-md-6"></div>').append($isiHeader).appendTo($barRow);
1033                $('<div class="col-xs-12 col-md-6 hidden-xs hidden-sm"></div>').append($indicationsHeader).appendTo($barRow);
1034                var $contentRow = $('<div class="row"></div>').appendTo(this.config.contentContainer);
1035                $('<div class="col-xs-12 col-md-6"></div>').append($isiContent).appendTo($contentRow);
1036                $('<div class="col-xs-12 hidden-lg hidden-md hidden-xl"></div>').append($indicationsHeader.clone()).appendTo($contentRow);
1037                $('<div class="col-xs-12 col-md-6"></div>').append($indicationsContent).appendTo($contentRow);
1038                $("#isi-indications-wrapper .col-xs-12:eq(2)").clone().appendTo($contentRow);
1039
1040                if ($("#isi-indications-wrapper .col-xs-12").length > 3) {
1041                    var $cardeneRow = $('<div class="row add-cardene"></div>').appendTo(this.config.contentContainer);
1042                    $cardeneRow.append($("#isi-indications-wrapper .col-xs-12:eq(3)").clone());
1043                    $cardeneRow.append($("#isi-indications-wrapper .col-xs-12:eq(4)").clone());
1044                    $("#isi-indications-wrapper .col-xs-12:eq(5)").clone().appendTo($cardeneRow);
1045                }
1046
1047                this.setContainerHeight();
1048
1049                if (this.config.interacted == true) {
1050                    this.minimize();
1051                }
1052
1053                var _this = this;
1054
1055                this.config.triggerLink.on(anyKindaClick, function (e) {
1056                    e.preventDefault();
1057                    e.stopPropagation();
1058
1059                    // if ($("#isi-widget").hasClass("expanded")) {
1060                    //     _this.config.minimizeLink.trigger("click");
1061
1062                    // } else {
1063                    _this.config.expandLink.trigger("click");
1064
1065                    // }
1066                });
1067
1068                this.config.expandLink.on(ISIClick, function (e) {
1069                    e.preventDefault();
1070                    e.stopPropagation();
1071                    window.dataLayer.push({ 'event': 'select_content', 'content_type': (window.location.pathname + ':important safety information - expand') });
1072                });
1073                this.config.minimizeLink.on(ISIClick, function (e) {
1074                    e.preventDefault();
1075                    e.stopPropagation();
1076                    window.dataLayer.push({ 'event': 'select_content', 'content_type': (window.location.pathname + ':important safety information - close') });
1077                }
1078                );
1079
1080                this.config.expandLink.on(anyKindaClick, function (e) {
1081                    e.preventDefault();
1082                    e.stopPropagation();
1083
1084                    _this.config.expandLink.hide();
1085
1086                    _this.config.minimizeLink.show();
1087
1088                    _this.expand();
1089
1090
1091
1092                });
1093
1094                this.config.minimizeLink.on(anyKindaClick, function (e) {
1095                    e.preventDefault();
1096                    e.stopPropagation();
1097
1098                    _this.config.minimizeLink.hide();
1099
1100                    _this.config.expandLink.show();
1101
1102                    _this.minimize();
1103
1104
1105                });
1106                this.peekaboo();
1107            },
1108            setContainerHeight: function setContainerHeight() {
1109                if (this.config.element.is(":visible")) {
1110                    if (this.config.interacted === true) {
1111                        this.config.element.css("height", document.getElementById('isi-widget-bar').offsetHeight + 'px');
1112                    } else {
1113                        if (ww >= site.breakpoints.small) {
1114                            this.config.element.css("height", 0.25 * wh);
1115                        } else {
1116                            this.config.element.css("height", 0.3 * wh);
1117                        }
1118                    }
1119
1120                    this.config.offset = parseInt(this.config.element.css("height")) - $("#isi-widget-bar").height();
1121                }
1122            },
1123            expand: function expand() {
1124                var $delta, $deltaContent;
1125
1126                if ($(window).scrollTop() > $("header").height()) {
1127                    $delta = $(window).innerHeight();
1128                } else {
1129                    $delta = $(window).innerHeight() - $("header").height() + $(window).scrollTop();
1130                }
1131
1132                $deltaContent = $delta - $("#isi-widget-bar").height();
1133                this.config.interacted = true;
1134                this.config.element.css("height", $delta + "px").attr("class", "expanded");
1135                this.config.contentContainer.removeAttr('style');
1136                this.config.contentContainer.css("height", $deltaContent + "px").css("overflow-y", "auto");
1137                this.config.contentContainer.css('margin-right', '-' + (this.config.contentContainer[0].offsetWidth - this.config.contentContainer[0].clientWidth) + 'px');
1138                window.setTimeout(function () {
1139                    $("body").addClass("no-scroll");
1140                }, 1);
1141            },
1142            minimize: function minimize() {
1143                this.config.interacted = true;
1144                this.config.element.attr("class", "minimized");
1145                $("body").removeClass("no-scroll");
1146                this.config.contentContainer.removeAttr("style");
1147                this.config.contentWrapper.removeAttr("style");
1148                this.peekaboo();
1149            },
1150            disappear: function disappear() {
1151                this.config.element.hide();
1152            },
1153            appear: function appear() {
1154                this.config.element.show();
1155            },
1156            peekaboo: function peekaboo() {
1157                var scrollTop = $(window).scrollTop();
1158
1159                if (this.config.element.hasClass("expanded")) {
1160                    var targetHeight = document.getElementById('isi-widget-bar').offsetHeight + 'px';
1161                    this.config.element.css("height", targetHeight).attr("class", "expanded");
1162                    this.config.contentContainer.css("height", targetHeight).css("overflow-y", "auto");
1163                    this.config.contentWrapper.css("height", targetHeight);
1164                } else {
1165                    this.setContainerHeight();
1166                }
1167
1168                var smidge = ww < site.breakpoints.small ? 20 : 36;
1169
1170                if ($("#isi-indications-wrapper .col-xs-12:eq(0)").offset().top - $(window).height() + smidge + parseInt(this.config.offset, 10) < scrollTop) {
1171                    if (!this.config.element.hasClass("expanded")) {
1172                        this.disappear();
1173                    }
1174                } else {
1175                    this.appear();
1176                }
1177            },
1178            setInteracted: function setInteracted(isInteracted) {
1179                //console.log("set interacted: " + isInteracted);
1180                sessionStorage.setItem('isi-widget-interacted', isInteracted);
1181                this.config.interacted = isInteracted;
1182            }
1183        };
1184        VideoForm = {
1185            config: {
1186                element: $(".videos .wpcf7-form"),
1187                emailRegex: /(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?
1187:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>
1187(?:(?:\r\n)?[ \t])*)(?:,\s*(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*))*)?;\s*)/
1188            },
1189            init: function init() {
1190                $.validator.methods.rfc822email = function (value, element) {
1191                    return this.optional(element) || VideoForm.config.emailRegex.test(value);
1192                };
1193
1194                VideoForm.validateThis();
1195            },
1196            validateThis: function validateThis() {
1197                this.config.element.validate({
1198                    onfocusout: function onfocusout(element) {
1199                        this.element(element);
1200                    },
1201                    rules: {
1202                        "user-title": {
1203                            required: true
1204                        },
1205                        "user-fname": {
1206                            required: true
1207                        },
1208                        "user-lname": {
1209                            required: true
1210                        },
1211                        "user-email": {
1212                            required: true,
1213                            rfc822email: true
1214                        },
1215                        "permission-to-contact[]": {
1216                            required: true
1217                        }
1218                    },
1219                    messages: {
1220                        "user-title": {
1221                            required: "Title is required."
1222                        },
1223                        "user-fname": {
1224                            required: "First name is required."
1225                        },
1226                        "user-lname": {
1227                            required: "Last name is required."
1228                        },
1229                        "user-email": {
1230                            required: "This field cannot be blank.",
1231                            rfc822email: "A valid email is required."
1232                        },
1233                        "permission-to-contact[]": {
1234                            required: "You must agree to the terms and conditions."
1235                        }
1236                    },
1237                    errorPlacement: function errorPlacement(error, element) {
1238                        error.insertAfter(element);
1239                    }
1240                });
1241            }
1242        };
1243        Tracking = {
1244            init: function init() {
1245                var _this2 = this;
1246
1247                var scrollElements = new Array();
1248                var body = $('body');
1249                var aInternalLink = 'internal link';
1250                var aExternalLink = 'external link';
1251                var aScroll = 'scroll';
1252                var aClick = 'click';
1253                var aExpand = 'expand';
1254                var aClose = 'close';
1255                var aDownload = 'download';
1256                var aForm = 'form';
1257
1258                function navButtonTitle(navButton) {
1259                    var grandParent = navButton.parent().parent();
1260                    var outputTitle = '';
1261
1262                    if (grandParent.hasClass('sub-menu')) {
1263                        outputTitle += grandParent.prev().text().toLowerCase() + ' - ';
1264                    }
1265
1266                    outputTitle += navButton.text().toLowerCase();
1267                    return outputTitle;
1268                }
1269
1270                var currentPageTitle;
1271
1272                if ($('body').hasClass('home')) {
1273                    currentPageTitle = 'home';
1274                } else if ($('body').hasClass('thank-you')) {
1275                    currentPageTitle = 'thank you';
1276                } else if ($('.current_page_item').length) {
1277                    currentPageTitle = navButtonTitle($('.current_page_item').eq(0));
1278                } else {
1279                    currentPageTitle = 'error';
1280                }
1281
1282                var scrollEvent = function scrollEvent() {
1283                    var scrollTop = $(window).scrollTop();
1284                    var removeElements = new Array();
1285
1286                    for (var i = 0; i < scrollElements.length; i++) {
1287                        var scrollElement = scrollElements[i];
1288                        var el = document.querySelectorAll(scrollElement.element)[0];
1289                        var fixedISI = $("#isi-widget");
1290
1291                        if ($(el).offset().top <= scrollTop + $(window).outerHeight() - (fixedISI.is(':visible') ? fixedISI.outerHeight() : 0)) {
1292                            _this2.send(scrollElement.Category, scrollElement.Action, scrollElement.Label);
1293
1294                            removeElements.push(scrollElement);
1295                        }
1296                    }
1297
1298                    if (removeElements.length > 0) {
1299                        scrollElements = scrollElements.filter(function (item) {
1300                            return removeElements.indexOf(item) < 0;
1301                        });
1302
1303                        if (scrollElements.length === 0) {
1304                            window.removeEventListener("scroll", scrollEvent);
1305                        }
1306                    }
1307                },
1308                    trackScroll = function trackScroll(tElement, tCategory, tAction, tLabel) {
1309                        if (tElement.length <= 0) {
1310                            return;
1311                        }
1312
1313                        var element = $(tElement);
1314
1315                        if (element && element.length > 0) {
1316                            scrollElements.push(new Object({
1317                                "element": tElement,
1318                                "Category": tCategory,
1319                                "Action": tAction,
1320                                "Label": tLabel
1321                            }));
1322
1323                            if (scrollElements.length === 1) {
1324                                window.addEventListener("scroll", scrollEvent);
1325                            }
1326                        }
1327                    };
1328
1329                $('[data-ga-scroll-label]').each(function () {
1330                    trackScroll("[data-ga-scroll-label='" + $(this).data('ga-scroll-label') + "']", currentPageTitle, aScroll, $(this).data('ga-scroll-label'));
1331                });
1332                $('#hcp-modal button').on(touchClick, function (e) {
1333                    e.stopPropagation();
1334                    ga('send', 'event', 'global - intersticial', 'click', 'for us healthcare professionals - ' + $(this).text().toLowerCase());
1335                });
1336                $("#menu-utility-menu a[href*='#isi']").on(touchClick, function (e) {
1337                    e.stopPropagation();
1338                    ga('send', 'event', 'global - header', 'click', 'ISI');
1339                    pushLayer('top_nav', 'nav_element', 'ISI');
1340                });
1341                $("#menu-utility-menu a[href='https://resources.chiesiusa.com/Cleviprex/CLEVIPREX_US_PI.pdf']").on(touchClick, function (e) {
1342                    e.stopPropagation();
1343                    ga('send', 'event', 'global - header', 'download', 'PI (header)');
1344                    pushLayer('pdf_download', 'header', 'prescribing information');
1345                });
1346
1347                $("#menu-utility-menu a[href*='videos']").on(touchClick, function (e) {
1348                    e.stopPropagation();
1349                    ga('send', 'event', 'global - header', aInternalLink, 'Videos');
1350                    pushLayer('top_nav', 'nav_element', 'videos');
1351                });
1352                $("#menu-utility-menu a[href*='request-information']").on(touchClick, function (e) {
1353                    e.stopPropagation();
1354                    ga('send', 'event', 'global - header', aInternalLink, 'request information');
1355                    pushLayer('request_link', 'header', 'request information');
1356                });
1357                $("#menu-utility-menu a[href*='how-to-order']").on(touchClick, function (e) {
1358                    e.stopPropagation();
1359                    ga('send', 'event', 'global - header', aInternalLink, 'How to order');
1360                    pushLayer('top_nav', 'nav_element', 'How to order');
1361                });
1362                $("#menu-utility-menu a[href*='peer-insights']").on(touchClick, function (e) {
1363                    e.stopPropagation();
1364                    ga('send', 'event', 'global - header', aInternalLink, 'peer insights');
1365                    pushLayer('top_nav', 'nav_element', 'peer insights');
1366                });
1367                $("header .logo a").on(touchClick, function (e) {
1368                    e.stopPropagation();
1369                    ga('send', 'event', 'global - header', 'click', 'Cleviprex logo (header)');
1370                    pushLayer('top_nav', 'nav_element', 'cleviprex logo');
1371                });
1372                $(".header-nav a:not([href='#'])").on(touchClick, function (e) {
1373                    e.stopPropagation();
1374                    ga('send', 'event', 'global - navigation', aInternalLink, navButtonTitle($(this)));
1375                    pushLayer('top_nav', 'nav_element', navButtonTitle($(this)));
1376                });
1377                $("#menu-footer-menu a[href='https://chiesiusa.com']").on(touchClick, function (e) {
1378                    e.stopPropagation();
1379                    ga('send', 'event', 'global - footer', aExternalLink, 'chiesi USA');
1380                    pushLayer('select_content', 'content_type', 'chiesi usa');
1381                });
1382                $("#menu-footer-menu a[href='https://chiesiusa.com/privacy-policy/']").on(touchClick, function (e) {
1383                    e.stopPropagation();
1384                    ga('send', 'event', 'global - footer', aExternalLink, 'privacy policy (footer)');
1385                    pushLayer('select_content', 'content_type', 'privacy policy');
1386
1387                });
1388                $("#menu-footer-menu a[href='https://chiesiusa.com/terms-of-use/']").on(touchClick, function (e) {
1389                    e.stopPropagation();
1390                    ga('send', 'event', 'global - footer', aExternalLink, 'terms of use');
1391                    pushLayer('select_content', 'content_type', 'terms of use');
1392
1393                });
1394                $("#menu-footer-menu a[href='https://resources.chiesiusa.com/Cleviprex/CLEVIPREX_US_PI.pdf']").on(touchClick, function (e) {
1395                    e.stopPropagation();
1396                    ga('send', 'event', 'global - footer', 'download', 'PI (footer)');
1397                    pushLayer('pdf_download', 'footer', 'prescribing information');
1398                });
1399
1400                $("#menu-footer-menu a[href*='request-information']").on(touchClick, function (e) {
1401                    e.stopPropagation();
1402                    ga('send', 'event', 'global - footer', aInternalLink, 'request information');
1403                    pushLayer('request_link', 'footer', 'request information');
1404
1405                });
1406                $("footer .col-sm-push-10 a[href='https://chiesiusa.com']").on(touchClick, function (e) {
1407                    e.stopPropagation();
1408                    ga('send', 'event', 'global - footer', 'click', 'chiesi logo');
1409                    pushLayer('select_content', 'content_type', 'chiesi logo');
1410
1411                });
1412                $("aside a, #isi-widget-content a").on(touchClick, function (e) {
1413                    e.stopPropagation();
1414                    ga('send', 'event', 'global - ISI', 'download', 'PI (ISI)');
1415                    pushLayer('pdf_download', 'onpage', 'prescribing information');
1416                });
1417
1418                if (body.hasClass("home")) {
1419                    $(".home .guidelines-banner a").on(touchClick, function (e) {
1420                        e.stopPropagation();
1421                        ga('send', 'event', 'home', aInternalLink, '2018 AHA ASA guidelines');
1422                        pushLayer('select_content', 'content_type', '2018 aha asa guidelines');
1423
1424                    });
1425                    $(".home .one-column-module a").on(touchClick, function (e) {
1426                        e.stopPropagation();
1427                        ga('send', 'event', 'home', aInternalLink, 'calculate dosing');
1428                        pushLayer('select_content', 'content_type', 'calculate dosing');
1429
1430                    });
1431                    $(".home .three-column-module a").eq(0).on(touchClick, function (e) {
1432                        e.stopPropagation();
1433                        ga('send', 'event', 'home', aInternalLink, 'explore the clinical studies (home)');
1434                        pushLayer('select_content', 'content_type', 'explore the clinical studies');
1435
1436                    });
1437                    $(".home .three-column-module a").eq(1).on(touchClick, function (e) {
1438                        e.stopPropagation();
1439                        ga('send', 'event', 'home', aInternalLink, 'see the pharmacology data (home)');
1440                        pushLayer('select_content', 'content_type', 'see the pharmacology data');
1441
1442                    });
1443                    $(".home .three-column-module a").eq(2).on(touchClick, function (e) {
1444                        e.stopPropagation();
1445                        ga('send', 'event', 'home', aInternalLink, 'view the trial results (home)');
1446                        pushLayer('select_content', 'content_type', 'view the trial results');
1447
1448                    });
1449                    $(".home .video-callout a").on(touchClick, function (e) {
1450                        e.stopPropagation();
1451                        ga('send', 'event', 'home', aInternalLink, 'watch videos');
1452                        pushLayer('select_content', 'content_type', 'watch videos');
1453
1454                    });
1455                    $(".home .callout a").on(touchClick, function (e) {
1456                        e.stopPropagation();
1457                        ga('send', 'event', 'home', aInternalLink, 'start request (home)');
1458                        // Not on site?
1459
1460                    });
1461                } else if (body.hasClass('pharmacology-moa')) {
1462                    $(".pharmacology-moa .callout a").on(touchClick, function (e) {
1463                        e.stopPropagation();
1464                        ga('send', 'event', 'pharmacology & moa', aInternalLink, 'explore the clinical studies (pharmacology & moa)');
1465                        pushLayer('select_content', 'content_type', 'explore the clinical studies');
1466
1467                    });
1468                    $(".pharmacology-moa .two-column-module a").eq(0).on(touchClick, function (e) {
1469                        e.stopPropagation();
1470                        ga('send', 'event', 'pharmacology & moa', aInternalLink, 'review dosing and administration (pharmacology & moa)');
1471                        pushLayer('select_content', 'content_type', 'review dosing and administration');
1472                    });
1473                    $(".pharmacology-moa .two-column-module a").eq(1).on(touchClick, function (e) {
1474                        e.stopPropagation();
1475                        ga('send', 'event', 'pharmacology & moa', aInternalLink, 'view the recommendations (pharmacology and moa)');
1476                        pushLayer('select_content', 'content_type', 'view the recommendations');
1477                    });
1478                    $(".pharmacology-moa .video-callout a").on(touchClick, function (e) {
1479                        e.stopPropagation();
1480                        ga('send', 'event', 'pharmacology & moa', aInternalLink, 'watch videos');
1481                        pushLayer('select_content', 'content_type', 'watch videos');
1482                    });
1483                } else if (body.hasClass('efficacy')) {
1484                    var setupChartEvents = function setupChartEvents(chartClass, chartLabel) {
1485                        $('.' + chartClass + ' .zoom-trigger').on(touchClick, function (e) {
1486                            e.stopPropagation();
1487                            ga('send', 'event', currentPageTitle, aExpand, chartLabel);
1488                            pushLayer('select_content', 'content_type', (chartLabel + ' - expand'));
1489                        });
1490                        $('body').on(touchClick, '.zoom-container .' + chartClass + ' .zoom-trigger', function (e) {
1491                            e.stopPropagation();
1492                            ga('send', 'event', currentPageTitle, aClose, chartLabel);
1493                            pushLayer('select_content', 'content_type', (chartLabel + ' - close'));
1494                        });
1495                    };
1496
1497                    $(".tabs-module.large .tab-button").on(touchClick, function (e) {
1498                        e.stopPropagation();
1499
1500                        if (!noDoubleTrigger) {
1501                            var label = $(this).find('h2 span').contents()[0].data + ' ' + $(this).children().eq(0).text().toLowerCase();
1502                            ga('send', 'event', currentPageTitle, aClick, label);
1503                            pushLayer('select_content', 'content_type', (label + ' - tab'));
1504                        }
1505                    });
1506                    setupChartEvents('escape1-primary-endpoint-zoom', 'Treatment success rate-preoperative clinical setting chart');
1507                    setupChartEvents('escape1-secondary-endpoint-zoom', 'Mean change in SBP-preoperative clinical setting chart');
1508                    setupChartEvents('escape2-primary-endpoint-zoom', 'Treatment success rate-postoperative clinical setting chart');
1509                    setupChartEvents('escape2-secondary-endpoint-zoom', 'Mean change in SBP-postoperative clinical setting chart');
1510                    setupChartEvents('velocity-mean-percent-change-zoom', 'Mean percent change in SBP during the first 30 minutes of infusion in acute severe hypertension chart');
1511                    $("a.special").on(touchClick, function (e) {
1512                        e.stopPropagation();
1513                        ga('send', 'event', currentPageTitle, aClick, $(this).text());
1514                        pushLayer('select_content', 'content_type', ($(this).text()));
1515                    });
1516                    $('.callout a').on(touchClick, function (e) {
1517                        e.stopPropagation();
1518                        ga('send', 'event', currentPageTitle, aInternalLink, 'review dosing and administration (efficacy)');
1519                        pushLayer('select_content', 'content_type', 'review dosing and administration');
1520                    });
1521                    $("a[href*='CLEVIPREX_Flash_Card.pdf']").eq(0).on(touchClick, function (e) {
1522                        e.stopPropagation();
1523                        ga('send', 'event', currentPageTitle, aDownload, 'CLEVIPREX Flashcard');
1524                        pushLayer('pdf_download', 'onpage', 'cleviprex flashcard');
1525                    });
1526                    $(".callout+.two-column-module a").eq(1).on(touchClick, function (e) {
1527                        e.stopPropagation();
1528                 
1528       ga('send', 'event', currentPageTitle, aInternalLink, 'view the trial results (efficacy)');
1529                        pushLayer('select_content', 'content_type', 'view the trial results');
1530                    });
1531                    $(".efficacy .video-callout a").on(touchClick, function (e) {
1532                        e.stopPropagation();
1533                        ga('send', 'event', 'efficacy', aInternalLink, 'watch videos');
1534                        pushLayer('select_content', 'content_type', 'watch videos');
1535                    });
1536                    trackScroll(".tab-links", currentPageTitle, aScroll, 'additional studies crosslinks');
1537                } else if (body.hasClass('ready-to-use')) {
1538                    $('.callout a').on(touchClick, function (e) {
1539                        e.stopPropagation();
1540                        ga('send', 'event', currentPageTitle, aInternalLink, 'how to order (ready to use)');
1541                        pushLayer('select_content', 'content_type', 'how to order');
1542                    });
1543                    $("a[href*='CLEVIPREX_Dosing_and_Administration_Fact_Sheet.pdf'").eq(0).on(touchClick, function (e) {
1544                        e.stopPropagation();
1545                        ga('send', 'event', currentPageTitle, aDownload, 'Dosing and Administration Guide (ready to use)');
1546                        pushLayer('pdf_download', 'onpage', 'dosing and administration guide');
1547                    });
1548                    $(".callout+.two-column-module a").eq(1).on(touchClick, function (e) {
1549                        e.stopPropagation();
1550                        ga('send', 'event', currentPageTitle, aInternalLink, 'see the pharmacology data (ready to use)');
1551                        pushLayer('select_content', 'content_type', 'see the pharmacoloty data');
1552                    });
1553                } else if (body.hasClass('request-information')) {
1554                    $("#user-phone").on('keydown', function (evt) {
1555                        // Only ASCII character in that range allowed
1556                        var ASCIICode = (evt.which) ? evt.which : evt.keyCode
1557                        if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))// && ASCIICode !== 189)
1558                            return false;
1559                        return true;
1560                        // const inputField = $(this);
1561
1562                        // // next, we're going to format this input with the `formattPhoneNumber` function, which we'll write next.
1563                        // const formattedInputValue = formatPhoneNumber(inputField.val());
1564
1565                        // // Then we'll set the value of the inputField to the formattedValue we generated with the formattPhoneNumber
1566                        // inputField.val(formattedInputValue);
1567                    });
1568                    $("form input").on("change", function (e) {
1569                        e.stopPropagation();
1570
1571                        if ($(this).attr('type') === 'checkbox') {
1572                            var label = $(this).next().text();
1573                            ga('send', 'event', currentPageTitle, aClick, label);
1574                        } else {
1575                            var label = $('label[for="' + $(this).attr('name') + '"').contents()[0];
1576                            label = label.data || label.innerHTML;
1577                            label = label.trim().toLowerCase();
1578                            ga('send', 'event', currentPageTitle, aForm, label);
1579                        }
1580                    });
1581                    $('form').on('submit', function (e) {
1582                        ga('send', 'event', currentPageTitle, aForm, 'send request (form)');
1583                    });
1584                    $("a[href*='mailto']").on(touchClick, function (e) {
1585                        e.stopPropagation();
1586                        ga('send', 'event', 'resources or contact', 'click', '[email protected]');
1587                    });
1588                    $('a[href="https://www.chiesiusa.com/privacy-policy/"]').on(touchClick, function (e) {
1589                        e.stopPropagation();
1590                        ga('send', 'event', currentPageTitle, aExternalLink, 'privacy policy');
1591                    });
1592
1593                    document.addEventListener('wpcf7mailsent', function (event) {
1594                        console.log('embedded event listener triggered');
1595                        location = './thank-you';
1596                    }, false);
1597                } else if (body.hasClass('resources')) {
1598                    $("#user-phone").on('keydown', function (evt) {
1599                        // Only ASCII character in that range allowed
1600                        var ASCIICode = (evt.which) ? evt.which : evt.keyCode
1601                        if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))// && ASCIICode !== 189)
1602                            return false;
1603                        return true;
1604                        // const inputField = $(this);
1605
1606                        // // next, we're going to format this input with the `formattPhoneNumber` function, which we'll write next.
1607                        // const formattedInputValue = formatPhoneNumber(inputField.val());
1608
1609                        // // Then we'll set the value of the inputField to the formattedValue we generated with the formattPhoneNumber
1610                        // inputField.val(formattedInputValue);
1611                    });
1612                    $("form input").on("change", function (e) {
1613                        e.stopPropagation();
1614
1615                        if ($(this).attr('type') === 'checkbox') {
1616                            var label = $(this).next().text();
1617                            ga('send', 'event', currentPageTitle, aClick, label);
1618                        } else {
1619                            var label = $('label[for="' + $(this).attr('name') + '"').contents()[0];
1620                            label = label.data || label.innerHTML;
1621                            label = label.trim().toLowerCase();
1622                            ga('send', 'event', currentPageTitle, aForm, label);
1623                        }
1624                    });
1625                    $('form').on('submit', function (e) {
1626                        ga('send', 'event', currentPageTitle, aForm, 'send request (form)');
1627                    });
1628                    // $("a[href*='mailto']").on(touchClick, function (e) {
1629                    //     e.stopPropagation();
1630                    //     ga('send', 'event', 'resources or contact', 'click', '[email protected]');
1631                    // });
1632                    $('a[href="https://www.chiesiusa.com/privacy-policy/"]').on(touchClick, function (e) {
1633                        e.stopPropagation();
1634                        ga('send', 'event', currentPageTitle, aExternalLink, 'privacy policy');
1635                    });
1636
1637                    console.log('Resources page form events setup');
1638                    document.addEventListener('wpcf7mailsent', function (event) {
1639                        console.log('embedded event listener triggered');
1640                        location = './thank-you-kol';
1641                    }, false);
1642                } else if (body.hasClass('thank-you')) {
1643                    $('a:first-of-type').on(touchClick, function (e) {
1644                        e.stopPropagation();
1645                        ga('send', 'event', currentPageTitle, aInternalLink, 'home (thank you)');
1646                    });
1647                    $('a:last-of-type').on(touchClick, function (e) {
1648                        e.stopPropagation();
1649                        ga('send', 'event', currentPageTitle, aDownload, 'PI (thank you)');
1650                    });
1651                } else if (body.hasClass('videos')) {
1652                    $('form').on('submit', function (e) {
1653                        ga('send', 'event', currentPageTitle, aForm, 'send request (form)');
1654                    });
1655                }
1656
1657                $(".dosing-administration #dosing-calculator button").on(touchClick, function (e) {
1658                    e.stopPropagation();
1659                    ga('send', 'event', 'dosing - dosing and administration', 'click', 'convert (dosing calculator)');
1660                });
1661                $(".dosing-administration .tabs-module.normal .tab-button").eq(0).on(touchClick, function (e) {
1662                    e.stopPropagation();
1663                    ga('send', 'event', 'dosing - dosing and administration', 'click', 'before administration');
1664                });
1665                $(".dosing-administration .tabs-module.normal .tab-button").eq(1).on(touchClick, function (e) {
1666                    e.stopPropagation();
1667                    ga('send', 'event', 'dosing - dosing and administration', 'click', 'during administration');
1668                });
1669                $(".dosing-administration .callout a").on(touchClick, function (e) {
1670                    e.stopPropagation();
1671                    ga('send', 'event', 'dosing - dosing and administration', aInternalLink, 'view the recommendations (dosing and administration)');
1672                });
1673                $(".dosing-administration .two-column-module a").eq(0).on(touchClick, function (e) {
1674                    e.stopPropagation();
1675                    ga('send', 'event', 'dosing - dosing and administration', aDownload, 'Dosing and Administration Guide (dosing and administration)');
1676                });
1677                $(".dosing-administration .two-column-module a").eq(1).on(touchClick, function (e) {
1678                    e.stopPropagation();
1679                    ga('send', 'event', 'dosing - dosing and administration', aInternalLink, 'treatment transitioning (dosing and administration)');
1680                });
1681                $(".dosing-administration .video-callout a").on(touchClick, function (e) {
1682                    e.stopPropagation();
1683                    ga('send', 'event', 'dosing - dosing and administration', aInternalLink, 'watch videos');
1684                });
1685
1686                $(".transition .tabs-module.normal .tab-button").eq(0).on(touchClick, function (e) {
1687                    e.stopPropagation();
1688                    ga('send', 'event', 'dosing - transitioning patients', 'click', 'considerations when transitioning to oral');
1689                });
1690                $(".transition .tabs-module.normal .tab-button").eq(1).on(touchClick, function (e) {
1691                    e.stopPropagation();
1692                    ga('send', 'event', 'dosing - transitioning patients', 'click', 'considerations when no oral');
1693                });
1694                $(".transition .callout a").on(touchClick, function (e) {
1695                    e.stopPropagation();
1696                    ga('send', 'event', 'dosing - transitioning patients', aInternalLink, 'view the recommendations (transitioning patients)');
1697                });
1698                $(".transition .two-column-module a").eq(0).on(touchClick, function (e) {
1699                    e.stopPropagation();
1700                    ga('send', 'event', 'dosing - transitioning patients', aDownload, 'Dosing and Administration Guide (transitioning patients)');
1701                });
1702                $(".transition .two-column-module a").eq(1).on(touchClick, function (e) {
1703                    e.stopPropagation();
1704                    ga('send', 'event', 'dosing - transitioning patients', aInternalLink, 'see additional dosing information for cleviprex');
1705                });
1706                $(".other-information .unequal-columns-module a.button.red").on(touchClick, function (e) {
1707                    e.stopPropagation();
1708                    ga('send', 'event', 'dosing - other dosing guidelines', aInternalLink, 'request resources (other dosing)');
1709                });
1710                $(".other-information .callout a").on(touchClick, function () {
1711                    ga('send', 'event', 'dosing - other dosing guidelines', aInternalLink, 'review dosing and administration (other dosing)');
1712                });
1713                $(".other-information .two-column-module a").eq(0).on(touchClick, function (e) {
1714                    e.stopPropagation();
1715                    ga('send', 'event', 'dosing - other dosing guidelines', aDownload, 'Dosing and Administration Guide (other dosing)');
1716                });
1717                $(".other-information .two-column-module a").eq(1).on(touchClick, function (e) {
1718                    e.stopPropagation();
1719                    ga('send', 'event', 'dosing - other dosing guidelines', aInternalLink, 'ordering information');
1720                });
1721
1722                $(".management-guidelines .callout a").on(touchClick, function (e) {
1723                    e.stopPropagation();
1724                    ga('send', 'event', currentPageTitle, aDownload, 'stroke guidelines (mngm guidelines)');
1725                });
1726                $(".management-guidelines .two-column-module a").eq(0).on(touchClick, function (e) {
1727                    e.stopPropagation();
1728                    ga('send', 'event', currentPageTitle, aDownload, 'see the pharmacology data (mngm guidelines)');
1729                });
1730                $(".management-guidelines .two-column-module a").eq(1).on(touchClick, function (e) {
1731                    e.stopPropagation();
1732                    ga('send', 'event', currentPageTitle, aInternalLink, 'view the trial results (mngm guidelines)');
1733                });
1734                $(".management-guidelines .video-callout a").on(touchClick, function (e) {
1735                    e.stopPropagation();
1736                    ga('send', 'event', currentPageTitle, aInternalLink, 'watch videos');
1737                });
1738
1739                $(".safety .two-column-module a").eq(0).on(touchClick, function (e) {
1740                    e.stopPropagation();
1741                    ga('send', 'event', currentPageTitle, aInternalLink, 'explore the clinical studies (safety)');
1742                });
1743                $(".safety .two-column-module a").eq(1).on(touchClick, function (e) {
1744                    e.stopPropagation();
1745                    ga('send', 'event', currentPageTitle, aDownload, 'stroke guidelines (safety)');
1746                });
1747                $(".how-to-order a[href='https://wp-content/uploads/CLEVIPREX_US_Order_Form.pdf']").on(touchClick, function (e) {
1748                    e.stopPropagation();
1749                    ga('send', 'event', 'how to order', aDownload, 'order form');
1750                    pushLayer('pdf_download', 'onpage', 'prescribing information');
1751                });
1752
1753                $(".how-to-order .callout a").on(touchClick, function (e) {
1754                    e.stopPropagation();
1755                    ga('send', 'event', 'how to order', aInternalLink, 'start request (how to order)');
1756                });
1757
1758//                 $(".resources .resource-card-contents a[href='/wp-content/uploads/CLEVIPREX_Flash_Card.pdf']").on(touchClick, function (e) {
1759//                     e.stopPropagation();
1760//                     ga('send', 'event', currentPageTitle, aDownload, 'CLEVIPREX Flashcard');
1761//                     pushLayer('pdf_download', 'onpage', 'cleviprex flashcard');
1762//                 });
1763
1764//                 $(".resources .resource-card-contents a[href='/wp-content/uploads/cleviprex_ais_guidelines.pdf']").on(touchClick, function (e) {
1765//                     e.stopPropagation();
1766//                     ga('send', 'event', currentPageTitle, aDownload, 'CLEVIPREX AIS Guidelines');
1767//                     pushLayer('pdf_download', 'onpage', 'cleviprex ais guidelines');
1768//                 });
1769
1770//                 $(".resources .resource-card-contents a[href='/wp-content/uploads/CLEVIPREX_Dosing_and_Administration_Fact_Sheet.pdf']").on(touchClick, function (e) {
1771//                     e.stopPropagation();
1772//                     ga('send', 'event', currentPageTitle, aDownload, 'Dosing and Administration Guide (ready to use)');
1773//                     pushLayer('pdf_download', 'onpage', 'dosing and administration guide');
1774//                 });
1775
1776                $(".videos .callout a").eq(0).on(touchClick, function (e) {
1777                    e.stopPropagation();
1778                    ga('send', 'event', 'videos', aInternalLink, 'explore the clinical studies (videos)');
1779                });
1780                $(".videos .two-column-module a").eq(0).on(touchClick, function (e) {
1781                    e.stopPropagation();
1782                    ga('send', 'event', 'videos', aInternalLink, 'review dosing and administration (videos)');
1783                });
1784                $(".videos .two-column-module a").eq(1).on(touchClick, function (e) {
1785                    e.stopPropagation();
1786                    ga('send', 'event', 'videos', aInternalLink, 'see the pharmacology data (videos)');
1787                });
1788            },
1789            send: function send(tCategory, tAction, tLabel) {
1790                ga("send", "event", tCategory, tAction, tLabel);
1791                //console.log("ga(\"send\", \"event\", " + tCategory + "\", \"" + tAction + "\", \"" + tLabel + "\");");
1792            }
1793        };
1794        var rtime;
1795        var timeout = false;
1796        var delta = 320;
1797
1798        var resizeend = function resizeend() {
1799            if (new Date() - rtime < delta) {
1800                setTimeout(resizeend, delta);
1801            } else {
1802                timeout = false;
1803                ww = window.innerWidth;
1804                wh = window.innerHeight;
1805                ISIWidget.peekaboo();
1806                site.adjustCalloutContent();
1807                $(".next").off(touchClick);
1808                $(".prev").off(touchClick);
1809                site.handleTabs();
1810                site.rearrangePharmacologyContent();
1811
1812                if ($(".home").length) {
1813                    site.adjustHeroColumns();
1814                }
1815
1816                if ($("body").hasClass("management-guidelines") || $("body").hasClass("ais-guidelines")) {
1817                    $("dt").matchHeight();
1818                    $("dd.third").matchHeight();
1819                    $("dd.fourth").matchHeight();
1820                    $("dd.fifth").matchHeight();
1821                }
1822            }
1823        };
1824
1825        $(window).on("resize", function () {
1826
1827            rtime = new Date();
1828
1829            if (timeout === false) {
1830                timeout = true;
1831                setTimeout(resizeend, delta);
1832            }
1833        }).on("scroll", function (e) {
1834            if ($('body').hasClass('no-scroll')) {
1835                e.preventDefault();
1836            } else {
1837                ISIWidget.peekaboo();
1838            }
1839        });
1840        rtime = new Date();
1841
1842        if (timeout === false) {
1843            timeout = true;
1844            setTimeout(resizeend, delta);
1845        }
1846
1847        site.init();
1848        ISIWidget.init();
1849        DosingCalculator.init();
1850
1851        if ($("body").hasClass("management-guidelines")) {
1852            $("dt").matchHeight();
1853            $("dd.third").matchHeight();
1854            $("dd.fourth").matchHeight();
1855            $("dd.fifth").matchHeight();
1856        }
1857
1858        if ($("body").hasClass("dr_o_brien")) {
1859            $(".read-more-button").on(touchClick, function (e) {
1860                $(this).parent().children(".collapse-div").height("auto");
1861                $(this).parent().parent().parent().parent().parent().css("padding-bottom", "0px")
1862                $(this).hide();
1863                $(this).parent().find(".collapse-div-gradient").css("background", "none");
1864            });
1865        }
1866
1867        if ($("body").hasClass("dr-obrien-thanks")) {
1868            $(".read-more-button").on(touchClick, function (e) {
1869                $(this).parent().children(".collapse-div").height("auto");
1870                $(this).parent().parent().parent().parent().parent().css("padding-bottom", "0px")
1871                $(this).hide();
1872                $(this).parent().find(".collapse-div-gradient").css("background", "none");
1873            });
1874        }
1875
1876        if ($("body").hasClass("request-information")) {
1877            $("#permission-contact").on(touchClick, function (e) {
1878                e.stopPropagation();
1879                ga('send', 'event', 'request information', 'click', 'request information');
1880                pushLayer('request_link', 'onpage', 'request information');
1881
1882            });
1883            $("#permission-contact-copy a").on(touchClick, function (e) {
1884                e.stopPropagation();
1885                ga('send', 'event', 'request information', aExternalLink, 'privacy policy');
1886            });
1887            $("#permission-email").on(touchClick, function (e) {
1888                e.stopPropagation();
1889                ga('send', 'event', 'request information', 'click', 'I\'d like more information about CLEVIPREX.');
1890            });
1891            $("#permission-email-copy a").on(touchClick, function (e) {
1892                e.stopPropagation();
1893                ga('send', 'event', 'request information', aExternalLink, 'privacy policy');
1894            });
1895            $("#user-title").on(touchClick, function (e) {
1896                e.stopPropagation();
1897                ga('send', 'event', 'request information', 'form', 'title');
1898            });
1899            $("#user-fname").on(touchClick, function (e) {
1900                e.stopPropagation();
1901                ga('send', 'event', 'request information', 'form', 'first name');
1902            });
1903            $("#user-lname").on(touchClick, function (e) {
1904                e.stopPropagation();
1905                ga('send', 'event', 'request information', 'form', 'last name');
1906            });
1907            $("#user-specialty").on(touchClick, function (e) {
1908                e.stopPropagation();
1909                ga('send', 'event', 'request information', 'form', 'specialty');
1910            });
1911            $("#user-email").on(touchClick, function (e) {
1912                e.stopPropagation();
1913                ga('send', 'event', 'request information', 'form', 'email address');
1914            });
1915            $("#user-zip").on(touchClick, function (e) {
1916                e.stopPropagation();
1917                ga('send', 'event', 'request information', 'form', 'zip code');
1918            });
1919            $(".wpcf7-submit").on(touchClick, function (e) {
1920
1921                window.setTimeout(function () {
1922                    if ($("form").hasClass("invalid")) {
1923                        var firstErrorPos = $(".wpcf7-not-valid").parent().offset().top;
1924                        $("body,html").stop().animate({
1925                            scrollTop: firstErrorPos - 120
1926                        });
1927                        console.log('Form is invalid');
1928                    } else {
1929                        ga('send', 'event', 'request information', 'form', 'send request (form)');
1930                        console.log('Form submitted - request information event sent');
1931                    }
1932                }, 500);
1933
1934            });
1935            $("#medical a").on(touchClick, function (e) {
1936                e.stopPropagation();
1937                ga('send', 'event', 'request information', aExternalLink, '[email protected]');
1938            });
1939
1940            addThankYouListener();
1941        }
1942        if ($("body").hasClass("resources")) {
1943            $("#permission-contact").on(touchClick, function (e) {
1944                e.stopPropagation();
1945                ga('send', 'event', 'resources', 'click', 'resources');
1946                pushLayer('request_link', 'onpage', 'resources');
1947
1948            });
1949            $("#permission-contact-copy a").on(touchClick, function (e) {
1950                e.stopPropagation();
1951                ga('send', 'event', 'resources', aExternalLink, 'privacy policy');
1952            });
1953            $("#permission-email").on(touchClick, function (e) {
1954                e.stopPropagation();
1955                ga('send', 'event', 'resources', 'click', 'I\'d like more information about CLEVIPREX.');
1956            });
1957            $("#permission-email-copy a").on(touchClick, function (e) {
1958                e.stopPropagation();
1959                ga('send', 'event', 'resources', aExternalLink, 'privacy policy');
1960            });
1961            $("#user-title").on(touchClick, function (e) {
1962                e.stopPropagation();
1963                ga('send', 'event', 'resources', 'form', 'title');
1964            });
1965            $("#user-fname").on(touchClick, function (e) {
1966                e.stopPropagation();
1967                ga('send', 'event', 'resources', 'form', 'first name');
1968            });
1969            $("#user-lname").on(touchClick, function (e) {
1970                e.stopPropagation();
1971                ga('send', 'event', 'resources', 'form', 'last name');
1972            });
1973            $("#user-specialty").on(touchClick, function (e) {
1974                e.stopPropagation();
1975                ga('send', 'event', 'resources', 'form', 'specialty');
1976            });
1977            $("#user-email").on(touchClick, function (e) {
1978                e.stopPropagation();
1979                ga('send', 'event', 'resources', 'form', 'email address');
1980            });
1981            $("#user-zip").on(touchClick, function (e) {
1982                e.stopPropagation();
1983                ga('send', 'event', 'resources', 'form', 'zip code');
1984            });
1985            $(".wpcf7-submit").on(touchClick, function (e) {
1986                if ($("form").hasClass("invalid")) {
1987                    console.log('IS INVALID BEFORE setTimeout');
1988                } else {
1989                    console.log('IS VALID BEFORE setTimeout');
1990                }
1991
1992                window.setTimeout(function () {
1993                    if ($("form").hasClass("invalid")) {
1994                        var firstErrorPos = $(".wpcf7-not-valid").parent().offset().top;
1995                        $("body,html").stop().animate({
1996                            scrollTop: firstErrorPos - 120
1997                        });
1998                        console.log('Form is invalid');
1999                    } else {
2000                        ga('send', 'event', 'resources', 'form', 'send request (form)');
2001                        console.log('Form submitted - resources event sent');
2002                    }
2003                }, 500);
2004
2005            });
2006
2007            addThankYouListener();
2008        }
2009        if ($("body").hasClass("value-access") || $("body").hasClass("value-access-thank-you")) {
2010            $("#cost-and-economic-information, #cost-and-economic-information-copy").on(touchClick, function (e) {
2011                e.stopPropagation();
2012                ga('send', 'event', 'value access landing page', 'click', 'cost and economic information');
2013            });
2014            $("#value-based-considerations-and-analysis, #value-based-considerations-and-analysis-copy").on(touchClick, function (e) {
2015                e.stopPropagation();
2016                ga('send', 'event', 'value access landing page', 'click', 'value-based considerations and analysis');
2017            });
2018            $("#formulary-considerations, #formulary-considerations-copy").on(touchClick, function (e) {
2019                e.stopPropagation();
2020                ga('send', 'event', 'value access landing page', 'click', 'formulary considerations');
2021            });
2022            $("#user-title").on(touchClick, function (e) {
2023                e.stopPropagation();
2024                ga('send', 'event', 'value access landing page', 'click', 'title');
2025            });
2026            $("#user-fname").on(touchClick, function (e) {
2027                e.stopPropagation();
2028                ga('send', 'event', 'value access landing page', 'click', 'first name');
2029            });
2030            $("#user-lname").on(touchClick, function (e) {
2031                e.stopPropagation();
2032                ga('send', 'event', 'value access landing page', 'click', 'last name');
2033            });
2034            $("#user-email").on(touchClick, function (e) {
2035                e.stopPropagation();
2036                ga('send', 'event', 'value access landing page', 'click', 'email address');
2037            });
2038            $("#user-zip").on(touchClick, function (e) {
2039                e.stopPropagation();
2040                ga('send', 'event', 'value access landing page', 'click', 'zip code');
2041            });
2042            $("#permission-contact, #permission-contact-copy").on(touchClick, function (e) {
2043                e.stopPropagation();
2044                ga('send', 'event', 'value access landing page', 'click', 'check box');
2045            });
2046            $(".wpcf7-submit").on(touchClick, function (e) {
2047                window.setTimeout(function () {
2048                    if ($("form").hasClass("invalid")) {
2049                        var firstErrorPos = $(".wpcf7-not-valid").parent().offset().top;
2050                        $("body,html").stop().animate({
2051                            scrollTop: firstErrorPos - 120
2052                        });
2053                    } else {
2054                        ga('send', 'event', 'value access landing page', 'form submit', 'send request');
2055                    }
2056                }, 500);
2057            });
2058            $("#form-request-thank-you a[href='/value-access']").on(touchClick, function (e) {
2059                e.stopPropagation();
2060                ga('send', 'event', 'value access landing page', aInternalLink, 'back');
2061            });
2062            $(".home-cta a[href='https://resources.chiesiusa.com/Cleviprex/CLEVIPREX_US_PI.pdf']").on(touchClick, function (e) {
2063                e.stopPropagation();
2064                ga('send', 'event', 'value access landing page', aDownload, 'prescribing information');
2065            });
2066            $(".home-cta a[href='/']").on(touchClick, function (e) {
2067                e.stopPropagation();
2068                ga('send', 'event', 'value access landing page', aInternalLink, 'visit cleviprex.com');
2069            });
2070            $("#medical a[href='https://www.chiesiusa.com/contact-us/medical-inquiries/']").on(touchClick, function (e) {
2071                e.stopPropagation();
2072                ga('send', 'event', 'value access landing page', aExternalLink, 'chiesiusa.com/contact-us/medical-inquiries');
2073            });
2074            $("#medical a[href='mailto:[email protected]']").on(touchClick, function (e) {
2075                e.stopPropagation();
2076                ga('send', 'event', 'value access landing page', 'click', '[email protected]');
2077            });
2078            $("#contact a[href='tel:1-888-466-6505']").on(touchClick, function (e) {
2079                e.stopPropagation();
2080                ga('send', 'event', 'value access landing page', 'click to call', '1-888-466-6505');
2081            });
2082            $("#contact a[href='mailto:[email protected]']").on(touchClick, function (e) {
2083                e.stopPropagation();
2084                ga('send', 'event', 'value access landing page', 'click', '[email protected]');
2085            });
2086
2087            /*document.addEventListener("wpcf7mailsent", function (e) {
2088                e.preventDefault();
2089                window.location = "/value-access-thank-you";
2090            }, false);*/
2091        }
2092        if ($("body").hasClass("expert-opinions")) {
2093            document.addEventListener("wpcf7mailsent", function (e) {
2094                e.preventDefault();
2095                e.stopPropagation();
2096                $('.form-related-copy').hide();
2097                $('#access-video-info').hide();
2098                setTimeout(function () {
2099                    $('#form-thanks').show();
2100                    $('div.wpcf7-mail-sent-ok').hide();
2101                }, 100);
2102                // $("#access-video-info").html('<h3>Connect with a KOL</h3><p style="margin-bottom: 60px;">If you would like to be connected to a Key Opinion Leader (KOL), please fill out the form below and provide your preferred contact information.</p><h4 style="color: #F65F36; font-size: 22px; line-height: 28px;">Thank you for your request.</h4><p>We will contact you shortly with more information.</p><p>&lt;&nbsp;<a href="/" style="color: inherit; text-decoration: underline;">BACK</a></p>');
2103            }, false);
2104
2105            $('h2.form-related-copy').on(touchClick, function (e) {
2106                $('.form-related-copy').hide();
2107                $('#access-video-info').hide();
2108                setTimeout(function () {
2109                    $('#form-thanks').show();
2110                }, 100);
2111            });
2112            $('#form-thanks p a').on(touchClick, function (e) {
2113                e.preventDefault();
2114                $('#form-thanks').hide();
2115                setTimeout(function () {
2116                    $('.form-related-copy').show();
2117                    $('#access-video-info').show();
2118                }, 100);
2119            })
2120        }
2121
2122        if ($("body").hasClass("peer-insights")) {
2123            addThankYouListener();
2124        }
2125
2126        if ($("body").hasClass("faqs")) {
2127            $('.faqs-question-answer').hide();
2128
2129            $('.faqs-icon').click(function (event) {
2130                $(this).siblings().children('.faqs-question-answer').slideToggle();
2131
2132                if ($(this).text() == "+") {
2133                    $(this).text("-");
2134                    $(this).addClass("faqs-button-minus");
2135                } else {
2136                    $(this).text("+");
2137                    $(this).addClass("faqs-button-minus");
2138                }
2139            });
2140
2141            $('#faqs-toggle').click(function (event) {
2142                
2143                if ($(this).text() == "+") {
2144                    $(this).text("-").addClass("faqs-button-minus");
2145                    $('.faqs-icon').text("-").addClass("faqs-button-minus");
2146                    $('.faqs-question-answer').slideDown();
2147                } else {
2148                    $(this).text("+").removeClass("faqs-button-minus");
2149                    $('.faqs-icon').text("+").removeClass("faqs-button-minus");
2150                    $('.faqs-question-answer').slideUp();
2151                }
2152
2153                if ($('#faqs-toggle-text').text() == "Open all") {
2154                    $('#faqs-toggle-text').text("Close all")
2155                } else {
2156                    $('#faqs-toggle-text').text("Open all")
2157                }
2158
2159            });
2160        }
2161
2162        /*if ($("body").hasClass("videos")) {
2163
2164            $("#user-title").on(touchClick, function(e) {
2165                e.stopPropagation();
2166                ga('send','event','videos','video form','video form title');
2167            });
2168            $("#user-fname").on(touchClick, function(e) {
2169                e.stopPropagation();
2170                ga('send','event','videos','video form','video form first name');
2171            });
2172            $("#user-lname").on(touchClick, function(e) {
2173                e.stopPropagation();
2174                ga('send','event','videos','video form','video form last name');
2175            });
2176            $("#user-email").on(touchClick, function(e) {
2177                e.stopPropagation();
2178                ga('send','event','videos','video form','video form email');
2179            });
2180            $("#user-email").on(touchClick, function(e) {
2181                e.stopPropagation();
2182                ga('send','event','videos','video form','video form email');
2183            });
2184            $(".idpermission-to-contact label").on(touchClick, function(e) {
2185                e.stopPropagation();
2186                ga('send','event','videos','video form','video form - checkbox');
2187            });
2188            $("#permission-contact-copy a").on(touchClick, function(e) {
2189                e.stopPropagation();
2190                ga('send','event','videos',aExternalLink,'video form - privacy policy');
2191            });
2192            $(".wpcf7-submit").on(touchClick, function(e) {
2193
2194                window.setTimeout(function() {
2195                    if ($("form").hasClass("invalid")) {
2196                        var firstErrorPos = $(".wpcf7-not-valid").parent().offset().top;
2197                        $("body,html").stop().animate({
2198                            scrollTop: firstErrorPos - 120
2199                        });
2200                    }
2201                }, 500);
2202
2203            });
2204
2205            if ($(".wpcf7-form").hasClass("sent")) {
2206                ga('send','event','videos','video form','video form - access videos');
2207                localStorage.setItem("videoRegistrationComplete", true);
2208            }
2209
2210            if (localStorage.getItem("videoRegistrationComplete")) {
2211                // swap out form for thank you screen
2212                let contentBlock = $(".videos main .one-column-module .container .row .content-block");
2213                contentBlock.parent().attr("class","col-xs-12 col-sm-8 col-sm-offset-2 text-center success");
2214                let thankYouHTML = "<h2>Thank you for completing the form. Please scroll down to view the videos.</h2>";
2215                $(".videos main .one-column-module .container .row .content-block").html(thankYouHTML);                
2216
2217                // scroll up to top of section
2218                $("body,html").animate({
2219                    scrollTop: contentBlock.offset().top
2220                }, 500);
2221
2222                // remove completed token from localstorage
2223                // grant future access to videos based on localstorage
2224                window.setTimeout(function() {
2225                    localStorage.removeItem("videoRegistrationComplete");
2226                    localStorage.setItem("videoAccess", true);
2227                }, 1000);
2228
2229                // update videos
2230                updateVideosPage();
2231            }
2232
2233            if (localStorage.getItem("videoAccess")) {
2234                $(".videos main .one-column-module").hide();
2235                updateVideosPage();
2236            } else if (getParameterByName("videoAccess") == "true") {
2237                localStorage.setItem("videoAccess", true);
2238
2239                $(".videos main .one-column-module").hide();
2240                updateVideosPage();
2241            }
2242
2243            document.addEventListener("wpcf7mailsent", function (e) {
2244                e.preventDefault();
2245                localStorage.setItem("videoRegistrationComplete", true);
2246                window.location = "/videos";
2247            }, false);
2248        }
2249
2250        function updateVideosPage() {
2251            videoAble = true;
2252            $('.video-container').eq(0).find('img').attr('src', '/wp-content/themes/html5-blank/img/hypertension-poster.jpg');
2253            $('.video-container').eq(1).find('img').attr('src', '/wp-content/themes/html5-blank/img/clinical-trials-poster.jpg');
2254            $('.video-container').eq(2).find('img').attr('src', '/wp-content/themes/html5-blank/img/dosing-cleviprex-poster.jpg');
2255        }*/
2256
2257        if ($("body").hasClass("low-volume-dosing-option") || $("body").hasClass("safety")) {
2258            $('.quartiles-show img, .quartiles-show span').on(touchClick, function (e) {
2259                e.preventDefault();
2260                $('.quartiles').removeClass('show');
2261            });
2262            $('.quartiles-hide img, .quartiles-hide span').on(touchClick, function (e) {
2263                e.preventDefault();
2264                $('.quartiles').addClass('show');
2265            });
2266        }
2267
2268        Tracking.init();
2269    });
2270
2271})(jQuery, this);
2272
2273function formatPhoneNumber(value) {
2274    // if input value is falsy eg if the user deletes the input, then just return
2275    if (!value) return value;
2276
2277    // clean the input for any non-digit values.
2278    const phoneNumber = value.replace(/[^\d]/g, "");
2279
2280    // phoneNumberLength is used to know when to apply our formatting for the phone number
2281    const phoneNumberLength = phoneNumber.length;
2282
2283    // we need to return the value with no formatting if its less then four digits
2284    // this is to avoid weird behavior that occurs if you  format the area code to early
2285    if (phoneNumberLength < 4) return phoneNumber;
2286
2287    // if phoneNumberLength is greater than 4 and less the 7 we start to return
2288    // the formatted number
2289    if (phoneNumberLength < 7) {
2290        return `(${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(3)}`;
2291    }
2292
2293    // finally, if the phoneNumberLength is greater then seven, we add the last
2294    // bit of formatting and return it.
2295    return `(${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(
2296        3,
2297        6
2298    )}-${phoneNumber.slice(6, 9)}`;
2299}
2300
2301function addThankYouListener() {
2302    console.log('setting wpcf7mailsent listener');
2303    document.addEventListener("wpcf7mailsent", function (e) {
2304        e.preventDefault();
2305
2306        console.log('wpcf7mailsent triggered');
2307
2308        if ($("body").hasClass("request-information") == true) {
2309            window.location = "/thank-you";
2310        } else if ($("body").hasClass("resources") == true) {
2311            console.log('Redirecting to /thank-you-kol');
2312            window.location = "/thank-you-kol";
2313        }
2314        
2315    }, false);
2316}
2317
2318// $('#user-fname').keyup(function () { 
2319//     this.value = this.value.replace(/[^a-zA-Z ]/g,'');
2320//     this.value = this.value.replace(/\s/g, '');
2321// });
2322
2323// $('#user-lname').keyup(function () { 
2324//     this.value = this.value.replace(/[^a-zA-Z ]/g,'');
2325//     this.value = this.value.replace(/\s/g, '');
2326// })
2327
2328$(".wpcf7-list-item-label .wpcf7-not-valid-tip").text("Please check the box to enroll.");
2329
2330// Debug events for WP Control Form 7. Comment out when not debugging.
2331
2332document.addEventListener("wpcf7invalid", function (e) {
2333    console.log('wpcf7invalid event triggered');
2334});
2335
2336document.addEventListener("wpcf7spam", function (e) {
2337    console.log('wpcf7spam event triggered');
2338});
2339
2340document.addEventListener("wpcf7mailsent", function (e) {
2341    console.log('wpcf7mailsent event triggered');
2342});
2343
2344document.addEventListener("wpcf7mailfailed", function (e) {
2345    console.log('wpcf7mailfailed event triggered');
2346});
2347
2348document.addEventListener("wpcf7submit", function (e) {
2349    console.log('wpcf7submit event triggered');
2350});

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.