/* Request ID: 6bc0d859a1c1d8e2bd3e0788771a84a6 (05/18/2024 6:21pm) (minifier disabled) (tc1RDoQgDATQq+yfHy52b2SQNtK1FkJRrr/E7BX4nMlMHty+QGsNMqk6vYqx7g7pXoRvatELLUoV8rUJhzXWU2Dtk0LIpNWgRjrJYJe0eQELhXNvP84Ozk5YD1u+9n7BGMcjErp/GgmF/lP0xYXLajpHUtJWH0IqyEkfZ5ppnn4=) */ // ============================================================= // // A11y Skip Links // // ============================================================= ;(function($) { $.fn.addSkipLink = function( linkID, linkName ) { // Get the ID without the hash var linkHash = linkID.replace(/^#/, ''); // Get the site header and footer var $header = $('header.header'); var $footer = $('footer.footer'); // For each destination element $(this).each( function() { var $destination = $(this); // UNCOMMENT TO DEBUG ---------------------------------------------- // if ( !$('#'+linkHash).length && $destination.length ) { // console.log('Adding skip destination to '+$destination.attr('class')); // } // else if ( $('#'+linkHash).length && $destination.length ) { // console.log(linkName+' skip link was already added. Could not add another link to '+$destination.attr('class')); // } // else if ( !$destination.length ) { // console.log('Skip destination does not exist: '+$destination.attr('class')); // } // END DEBUG CODE -------------------------------------------------- // If this skip link hasn't already been added for another element // And if the destination elements exists if ( !$('#'+linkHash).length && $destination.length ) { // Add the skip destination element // (add a new element in case the destination already has an ID) $destination.prepend(''); // Then add a skip link to the page header and footer var skipLink = 'Skip to '+linkName+''; $header.prepend($(skipLink)); $footer.append($(skipLink)); } }); }; // After page load, add skip links pointing to key areas of the page. // Run after load so all elements are already on the page. $(window).on('load', function() { // ------------------------------- // ADD SELECTOR FOR PAGE TOP // ------------------------------- // EXAMPLE: // // $pageTopElement = $('.site-header_logo'); $pageTopElement = $('.header__inner'); // EDIT THIS LINE // This function scrolls to top of page when skip-to-top link is clicked $('body').on('click', 'a[href="#skip-to-top"]', function(e) { e.preventDefault(); window.scrollTo({top: 0, behavior: 'smooth'}); window.setTimeout(function () { $pageTopElement.focus(); }, 1000); }); // ------------------------------- // ADD CUSTOM SKIP LINKS HERE // ------------------------------- // EXAMPLE: // add element(s) to skip to, then pass the link id and the name to show. // the same skip link may point to different elements on different templates. // $('.landing-page-main, .inner-page-main').addSkipLink('#skip-to-main', 'Main Content'); // EDIT THESE LINES: // Skip to main header area on homepage $('#homepage-widgets').addSkipLink('#skip-to-header', 'main content'); // Skip to main content area (inner pages) $('.content').addSkipLink('#skip-to-main', 'main content'); // Skip to group navigation $('.sidebar').addSkipLink('#skip-to-subnav', 'side navigation'); }); })(livewhale.jQuery);(function ($, LW) { var $body = $('body'), $win = $(window); $megamenus = $('.header__menu').find('.lw_section.lw_has_subnav'); function clearFloats() { var $theImage = $('.editable .lw_align_left, .editable .lw_align_right'); if ($theImage.length) { $theImage.each(function () { var $theNextPara = $(this).closest('p').next('p'); if ($theNextPara.html() === ' ') { $theNextPara.addClass('clearfix'); } }); } }; clearFloats(); // Move sidebar content into side navigation on mobile var moveSidebarContentOnMobile = function () { var sidebarContent = $('#sidebar'); if ($(window).width() < 768) { sidebarContent.addClass('mobile'); sidebarContent.insertAfter($('.sidenav__body .nav-aside')); } }; $win.on('resize', function () { moveSidebarContentOnMobile(); }); $win.on('load', function () { moveSidebarContentOnMobile(); }); if ($('h3 > picture.lw_image').length) { $('h3 > span.lw_image_caption').each(function () { $(this).insertAfter(this.closest('h3')); }) $('h3 > picture.lw_image').each(function () { $(this).insertAfter(this.closest('h3')); }); }; $('.nav-utilities > ul > li > ul.lw_subnav').wrap('').show(); /// Megamenu nav on mobile $('').insertAfter(".js-nav .lw_has_subnav > a"); $(".link-arrow-mobile").on("click", function (e) { if ($(window).width() < 1023) { e.preventDefault(); $(this).siblings("div, ul").slideToggle(); $(this).toggleClass("is-active"); $(this).parent().siblings().find('.megamenu').slideUp(); $(this).parent().siblings().find('.link-arrow-mobile').removeClass('is-active'); } }); // information for dropdown on mobile $('.lw_subnav_toggle').on("click", function (e) { if ($(window).width() < 1023) { e.preventDefault(); console.log('separator clicked'); $(this).toggleClass('is-open').parent().find('.nav__dropdown').slideToggle(); } }) $megamenus.each(function () { var $linkTitle = $(this).find('> a').text(); $headText = $('.lw_blurbs_body.megamenu__head-description.' + $linkTitle.split(' ').join('.'))[0]; $thumbnail = $('.megamenu__image-wrapper.' + $linkTitle.split(' ').join('.'))[0]; $(this).find('> ul.lw_subnav').wrap('
').show(); // $(this).find('li.lw_is_parent.lw_has_subnav .lw_subnav').show(); $(this).find('div.megamenu__content').prepend('

' + $linkTitle + '

'); $(this).find('div.megamenu__head').append($headText); $(this).find('div.megamenu').append($thumbnail); }); // Feb 2024: main nav a11y $('.js-header .lw_has_subnav').on('mouseover', function() { $(this).addClass('is-open'); }); $('.js-header .lw_has_subnav').on('mouseout', function() { $(this).removeClass('is-open'); }); $('.js-header a').on('focus', function() { // anytime a nav link is focused, check for megamenu/dropdown var $current = $(this).parents('.lw_has_subnav'); if (!$current.hasClass('closed')) { // skip if manually closed via Escape $current.addClass('is-open opening'); // show the parent subnav of this link $('.js-header .lw_has_subnav.is-open').not('.opening').removeClass('is-open'); // hide all other subnavs $current.removeClass('opening'); // remove temporary class } }); $('.js-header').on('keydown', 'a', function(e) { switch (e.which) { case 27: // Escape key pressed - close dropdown var $current = $(this).parents('.lw_has_subnav.is-open'); if ($current.length) { $current.addClass('closed').removeClass('is-open'); $current.find('div.nav__dropdown, div.megamenu').find('a, button').attr('tabindex',-1); // make child links not tabbable $current.find('> a').trigger('focus'); // move focus to top-level link } break; } }); if ($('a[id]').length) { $('a[id]').each(function () { $myID = "#" + $(this).attr('id'); $(this).attr('href', $myID).attr('data-id', $myID).attr('class', 'anchor-link'); }); } var $copyTitle = $('div.edit-title'); if ($copyTitle.length) { $copyTitle.each(function () { $theTitle = $(this).find('.js-edit-title').html(); $(this).parent().find('.js-copy-title-here').html($theTitle); }); } if ($('body.program-landing').length) { var $programHeader = $('#sub-content h2'); $programHeader.each(function () { var $itemID = "#" + Math.random().toString(36).substring(2, 7); $(this).attr('data-id', $itemID); var $buttonText = $(this).text(); $('body').find('.section-content-slider .section__actions').append('' + $buttonText + ''); }); } var $button = $('.btn'); if ($button.length) { $button.each(function () { if ($(this).children('span:not([class])').length) { } else { $(this).wrapInner(''); }; }); } // Make sidenav expanding link functioning and accessible if ($(window).width() < 1023) { $(".sidenav__head").attr('role', 'button').attr('aria-expanded', 'false'); } $(".sidenav__head").on("click", function (e) { if ($(window).width() < 1023) { e.preventDefault(); // prevent link click from happening e.stopPropagation(); // prevent duplicate clicks from registering if ($(this).attr('aria-expanded') === "true") { // toggle aria-expanded $(this).attr('aria-expanded', 'false'); } else { $(this).attr('aria-expanded', 'true'); } $(this).toggleClass("is-open").siblings(".sidenav__body").slideToggle(); // show/hide subnav } }); // 5 questions widget expanding $(document).ready(function () { if ($('.section__btn.js-expand-trigger').length) { $(".section__btn.js-expand-trigger").on("click", function () { $(this).hide().parent().addClass("is-expand"); }); } }) // multiple sliders controls var $sliders = $('.slider-images-alt'); // if ($sliders.length) { // console.log($sliders); // $sliders.each(function () { // console.log($(this).index()); // let newClass = 'slider-images-alt-' + $(this).index(); // newNext = 'slider__next-' + $(this).index(); // newPrev = 'slider__prev-' + $(this).index(); // $(this).addClass(newClass).removeClass('slider-images-alt'); // $(this).find('button.slider__next').addClass(newNext).removeClass('slider__next'); // }) // } // remove duplicate related content, hide if empty if ($('body.details_profiles').length) { $('div.related_content .lw_related_files').remove(); $('div.related_content .lw_related_profile').remove(); // remove publications if (!$('div.related_content li').length) { // if they were all files $('div.related_content').remove(); // remove the parent } } })(livewhale.jQuery, livewhale);(function($, livewhale, undefined) { var $win = $(window), $body = $('body'); // ALL FILTER DROPDOWNS // ---------------------------------------------------------------- var initFilters = function() { // console.log('initFilters'); var $filters = $('.filter'); if ( $filters.length ) { var $dropdowns = $filters.find('.filter-dropdown'); // toggle filter dropdowns on click or keypress $body.on('click keydown', '.filter .filter-label', function(e) { // e.preventDefault(); var $this = $(this), $thisFilter = $this.closest('.filter'), $thisDropdown = $thisFilter.find('.filter-dropdown'), $thisFilterButton = $thisFilter.find('.filter-label'); // if clicking or pressing return key if ( e.type == 'click' || e.type == 'keydown' && e.which == 13 ) { // when the dropdown is collapsed if ( !$thisDropdown.is(':visible') ) { // close other dropdowns $filters.not($thisFilter).removeClass('is-active'); $dropdowns.not($thisDropdown).slideUp(0); // open this dropdown if closed $thisDropdown.slideDown(200); $thisFilter.addClass('is-active'); $thisFilterButton.attr("aria-expanded", true); // move focus to the first selected option, otherwise to the first option (check if online events checkbox) var $selectedOptions = $thisDropdown.find('.filter-option').find('input:checked'); var $focusedOption; if($selectedOptions.length) { $focusedOption = $selectedOptions.first() } else if( $thisDropdown.find(":first-child").attr("id") == "lw_cal_online_selector"){ $focusedOption = $thisDropdown.find("#lw_cal_online_selector input"); } else { $focusedOption = $thisDropdown.find('.filter-option').find('input, a').first(); } $focusedOption.focus(); } else { // when the dropdown is expanded, close it $thisDropdown.slideUp(100); $thisFilter.removeClass('is-active') $thisFilterButton.attr("aria-expanded", false); } } }); $body.on('click touchstart keydown', function(e) { // close all dropdowns if clicking/keypressing elsewhere if ( !$filters.is(e.target) && $filters.has(e.target).length === 0 ) { $filters.removeClass('is-active'); $dropdowns.slideUp(0); } // close all dropdowns if pressing escape while focused inside dropdown if ( ( $filters.is(e.target) || $filters.has(e.target).length ) && e.which == 27 ) { $filters.removeClass('is-active'); $dropdowns.slideUp(0); $(e.target).closest('.filter').find('.filter-label').focus(); // move focus back to label } }); // when tabbing on a collapsed dropdown, close expanded dropdowns $body.on('keyup', '.filter .filter-label', function(e) { var $this = $(this), $thisFilter = $this.closest('.filter'), $thisDropdown = $thisFilter.find('.filter-dropdown'); if ( !$thisDropdown.is(':visible') && e.which == 9 ) { $filters.removeClass('is-active'); $dropdowns.slideUp(0); } }); } // show the number of selected filters next to the filter title var countFilters = function() { // do not count filters for the date range selector $filters.not('#lw_cal_date_range_selector').each(function(){ var $thisFilter = $(this); var $titles = $thisFilter.find('.filter-title'); var $origTitle = $titles.not('.is-active'); var $activeTitle = $titles.filter('.is-active'); var numSelected = $thisFilter.find('.filter-dropdown').find('input:checked').length; // if filters are selected if ( numSelected > 0 ) { // hide original title $origTitle.hide(); if ( !$activeTitle.length ) { // if there is no active title, replace original title with new title text // remove "All" from start of title and capitalize first letter var newTitleText = $origTitle.text().replace('All ', ''); newTitleText = newTitleText.charAt(0).toUpperCase() + newTitleText.slice(1); $origTitle.before(''+newTitleText+' ('+numSelected+')'); } else { // if active title already exists, show it and update the number var updatedText = $activeTitle.text().replace(/\(.*?\)/, '('+numSelected+')'); $activeTitle.show().text(updatedText); } } else { // otherwise reinstate original title if no filters are selected $activeTitle.hide(); $origTitle.show(); } }); }; // Count selected filters on initial load countFilters(); // Count selected filters when the calendar loads new view data $body.bind('calLoad.lwcal', function(e, controller, data) { // wait before counting filters, in case clear filters button is clicked // in which case calendar view is loaded and then checkboxes are unchecked setTimeout(function(){ countFilters(); }, 300); }); }; $body.bind('calInit.lwcal', function(e, controller, data) { initFilters(); }); }(livewhale.jQuery, livewhale));(function($, LW) { var $body = $('body'), $win = $(window); // Tabs JS for transforming accordion var initPennNursingAccordions = function() { var $accordion = $('div.lw_accordion'); if ($accordion.length) { var $accordionItem = $('.lw_accordion_block'); $accordionItem.each(function() { if ($(this).hasClass('lw_accordion_block_processed')) { return true; // skip if already processed } var $buttonText = $(this).find('> h4 > button').text(); $(this).find('> h4 > button').wrapInner(''); $(this).find('> h4 > button').attr('data-id',$buttonText); $(this).find('.lw_accordion_block_content').wrapInner('
'); $('').insertAfter($(this).find('button > span')); $(this).addClass('lw_accordion_block_processed'); }); } } initPennNursingAccordions(); $('body').on('randomize.lw paginate.lw', function(e, el){ // code here applies after widgets have been randomized or paginated initPennNursingAccordions(); if ($('.lw_widget_randomized .lw_accordion').length) { $('.lw_widget_randomized .lw_accordion').lw_accordion(); }; }); $('body').on('stopEdit.lw', function(e) { // code here runs after a page has been edited and saved initPennNursingAccordions(); }); // Accordion tables (legacy from old site) var initAccordions = function() { var $accordion = $('.accordion-table'); // For each accordion $accordion.each( function() { // Find odd rows in this table (not nested tables) var $contentRows = $(this).children('tbody').children('tr:odd'); // For each content row $contentRows.each ( function() { var $this = $(this); // Once all images have loaded $this.imagesLoaded().done(function() { // Store section height in a data attribute then collapse each section // (Safari has issues finding height after max height has already been set) $this.attr('data-height', $this.outerHeight()).css({'max-height':'0', 'display':'block'}); }); }); }); // Open each section on click $body.on('click', '.accordion-table > tbody > tr:even', function() { // Table remains expanded in the page editor, prevents accordion classes getting saved by editor. if ( !$body.hasClass('lw_editor_on') ) { var $title = $(this); $content = $(this).next('tr'), $table = $title.parents('.accordion-table'); // Uncomment to only open one section at a time // $table.find('tr').filter(':even').not($title).removeClass('is-active'); // $table.find('tr').filter(':odd').not($content).css('max-height', '0'); // Toggle clicked title $title.toggleClass('is-active'); // Toggle content if ( $content.css('max-height') == '0px' ) { // Max-height must transition from zero height to a specific content height for slide-down effect $content.css('max-height', $content.data('height')); } else { $content.css('max-height', '0'); } } }); // Load Academics page accordion with first item open if ( $body.hasClass('body_academics') && $body.hasClass('landing-page') && !$body.hasClass('lw_editor_on') ){ $('.accordion-table').find('tr:first-child').trigger('click'); } }; initAccordions(); })(livewhale.jQuery, livewhale); /* Resource ID: 5bc073cb90b1cfb563f9727c758 ('+e+') */ /* Resource not found (). */