'); $(".mmg-controls", props.element).prepend($(".mmg-control.next", props.element)).prepend($(".mmg-control.play-pause", props.element)).prepend($(".mmg-control.back", props.element)); $(".mmg-slide", props.element).each(function() { if($(".mmg-description .mmg-description-links", this).length) { if($(".mmg-description .mmg-description-links .mmg-description-link", this).length == 2) { $('|').insertAfter($(".mmg-description .mmg-description-links .mmg-description-link:first-child", this)); } } }); addMobileLinkDivider(props.element); $("#sw-content-container10.ui-hp").addClass("loaded"); }, "onWindowResize": function(props) { // props.element, props.mmgRecords addMobileLinkDivider(props.element); } }); function addMobileLinkDivider(element) { if(_this.GetBreakPoint() != "desktop") { $('|').insertBefore($(".mmg-description-outer .mmg-description .mmg-description-links .mmg-description-link:nth-child(2)", element)); } } } }, "CheckSlideshow": function() { // FOR SCOPE var _this = this; if($(".hp").length && this.GetBreakPoint() != "desktop") { if ($(window).scrollTop() <= $("#hp-slideshow ").offset().top + $("#hp-slideshow .ui-widget.app.multimedia-gallery").height()) { if(this.SlideshowDescFixed) { $("#hp-slideshow .ui-widget.app.multimedia-gallery").removeAttr("style"); this.SlideshowDescFixed = false; } } else { if(!this.SlideshowDescFixed) { $("#hp-slideshow .ui-widget.app.multimedia-gallery").css({ "height": $("#hp-slideshow .ui-widget.app.multimedia-gallery").height(), "overflow": "hidden" }); this.SlideshowDescFixed = true; } } } else { if(this.SlideshowDescFixed) { $("#hp-slideshow .ui-widget.app.multimedia-gallery").removeAttr("style"); this.SlideshowDescFixed = false; } } }, "ModEvents": function() { $(".ui-widget.app.upcomingevents").modEvents({ columns : "yes", monthLong : "no", dayWeek : "no" }); var shortMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; var longMonths = ["January","February","March","April","May","June","July","August","September","October","November","December"]; $(".ui-widget.app.upcomingevents .ui-article").each(function() { $(".ui-article-description", this).each(function() { if(!$(".sw-calendar-block-time", this).length && $.trim($(this).text()) != "There are no upcoming events to display.") { $(this).prepend('All Day'); } else { $(this).closest(".ui-widget.app").addClass("no-events"); } }); if (!$(".ui-article-title.sw-calendar-block-date", this).length && $.trim($(".ui-article-description", this).text()) != "There are no upcoming events to display.") { var moveArticle = $(this).html(); $(this).parent().prev("li").find(".ui-article .upcoming-column.right").append(moveArticle); $(this).parent().remove(); } else { var monthIndex = shortMonths.indexOf($(".joel-month", this).text()); var eventMonth = $(".joel-month", this).detach(); var eventDate = $.trim($(".ui-article-title", this).text()); if(eventDate.length == 1) eventDate = "0" + eventDate; var ariaDate = eventDate; switch(eventDate){ case "01": ariaDate = "First"; break; case "02": ariaDate = "Second"; break; case "03": ariaDate = "Third"; break; case "04": ariaDate = "Fourth"; break; case "05": ariaDate = "Fifth"; break; case "06": ariaDate = "Sixth"; break; case "07": ariaDate = "Seventh"; break; case "08": ariaDate = "Eighth"; break; case "09": ariaDate = "Ninth"; break; case "10": ariaDate = "Tenth"; break; case "11": ariaDate = "Eleventh"; break; case "12": ariaDate = "Twelveth"; break; case "13": ariaDate = "Thirteenth"; break; case "14": ariaDate = "Fourteenth"; break; case "15": ariaDate = "Fifteenth"; break; case "16": ariaDate = "Sixteenth"; break; case "17": ariaDate = "Seventeenth"; break; case "18": ariaDate = "Eighteenth"; break; case "19": ariaDate = "Nineteenth"; break; case "20": ariaDate = "Twentieth"; break; case "21": ariaDate = "Twenty-first"; break; case "22": ariaDate = "Twenty-second"; break; case "23": ariaDate = "Twenty-third"; break; case "24": ariaDate = "Twenty-fourth"; break; case "25": ariaDate = "Twenty-fifth"; break; case "26": ariaDate = "Twenty-sixth"; break; case "27": ariaDate = "Twenty-seventh"; break; case "28": ariaDate = "Twenty-eighth"; break; case "29": ariaDate = "Twenty-ninth"; break; case "30": ariaDate = "Thirtieth"; break; case "31": ariaDate = "Thirty-first"; break; } $(".ui-article-title", this).html(eventMonth).append('' + eventDate + '').attr("aria-label", longMonths[monthIndex] + " " + ariaDate); $(".joel-month, .joel-date", this).attr("aria-hidden", "true"); } }); }, "Shortcuts": function() { // REGION B this.BuildShortcuts({ "columns": [3, 1, 1, 1, 1], "selector": ".hp-column.one .ui-widget.app.siteshortcuts" }); // REGION E this.BuildShortcuts({ "columns": [3, 1, 1, 1, 1], "selector": ".hp-column.four .ui-widget.app.siteshortcuts" }); // REGION F this.BuildShortcuts({ "columns": [4, 1, 1, 1, 1], "selector": ".hp-content.bottom .ui-widget.app.siteshortcuts" }); }, "BuildShortcuts": function(props) { var _this = this; var columnNums = props.columns; var selector = props.selector; // RETURN BREAKPOINT INDEX var bp = function() { switch(_this.GetBreakPoint()) { case "desktop": return 0; break; case "768": return 1; break; case "640": return 2; break; case "480": return 3; break; case "320": return 4; break; } } // SET COLUMN NUM AND OTHER VARS var columnNum = columnNums[bp()]; var endRange; $(selector).each(function() { // RETURN THE LI'S TO THE ORIGINAL UL $(".ui-widget-detail > ul.site-shortcuts", this).append($(".site-shortcuts-column > li", this)); // REMOVE COLUMN CONTAINER FOR REBUILD $(".site-shortcuts-columns", this).remove(); // GET SHORTCUT NUM var shortcutNum = $(".ui-widget-detail > ul.site-shortcuts > li", this).length; // ADD COLUMN CONTAINER $(".ui-widget-detail", this).prepend('