' + disclaimer + '
// Scripts.js - v1.47 /* 1.47 - Updated * on external links to only apply on blog pages not included in the exempt list for initBlogDisclaimer 1.46 - Added Manulife Wealth blog discliamer 1.45 - initBlogDisclaimer will now add * to external blogs and open in new tab 1.44 - Fixed issue with changing swiper container 1.43 - Fixed Services slideshow using Swiper9 1.42 - Fixed space in slideshow classes for Swiper 9 1.41 - Fixed alt tags in Swiper Carousel 1.40 - Updated to Swiper 9 - Fixed multiple headers in carousel 1.39 - Corrected issue with blog disclaimers not being translated on french pages 1.38.1 - Fixed bug with initParallax not affecting hero images 1.38 - initMoveBelow() no longer requires moveBelow class - Added initParallax(affactHeroImages:bool) 1.37.2 - initSwiperCarousel - moved hideDefault to after the carousle is made to fix overlay not showing 1.37.1 - initSwiperSlideshow has been updated to support Swiper v7 as well 1.37 - initSwiperCarousel will now add chevron's to all slides if the one on the home is present - Supports Swiper v7 1.36.1 - Re-add scroll-down click event to initSwiperCarousel 1.36 - initSwiperCarousel will wait before creating - allows titles to stay showing 1.35 - initMembersOverlayURL() will now work on Iris Framework as well 1.34.1 - initSwiperCarousel will now move .scroll-down on top of the carousel 1.34 - initFrenchBlog() now only translates blog pages 1.33 - Added adjustAlternateBackgrounds 1.32.1 - Fixes issue with Pagination not being defined in Swiper Slideshow 1.32 - waitForLoad no longer uses JQuery 1.31 - Added initSwiperCarousel(options) - Added initSwiperSlideshow(options) 1.30 - Fixed newly introduced error in initBlogDisclaimer 1.29 - Updated initBlogDisclaimer([Pages_To_Ignore]) to also hide disclaimer on posts if told to 1.28 - initRemoveBlogColumns sets blogs to visible(Fresnel hides them for some reason) - Re-adds sorted posts to propper post wrapper 1.27 - added initServiceCarouselAutoH() 1.26.3 - initRemoveBlogColumns will use ID or class 1.26.2 - initRemoveBlogColumns(waitForBlogsToLoad) Will default to true if no params given 1.26.1 - initRemoveBlogColumns will clone and replace it's self to remove any resize events 1.26 - Added WaitForBlogs() and fixed up initRemoveBlogColumns() 1.25.3 - Fixed error with carousel if no valid container found 1.25.2 - Re-added selectorStyle to carousel 1.25.1 - Fixed carousel's overlay being onop when not using rotating text 1.25 - Added pause button to carousel 1.24.1 - Fixed issue with calculators if not one of our .calculator divs 1.24 - Added initServiceCarousel() 1.23 - Updated initCalculators to use custom formulas 1.22-1.22.1 - Fixed initQuickScroll 1.21 - initBannerPush only affects the home divider now instead of all dividers 1.20 - initQuickScroll now applies to sub navigation links 1.19 - Added option to not have disclaimer on specific pages - Fixed initBannerPush using false for homepage/regular page 1.18 - Updated initCarousel to support options object 1.17.2 - Blog Disclaimers no longer added to Client Login Page 1.17.1 - Updated Disclaimers 1.17 - Fixed banner push 1.16 - Added initFrenchBlog() 1.15 - Corrected adjustIrisScroll() 1.14 - initSmallerOverlay only wraps if not wrapped 1.13 - initExternalBlogDisclaimer() -> initBlogDisclaimer(); 1.12 - Fix to closing brackets 1.11 - Added initSmallerOverlay() - Added initFormDataSwitch() - Added adjustMembersListWidth() - Added adjustMembersOverlayWidth() - Added adjustIrisScroll() 1.10 - Corrected initMoveBelow to only trigger when not in edit mode 1.9 - Added option to define just alignment in initCarousel per item 1.8 - Fixed initMoveBelow 1.7 - initQuickScroll now applies to main navigation links as well 1.6 - Added option to define just alignment in initCarousel */ // INITIALIZE TABBED SERVICES ICON CAROUSEL WITH AUTOHEIGHT ADJUSTMENT function initServiceCarouselAutoH() { if (!window.suppress) { var owl = $('.services-carousel-auto-height').owlCarousel({ items: 1, loop: true, autoplay: false, autoplayTimeout: 10000, dotsSpeed: 300, dotsData: true, dotsContainer: '.tabbed-icon-nav-container', autoHeight:true, smartSpeed: 700 }); } } // INITIALIZE TABBED ICON CAROUSEL function initServiceCarousel() { if (!window.suppress) { console.log('services carousels'); var owl = $('.services-carousel').owlCarousel({ items: 1, loop: true, autoplay: false, autoplayTimeout: 10000, dotsSpeed: 300, dotsData: true, dotsContainer: '.tabbed-icon-nav-container' }); } } function waitForJQuery(callback) { var checkLoop = setInterval(function() { if (typeof $ !== 'undefined') { clearInterval(checkLoop); callback(); } }); } function waitForLoad(callback) { var checkLoop = setInterval(function() { if (document.querySelector('html').classList.contains("is-loaded")) { clearInterval(checkLoop); callback(); } }); } function waitForBlogs(callback){ var checkLoop = setInterval(function() { if ($('.posts-list').find(".loading").length != 1) { clearInterval(checkLoop); callback(); } }); } function initFormDataSwitch() { $("[data-formswitch]").each(function() { $($(this).data("formswitch")).hide(); }); $("[data-formswitch]").parent().on('change', function() { var selected = $(this).find("option:selected"); var target = $($(this).find("option[data-formswitch]").data("formswitch")); if (selected.data("formswitch")) target.show(); else target.hide(); }); } function initHiddenRecaptcha() { $(".form-item.is-recaptcha").hide(); $("form").on("change", function() { $(this).find(".form-item.is-recaptcha").show(); }); } function updateShareLinks() { $(".share-links li a").each(function() { $(this).addClass("btn secondary"); }); } function initSmallerOverlay() { $(".overlay-content").each(function() { $(this).addClass("smaller"); if ($(this).find(".overlay-content-inner").length <= 0) $(this).wrapInner('
'); }); $(".overlay-content").off().on('click', function(event) { if (event.target == this) { $(this).find(".close-overlay").click(); } }); } function initBannerPush(homePage, regularPage) { if (homePage == undefined || homePage == null) homePage = true; if (regularPage == undefined || regularPage == null) regularPage = true; if (homePage) $(".divider.home-divider, .page-bg.full-screen").addClass("pushedBanner"); if (regularPage) $(".page-bg:not(.full-screen)").addClass("pushedBanner"); pushBannerImage(); $(window).on('resize', function() { pushBannerImage(); }); function pushBannerImage() { $(".pushedBanner").css({ "margin-top": $("#header").outerHeight() + "px" }); } } var wasTransparent = true; function updateOnTransparent(transparent, notTransparent) { transparent(); $(document).on("scroll", function() { checkLogo(); }); checkLogo(); function checkLogo() { setTimeout(function() { if (!wasTransparent && $(".transparent-header").length >= 1) { transparent(); wasTransparent = true; } else if (wasTransparent && $(".transparent-header").length == 0) { notTransparent(); wasTransparent = false; } }, 1); } } function initBlogDisclaimer(notPages) { var notOnPage = ":not(.client-login)"; var isManulifeWealth = document.querySelector("footer img[src*=Manulife_Wealth]") != null if(notPages){ if(typeof notPages == "string") notPages = [notPages]; notPages.forEach(item => { notOnPage+=":not(."+item+")"; }); } var disclaimer = '' if(isManulifeWealth) disclaimer = '* This article link will open in a new internet browser tab.' + disclaimer + '
' + disclaimer + '