'use strict'; function downloadPdfApplication(data, id, option, site) { var j = void 0; var i = void 0; var fid = void 0; var cid = void 0; var ls = void 0; var fs = void 0; var fill = void 0; var d = void 0; var path = void 0; var file = void 0; var pdfNumtool = void 0; for (j = 0; j <= data.length; j++) { if (data[j].checked === true) { if (site === 'OF') { i = j + 1; fid = document.getElementById('fid' + id + i).value; cid = document.getElementById('cid' + id + i).value; fs = document.getElementById('fs' + id + i).value; ls = document.getElementById('ls' + id + i).value; fill = document.getElementById('fill' + id + i).value; d = document.getElementById('d' + id).value; path = document.getElementById('path' + id + i).value; } else { fid = document.getElementById('fid' + id).value; cid = document.getElementById('cid' + id).value; fs = document.getElementById('fs' + id).value; ls = document.getElementById('ls' + id).value; fill = document.getElementById('fill' + id).value; d = document.getElementById('d' + id).value; path = document.getElementById('path' + id).value; } file = d + '.pdf'; pdfNumtool = document.getElementById('pdfNumtool').value; if (option === 'true') { file = '1.pdf'; document.downloadAccApp.action = pdfNumtool + '?fid=' + fid + '&cid=' + cid + '&fs=' + fs + '&ls=' + ls + '&fill=1&d=1' + '&path=' + path + file; } else { document.downloadAccApp.action = pdfNumtool + '?fid=' + fid + '&cid=' + cid + '&fs=' + fs + '&ls=' + ls + '&fill=' + fill + '&d=' + d + '&path=' + path + file; } document.downloadAccApp.submit(); break; } } } $(document).ready(function () { $('form input[type="radio"]').each(function () { if ($(this).attr('data-hack') === 'checked') { $(this).attr('checked', true); } }); }); 'use strict'; (function ($, document, window) { var componentName = 'backToTop'; var defaults = { offset: '300', duration: '300' }; function Component(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = componentName; this.btnTopScroll = $(this.element).find('.back-to-top'); this.init(); } Component.prototype = { init: function init() { var _this = this; this.btnTopScroll.click(function (event) { event.preventDefault(); _this.scroll(_this._defaults.duration); return false; }); $(window).scroll(function () { if ($(window).scrollTop() > _this._defaults.offset) { $('.back-to-top').fadeIn(_this._defaults.duration); } else { $('.back-to-top').fadeOut(_this._defaults.duration); } }); }, scroll: function scroll(duration) { $('html, body').animate({ scrollTop: 0 }, duration); } }; $.fn[componentName] = function (options) { return this.each(function () { if (!$.data(this, 'component_' + componentName)) { $.data(this, 'component_' + componentName, new Component(this, options)); } else { $.data(this, 'component_' + componentName).scroll(); } }); }; })(jQuery, document, window); 'use strict'; (function ($) { function _getActiveSlideTitle() { var slideTitle = $('[data-fti-component="carousel"]').find($('#ft-carousel')).find($('.item.active'))[0].attributes['slide-title'].value; return slideTitle; } function _getSlidesNames() { var slides = $('[data-fti-component="carousel"]').find($('#ft-carousel')).find($('.item')); var slideNames = []; for (var i = 0; i < slides.length; i++) { var slide = slides[i]; slideNames.push(slide.attributes['slide-title'].value); } return slideNames; } function _getActiveSlideNR(activeSlide, slidesNames) { if (!activeSlide || !slidesNames) return; var counter = 0; var activeNR = 0; for (var i = 0; i < slidesNames.length; i++) { var slide = slidesNames[i]; if (slide === activeSlide) { activeNR = counter; } counter++; } return activeNR; } $.fn.carouselNav = function (direction) { if (!direction) return; var activeSlide = _getActiveSlideTitle(); var slideNames = _getSlidesNames(); var activeSlideNR = _getActiveSlideNR(activeSlide, slideNames); var newSlideNR = void 0; if (direction === 'left') newSlideNR = activeSlideNR - 1; if (direction === 'right') newSlideNR = activeSlideNR + 1; $(this).setNewTitleAndNav(newSlideNR, slideNames); }; $.fn.setNewTitleAndNav = function (slideNR, slideNames) { if (!slideNames) slideNames = _getSlidesNames(); var newSlideNR = parseInt(slideNR, 10); var nrOfSlides = slideNames.length - 1; var nextSlide = parseInt(slideNR, 10) + 1; var prevSlide = parseInt(slideNR, 10) - 1; if (prevSlide < 0) prevSlide = nrOfSlides; if (newSlideNR < 0) { newSlideNR = nrOfSlides; prevSlide--; } if (nextSlide > nrOfSlides) nextSlide = 0; if (newSlideNR > nrOfSlides) { newSlideNR = 0; nextSlide++; } $('#ft-carousel-header').text(slideNames[newSlideNR]); $('#carouselLeft').find('span').text(slideNames[prevSlide]); $('#carouselRight').find('span').text(slideNames[nextSlide]); }; })(jQuery); (function ($) { $.fn.removeActiveFromOWL = function () { $('li.owl-item.active').removeClass('active'); return; }; $.fn.removeActiveFromRole = function () { var presentationTab = $('li.owl-item').find($('[role="presentation"]')); presentationTab.removeClass('active'); return; }; $.fn.tabDirectionMove = function (owlTabbedOBJ, direction) { var activeTab = owlTabbedOBJ.find('.owl-tab.active'); var activeTabName = activeTab.find('a')[0].getAttribute('aria-controls'); var activeTabNR = activeTabName.substring(activeTabName.length - 1); var tabOperator = 1; if (direction === 'prev') tabOperator = -1; var directTabName = activeTabName.substring(0, activeTabName.length - 1) + (parseInt(activeTabNR, 10) + parseInt(tabOperator, 10)); var directTab = owlTabbedOBJ.find('[aria-controls="' + directTabName + '"]'); return directTab; }; })(jQuery); $(function () { $('#carouselLeft').click(function () { $(this).carouselNav('left'); }); $('#carouselRight').click(function () { $(this).carouselNav('right'); }); $('[data-target="#ft-carousel"]').click(function () { if (typeof this.attributes['data-slide-to'] !== 'undefined') { var card = this.attributes['data-slide-to'].value; $(this).setNewTitleAndNav(card); } }); $('#carousel-announcements').owlCarousel({ loop: false, margin: 0, responsiveClass: true, navElement: 'i class="ft-icon ft-icon-right-carrot"', navText: '', responsive: { 0: { items: 1, dots: true, nav: false }, 768: { items: 2, dots: false, nav: true }, 992: { items: 3, dots: false, nav: true }, 1200: { items: 4, dots: false, nav: true } } }); $('[data-fti-component="carousel"]').setNewTitleAndNav('0'); }); $(function () { $('#carousel-announcements-tabbed').owlCarousel({ loop: false, margin: 0, responsiveClass: true, navElement: 'i class="tabbed ft-icon ft-icon-right-carrot"', navText: ['', ''], itemElement: 'li', touchDrag: false, mouseDrag: false, responsive: { 0: { items: 1, dots: true, nav: false }, 768: { items: 2, dots: false, nav: true }, 992: { items: 4, dots: false, nav: true }, 1200: { items: 4, dots: false, nav: true } }, onInitialized: rmActive, onResized: function onResized() { rmActive; $('#carousel-announcements-tabbed').trigger('to.owl.carousel', 0); $('#carousel-announcements-tabbed').find('[aria-controls="tabs-content-1"]').trigger('click'); } }); function rmActive() { $('#carousel-announcements-tabbed').removeActiveFromOWL(); } $('.owl-next').click(function () { var owlTabbed = $('#carousel-announcements-tabbed'); owlTabbed.removeActiveFromOWL(); var nextTab = owlTabbed.tabDirectionMove(owlTabbed, 'next'); nextTab.trigger('click'); }); $('.owl-prev').click(function () { var owlTabbed = $('#carousel-announcements-tabbed'); owlTabbed.removeActiveFromOWL(); var prevTab = owlTabbed.tabDirectionMove(owlTabbed, 'prev'); prevTab.trigger('click'); }); $('li.owl-item').find($('[role="presentation"]')).find($('a')).click(function () { $(this).removeActiveFromRole(); }); $('#carousel-announcements-tabbed').find('.owl-dots').click(function () { var owlTabbed = $('#carousel-announcements-tabbed'); var activatedTab = owlTabbed.find('.owl-item.active'); var activatedTabLink = activatedTab.find('a'); activatedTabLink.trigger('click'); }); }); 'use strict'; (function ($, document) { var componentName = 'leavingSite'; var defaults = { leavingSiteText: 'Clicking OK below will take you to an independent site. Information and services provided on this independent site are not reviewed by, guaranteed by, or endorsed by Franklin Templeton or its affiliates. Please keep in mind that this independent site\'s terms and conditions, privacy and security policies, or other legal information may be different from those of Franklin Templeton\'s site. Franklin Templeton is not liable for any direct or indirect technical or system issues, consequences, or damages arising from your use of this independent website.', leavingSiteOk: 'OK', leavingSiteCancel: 'Cancel' }; function Component(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = componentName; this.btnaExternalLink = $(this.element); this.init(); } Component.prototype = { init: function init() { this.btnaExternalLink.click(function (e) { e.preventDefault(); $('ft-modal')[0].au.controller.viewModel.externalopen(e.currentTarget.href, true); }); } }; $.fn[componentName] = function (options) { return this.each(function () { if (!$.data(this, 'component_' + componentName)) { $.data(this, 'component_' + componentName, new Component(this, options)); } }); }; })(jQuery, document); 'use strict'; (function ($) { var componentName = 'header'; var defaults = {}; function Component(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = componentName; this.navTitles = $('#mega').find('.title'); this.init(); } function isMobile() { return $('#navbar-hamburger').is(':visible'); } Component.prototype = { init: function init() { var _self = this; $('ul.nav li.dropdown').on('click touch', function () { if (!$(this).hasClass('open') && !isMobile()) { $(this).addClass('currentlyHovering'); if ($('#mega').find('li.open').length === 0) { $(this).queue(function () { if ($(this).hasClass('currentlyHovering') && !isMobile()) { $(this).find('.dropdown-toggle').attr('aria-expanded', 'true'); $(this).addClass('open').dequeue(); if ($(this).hasClass('search')) { $(this).find('input').focus(); } } else { $(this).dequeue(); } }); } else { if ($(this).hasClass('currentlyHovering') && !isMobile()) { $(this).find('.dropdown-toggle').attr('aria-expanded', 'true'); $('#mega').find('li.open').removeClass('open'); $(this).addClass('open').dequeue(); if ($(this).hasClass('search')) { $(this).find('input').focus(); } } } } }, function () { $(this).removeClass('currentlyHovering'); $(this).delay(250).queue(function () { if (!$(this).is(':hover') && !isMobile()) { $(this).removeClass('open').dequeue(); $(this).find('.dropdown-toggle').attr('aria-expanded', 'false'); } else { $(this).dequeue(); } }); }); $('#slide-nav.navbar').after($('')); var toggler = '.navbar-toggle'; var pagewrapper = '#page-content'; var navigationwrapper = '.navbar-header'; var slidewidth = '85%'; var menuneg = '-100%'; var slideneg = '-85%'; $('#slide-nav').on('click', toggler, function () { var selected = $(this).hasClass('offcanvas-active'); $('#navbar-close').toggleClass('hidden'); $('#navbar-hamburger').toggleClass('hidden'); $('#offcanvas-menu').stop().animate({ left: selected ? menuneg : '0px' }); $('#navbar-height-col').stop().animate({ left: selected ? slideneg : '0px' }); $(pagewrapper).stop().animate({ left: selected ? '0px' : slidewidth }); $(navigationwrapper).stop().animate({ left: selected ? '0px' : slidewidth }); $(this).toggleClass('offcanvas-active', !selected); $('#offcanvas-menu').toggleClass('offcanvas-active'); $('#page-content, .navbar, body, .navbar-header').toggleClass('offcanvas-active'); }); $('form[data-fti-element=sign-in-form]').on('submit', function (e) { var _form = this; e.preventDefault(); var postData = $(_form).serialize(); $.ajax({ type: 'POST', url: '/api/account/prelogin', data: postData, dataType: 'json' }).done(function (e2, data) { if (e2.location) { window.location = e2.location; } else { $(_form).attr('action', e2.loginUrl); $(_form).off('submit'); $(_form).find('input[name="rememberMe"]')[0].value = postData.indexOf('_rememberMe=on') > -1; $(_form).submit(); } }); }); var selected = '#slidemenu, #page-content, body, .navbar, .navbar-header'; _self.setToggleCollapse(); _self.resizeHandler(selected); _self.initTooltip(); }, setToggleCollapse: function setToggleCollapse() { var _self = this; if (isMobile()) { _self.navTitles.data('toggle', 'collapse'); _self.navTitles.on('click', function (e) { var el = $(e.target); while (!el.is('a')) { el = el.parent(); } el.next('.collapse').collapse('toggle'); el.attr('aria-expanded', function (i, attr) { return attr === 'true' ? 'false' : 'true'; }); el.parent('.dropdown').toggleClass('open'); e.stopPropagation(); e.preventDefault(); }); } else { _self.navTitles.data('toggle', 'disabled'); _self.navTitles.off('click'); } }, resizeHandler: function resizeHandler(selected) { var _self = this; $(window).on('resize', function () { if (!isMobile() && $('.navbar-toggle').is(':hidden')) { $(selected).removeClass('offcanvas-active'); } _self.setToggleCollapse(); }); }, initTooltip: function initTooltip() { $('[data-toggle="tooltip"]').tooltip(); } }; $.fn[componentName] = function (options) { return this.each(function () { if (!$.data(this, 'component_' + componentName)) { $.data(this, 'component_' + componentName, new Component(this, options)); } }); }; })(jQuery); 'use strict'; $(function () { $('*[data-fti-module="header"]').header(); $('*[data-fti-module="back-to-top"]').backToTop(); $('*[data-fti-module="rich_text"]').rich_text(); $('*[data-fti-component="tabs"]').tabs(); $('*[data-fti-component="rich-text"][data-fti-module="tabs"]').tabs(); $('a.external-link').each(function () { $(this).leavingSite(); }); $('[data-toggle="popover"]').popover(); $('[data-toggle="tooltip"]').tooltip(); $('body').on('click', '.popover .close', function () { $(this).parents('.popover').popover('hide'); }); }); 'use strict'; (function ($, window, document) { var componentName = 'rich_text'; function Component(element, options) { this.element = element; this.options = options; this._name = componentName; this.init(); } Component.prototype = { init: function init() { var _this = this; $('.collapseAll', this.element).on('click', function () { $('.panel-collapse.in', _this.element).collapse('hide'); }); $('.expandAll', this.element).on('click', function () { $('.panel-collapse:not(".in")', _this.element).collapse('show'); }); } }; $.fn[componentName] = function (options) { return this.each(function () { if (!$.data(this, 'component_' + componentName)) { $.data(this, 'component_' + componentName, new Component(this, options)); } else { $.data(this, 'component_' + componentName).init(); } }); }; })(jQuery, window, document); 'use strict'; (function ($) { var componentName = 'tabs'; var defaults = {}; function Component(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = componentName; this.navCollapse = $(this.element).find('.navbar-collapse'); this.navTabLinks = $(this.element).find('.nav-tabs-top-level, .nav.nav-pills.nav-stacked').find('a'); this.tabContent = $(this.element).find('.tab-content'); this.headerTextContainer = $(this.element).find('.mobile-menu + span'); this.init(); } Component.prototype = { init: function init() { var _this = this; this.setHeaderText(); if (this.navCollapse.find('ul').hasClass('nav-stacked--no-panel')) { this.adjustContentHeight(); $(window).on('resize', function () { _this.adjustContentHeight(); }); } }, setHeaderText: function setHeaderText() { var _self = this; this.navTabLinks.on('click', function (e) { var elParent = $(this).parent('li'); var headerText = $(this).text(); _self.headerTextContainer.text(headerText); elParent.siblings().removeClass('hidden-xs'); elParent.addClass('hidden-xs'); _self.navCollapse.collapse('hide'); }); }, adjustContentHeight: function adjustContentHeight() { if (this.headerTextContainer.is(':visible')) { $(this.tabContent).css('min-height', 'auto'); } else { var navTabsHeight = this.navCollapse.height(); var bottomMargin = 5; $(this.tabContent).css('min-height', navTabsHeight - bottomMargin); } } }; $.fn[componentName] = function (options) { return this.each(function () { if (!$.data(this, 'component_' + componentName)) { $.data(this, 'component_' + componentName, new Component(this, options)); } }); }; })(jQuery); //# sourceMappingURL=livesite-modules.js.map