PageSourceSearch

https://fvsu.edu/js/main.js?v=2026-10-01-07-37-50

js fvsu.edu collected 2026-10-01 11:38:31 UTC 33,299 bytes, 790 lines download raw bytes

1/* ==========================================================================
2     Project:     Fort Valley State University
3     Date:        01/04/2022 - File created	
4     Created by:  Third Wave Digital (www.thirdwavedigital.com)
5========================================================================== */
6  			    
7var cmsSite = function() {
8
9    /* ==========================================================================
10	   Accessibility patches
11    ========================================================================== */
12
13     const removeSlickDivAccessibilityAttrs = (scope = document) => {
14          const slickRoots = scope.matches?.(".slick-initialized")
15               ? [scope]
16               : Array.from(scope.querySelectorAll(".slick-initialized"));
17
18          slickRoots.forEach((root) => {
19               const slickDivs = root.matches("div[aria-label], div[role]")
20                    ? [root, ...root.querySelectorAll("div[aria-label], div[role]")]
21                    : Array.from(root.querySelectorAll("div[aria-label], div[role]"));
22
23               slickDivs.forEach((div) => {
24                    div.removeAttribute("aria-label");
25                    div.removeAttribute("role");
26               });
27          });
28     };
29
30     const bindSlickAccessibilityCleanup = () => {
31          if (typeof $ !== "function") return;
32
33          $(document).on("init reInit setPosition afterChange", ".slick-slider", function () {
34               removeSlickDivAccessibilityAttrs(this);
35          });
36     };
37
38     const removeCardTabIndexAttrs = (scope = document) => {
39          const cards = scope.matches?.("div.card[tabindex]")
40               ? [scope]
41               : Array.from(scope.querySelectorAll("div.card[tabindex]"));
42
43          cards.forEach((card) => {
44               card.removeAttribute("tabindex");
45          });
46     };
47
48     const replaceCollapseParagraphTriggers = (scope = document) => {
49          const triggers = scope.matches?.('p[data-toggle="collapse"]')
50               ? [scope]
51               : Array.from(scope.querySelectorAll('p[data-toggle="collapse"]'));
52
53          triggers.forEach((trigger) => {
54               const button = document.createElement("button");
55
56               Array.from(trigger.attributes).forEach((attribute) => {
57                    button.setAttribute(attribute.name, attribute.value);
58               });
59
60               button.setAttribute("type","button");
61               button.innerHTML = trigger.innerHTML;
62
63               button.removeAttribute("role");
64               button.removeAttribute("tabindex");
65
66               trigger.replaceWith(button);
67          });
68     };
69
70     const patchCmsAccordionAccessibility = (scope = document) => {
71          const accordions = scope.matches?.(".cms-accordion")
72               ? [scope]
73               : Array.from(scope.querySelectorAll(".cms-accordion"));
74
75          accordions.forEach((accordion) => {
76               const panels = Array.from(accordion.querySelectorAll('.collapse[aria-labelledby]:not([role])'));
77               const triggers = Array.from(accordion.querySelectorAll('[data-toggle="collapse"][aria-controls]'));
78
79               panels.forEach((panel) => {
80                    panel.removeAttribute("aria-labelledby");
81               });
82
83               triggers.forEach((trigger) => {
84                    var tagName = trigger.tagName.toLowerCase(),
85                         isNativeButton = tagName === "button",
86                         isNativeLink = tagName === "a" && trigger.hasAttribute("href"),
87                         panelId = trigger.getAttribute("aria-controls"),
88                         panel = panelId ? document.getElementById(panelId) : null;
89
90                    if (!isNativeButton && !isNativeLink) {
91                         trigger.setAttribute("role","button");
92                         if (!trigger.hasAttribute("tabindex")) trigger.setAttribute("tabindex","0");
93                    }
94
95                    if (panel) {
96                         trigger.setAttribute("aria-expanded",panel.classList.contains("show") ? "true" : "false");
97                    } else if (!trigger.hasAttribute("aria-expanded")) {
98                         trigger.setAttribute("aria-expanded","fal
98se");
99                    }
100               });
101          });
102     };
103
104     const bindCmsAccordionAccessibilityCleanup = () => {
105          if (typeof $ !== "function") return;
106
107          $(document).on("shown.bs.collapse hidden.bs.collapse", ".cms-accordion .collapse", function () {
108               var accordion = this.closest(".cms-accordion");
109               if (accordion) patchCmsAccordionAccessibility(accordion);
110          });
111
112          $(document).on("keydown", '.cms-accordion [data-toggle="collapse"]:not(button):not(a[href])', function (event) {
113               if (event.key === "Enter" || event.key === " ") {
114                    event.preventDefault();
115                    $(this).trigger("click");
116               }
117          });
118     };
119
120     const patchCmsStepperAriaLabels = (scope = document) => {
121          const steppers = scope.matches?.(".cms-stepper")
122               ? [scope]
123               : Array.from(scope.querySelectorAll(".cms-stepper"));
124
125          steppers.forEach((stepper) => {
126               Array.from(stepper.querySelectorAll("a.step-indicator")).forEac
126h((step, index) => {
127                    var stepText = step.querySelector(".step-text"),
128                         label = stepText && stepText.textContent
129                              ? stepText.textContent.replace(/\s+/g, " ").trim()
130                              : "";
131
132                    if (!label) label = "Step " + (index + 1);
133
134                    step.setAttribute("aria-label",label);
135               });
136          });
137     };
138
139    /* ==========================================================================
140	   Main menu
141    ========================================================================== */
142
143     var mainMenu = function() {
144          var $mainmenu = $(".mainmenu"),
145          $audiencelinks = $("header .audiencelinks");
146
147          // Audience dropdown
148          $audiencelinks.find(".btn-toggle-dropdown").on("click",function(e) {
149               if (!$(this).hasClass("active")) {
150                    $(this).attr("aria-expanded","true").addClass("active").closest("li").find("ul").attr("aria-hidden","false").addClass("active");
151               } else {
152                    $(this).attr("aria-expanded","false").removeClass("active").closest("li").find("ul").attr("aria-hidden","true").removeClass("active");
153               }
154          })
155
156          // Reset mainmenu
157          var closeMainMenu = function() {
158               $audiencelinks
159                    .find(".btn-toggle-menu").attr("aria-expanded","false").removeClass("active");
160               $mainmenu.attr("aria-hidden","true").removeClass("active subs-active sub-subs-active")
161                    .find("ul, button").removeClass("active").end()
162                    .find("ul").attr("aria-hidden","true").end()
163                    .find("button").attr("aria-expanded","false")
164          }
165
166          $(document).keyup(function(e) {
167               if (e.keyCode === 27 && $mainmenu.hasClass("active")) {
168                    closeMainMenu();
169               }
170          })
171
172          // Toggle menu
173          $audiencelinks.find(".btn-toggle-menu").on("click",function(e) {
174               if (!$(this).hasClass("active")) {
175                    $(this).attr("aria-expanded","true").addClass("active");
176                    $mainmenu.attr("aria-hidden","false").addClass("active");
177               } else {
178                    closeMainMenu();
179               }
180          })
181
182          // Clone subs under mains for <768
183          $mainmenu.find(".subs ul").each(function(e) {
184               var section = $(this).attr("data-id"),
185                    parent = $mainmenu.find(".mains button[data-controls="+section+"]");
186
187               $(this).clone().insertAfter(parent).wrap('<div class="subs d-md-none" />');
188          })
189
190          // Clone subs-subs under subs for <768
191          $mainmenu.find(".sub-subs ul").each(function(index,item) {
192               var section = $(this).attr("data-id"),
193                    parent = $mainmenu.find(".subs button[data-controls="+section+"]");
194
195              $(this).clone().insertAfter(parent).wrap('<div class="sub-subs d-md-none" />');
196          })
197          
198          // Show subs
199          $mainmenu.find(".btn-main").on("click",function(e) {
200               var section = $(this).attr("data-controls");
201
202               // Toggle attributes on subs
203               $mainmenu.addClass("subs-active").removeClass("sub-subs-active")
204                    .find("button").not($(this)).removeClass("active").attr("aria-expanded","false");
205               $mainmenu
206                    .find("ul").removeClass("active").attr("aria-hidden","true");
207
208               // Add active class to cloned and non-cloned subs
209               $(".mainmenu ul[data-id="+section+"]").addClass("active").attr("aria-hidden","false");
210
211               // Toggle attributes when button clicked again
212               if (!$(this).hasClass("active")) {
213                    $(this).addClass("active").attr("aria-expanded","true");
214               } else {
215                    $(this).removeClass("active").attr("aria-expanded","fal
215se");
216                    $mainmenu.removeClass("subs-active")
217                         .find("ul").attr("aria-hidden","true");
218               }
219          })
220
221          // Show sub-subs
222          $mainmenu.find(".btn-sub").on("click",function(e) {
223               var section = $(this).attr("data-controls");
224
225               $mainmenu.addClass("sub-subs-active")
226                    .find(".btn-sub").not($(this)).removeClass("active").attr("aria-expanded","false");
227               $mainmenu
228                    .find(".sub-subs ul").removeClass("active").attr("aria-hidden","true");
229
230               // Add active class to cloned and non-cloned subs
231               $(".mainmenu ul[data-id="+section+"]").addClass("active").attr("aria-hidden","false");
232
233                // Toggle attributes when button clicked again
234                if (!$(this).hasClass("active")) {
235                    $(this).addClass("active").attr("aria-expanded","true");
236               } else {
237                    $(this).removeClass("active").attr("aria-expanded","false");
238                    $mainmenu.removeClass("sub-subs-active")
239                         .find(".sub-subs ul").attr("aria-hidden","true");
240               }
241
242          })
243
244          // Keyboard assistance
245          $mainmenu.find(".resourcelinks li:last-child a").on("blur",function(e) {
246               closeMainMenu();
247          })
248
249          $mainmenu.find(".btn-main,.btn-sub").on("keyup",function(e) {
250               var section = $(this).attr("data-controls");
251               if (e.which == 13) {
252                    $(".mainmenu ul[data-id="+section+"]").find("li:first-child *").focus();
253               }
254          })
255
256          // Show subs & subsubs if main is active
257          if ($mainmenu.find(".btn-main.active").length) {
258               var section = $mainmenu.find(".btn-main.active").attr("data-controls");
259               // Toggle attributes on subs
260               $mainmenu.addClass("subs-active");
261
262               // Add active class to cloned and non-cloned subs
263               $(".mainmenu ul[data-id="+section+"]").addClass("active").attr("aria-hidden","false");
264          }
265     }
266
267     /* ==========================================================================
268          Site Alert & Alert Modal
269     ========================================================================== */
270
271     var getCookie = function(name) {
272          var match = document.cookie.match(RegExp('(?:^|;\\s*)' + name + '=([^;]*)')); return match ? match[1] : null;
273     }
274
275     var alertModal = function() {
276          var expiryDate = new Date();
277          
278          // Update date
279          expiryDate.setDate(expiryDate.getDate() + 7);
280
281          // Show alert?
282          if (getCookie("fsvu-alert-modal") != "hidden") $("#alert-modal").modal();
283
284          $alertModal.on("hidden.bs.modal",function(e) {
285               // Close alert, set cookie
286               document.cookie = "fsvu-alert-modal=hidden; expires=" + expiryDate.toGMTString() + ";path=/";
287          })
288     }
289       
290     var siteAlert = function() {
291          var $alert = $(".alert-wrapper .alert"),
292               expiryDate = new Date();
293
294     
295          // Update date
296          expiryDate.setDate(expiryDate.getDate() + 7);
297
298		// Show alert?
299          $alert.each(function(index,element) {
300               index++;
301               if (getCookie("fsvu-alert-0"+index+"") != "hidden")  $(".alert-wrapper .alert[data-alertnum="+index+"]").removeClass("d-none").addClass("d-flex");
302          })
303
304          $alert.find(".btn-close-alert").on("click",function(e) {
305               // Close alert, set cookie
306               var alertNumber = $(this).closest($alert).data("alertnum");
307               $(this).closest($alert).remove();
308               document.cookie = "fsvu-alert-0"+alertNumber+"=hidden; expires=" + expiryDate.toGMTString() + ";path=/";
309          })
310     }
311
312     /* ==========================================================================
313	  Submenu
314    ========================================================================== */
315    
316	var subMenu = function() {
317		// Toggle submenu visibility
318          var $submenuBtn = $subMenu.parent().find(".btn-toggle-submenu");
319
320		$submenuBtn.click(function(e) {
321			if (!$subMenu.hasClass("active")) {
322				$subMenu.addClass("active").attr("aria-hidden","false");
323                    $submenuBtn.addClass("active").find(".fa-angle-down").removeClass("fa-angle-down").addClass("fa-times");
324			} else {
325				$subMenu.removeClass("active").attr("aria-hidden","true");
326                    $submenuBtn.removeClass("active").find(".fa-times").removeClass("fa-times").addClass("fa-angle-down");
327			}
328		})
329
330          $subMenu.find(".btn-toggle-subs").on("click",function(e) {
331               var $thisDropdown = $(this).parent().next("ul");
332               if (!$(this).hasClass("active")) {
333				$thisDropdown.addClass("active").attr("aria-hidden","false");
334                    $(this).addClass("active").find(".fa-angle-down").removeClass("fa-angle-down").addClass("fa-times");
335			} else {
336				$thisDropdown.removeClass("active").attr("aria-hidden","true");
337                    $(this).removeClass("active").find(".fa-times").removeClass("fa-times").addClass("fa-angle-down");
338			}
339          })
340
341          // Toggle submenu aria attributes
342          var breakpoint;
343          $(window).resize(function(){
344			// xs
345			if (window.innerWidth < 768 && breakpoint != "xs") {
346				$subMenu.attr("aria-hidden","true");
347                    $subMenu.removeClass("active").attr("aria-hidden","true");
348                    $submenuBtn.removeClass("active").find(".fa-times").removeClass("fa-times").addClass("fa-angle-down");
349				breakpoint = "xs";	           
350			};
351			// sm
352			if (window.innerWidth >= 768 && breakpoint != "sm") {
353				$subMenu.removeAttr("aria-hidden style").removeClass("active");
354				breakpoint = "sm";
355			};
356		}).resize();
357	}
358
359     /* ==========================================================================
360          CMS
361     ========================================================================== */
362     
363     var cmsTabs = function() {
364          /* Bootstrap's default tab markup was modified to work with CKEditor's widget API, so we need an additional listener for the active state */
365          $(document).on("click",".cms-tabs .nav-link", function(e) {
366			$(this).closest(".cms-tabs").find(".nav-link").not($(this)).removeClass("active");
367		})
368     }
369
370     var bootstrapTables = function() {
371          if (!$("table.table").parent(".table-responsive").length) $("table.table").wrap('<div class="table-responsive" />');
372     }
373
374     /* ==========================================================================
375          Homepage
376     ========================================================================== */
377     
378     var homePage = function() {
379         // Toggle video playback
380          $(".programs-wrapper .btn-toggle-video").on("click",function(e) {
381               if ($(this).find("span").hasClass("fa-pause")) {
382                    $(this).find("span").removeClass("fa-pause").addClass("fa-play");
383                    $(".programs-wrapper video")[0].pause();
384               } else {
385                    $(this).find("span").removeClass("fa-play").addClass("fa-pause");
386                    $(".programs-wrapper video")[0].play();
387               }
388          })
389
390           // Start slideshow
391           var $aboutSlideshow = $(".about-slideshow");
392
393           $aboutSlideshow.slick({
394               autoplay: false,
395               arrows: true,
396               dots: true,
397               infinite: true,
398               slide: '.item',
399               useTransform: true,
400               useCSS: true,
401               centerMode: true,
402               centerPadding: "0px",
403               cssEase: 'ease-out',
404               slidesToShow: 3,
405               slidesToScroll: 1,
406               responsive: [
407                    {
408                         breakpoint: 7678,
409                         settings: {
410                              slidesToShow: 2,
411                              slidesToScroll: 1
412                         }
413                    },
414                    {
415                         breakpoint: 480,
416                         settings: {
417                              slidesToShow: 1,
418                              slidesToScroll: 1
419                         }
420                    }
421               ]
422          })
423
424     }
425
426     /* ==========================================================================
427          Program Finder
428     ========================================================================== */
429     
430     var programFinder = function() {
431          var $programList = $(".program-list"),
432               filters = [];
433               
434          // Show results
435          var containsAll = function(needles,haystack) {
436               for(var i = 0; i < needles.length; i++){
437                    if($.inArray(needles[i], haystack) == -1) return false;
438               }
439               return true;
440          }
441          
442          var showResults = function() {
443               // console.log(filters)
444               var matches = 0;
445               if (filters.length > 0) {
446                    $programList.find('div[class*="col-"]').addClass("d-none").each(function(index,item) {
447                         var cardFilters = $(this).data("filters").split(",");
448                         // If "program_name" & "program_type" are both checked, match all
449                         if ($programFinder.find("input[name=program-type]:checked").val() != "" && $programFinder.find("input[name=program-from]:checked").val() != "") {
450                              if (containsAll(filters,cardFilters) == true) {
451                                   $(this).removeClass("d-none");
452                                   matches++;
453                              }
454                         } else {
455                              // Otherwise match any
456                              var match = filters.filter(element => cardFilters.includes(element));
457                              if (match.length > 0) {
458                                   $(this).removeClass("d-none");
459                                   matches++;
460                              }
461                         }
462                     })
463                     // console.log(matches)
464                     if (matches == 0) {
465                         $programFinder
466                              .find(".no-results").removeClass("d-none").end()
467                              .find(".program-list-btns").addClass("d-none");
468                     } else {
469                         $programFinder
470                              .find(".no-results").addClass("d-none").end()
471                              .find(".program-list-btns").removeClass("d-none");
472                     }
473               } else {
474                    $programList.find('div[class*="col-"]').removeClass("d-none");
475               }
476          }
477          
478          // Filter majors btn & dropdown btns
479          $programFinder.find(".btn-toggle-majors").on("click",function(e) {
480               if (!$(this).hasClass("active")) {
481                    $(this).addClass("active");
482                    $programFinder.find(".dropdown-majorfilters").addClass("active");
483               } else {
484                    $(this).removeClass("active");
485                    $programFinder.find(".dropdown-majorfilters").removeClass("active");
486               }
487          })
488
489          $programFinder.find(".btn-close").on("click",function(e) {
490               $programFinder.find(".btn-toggle-majors").trigger("click");
491          })
492
493
494          $programFinder.find(".dropdown-majorfilters input[type=checkbox]").on("change",function(e) {
495               var filter = $(this).val();
496               $.inArray(filter, filters) < 0 ? filters.push(filter) : filters.splice($.inArray(filter, filters),1);
497               showResults();
498           })
499 
500           $programFinder.find(".btn-clear").on("click",function(e) {
501                var values = $programFinder.find(".dropdown-majorfilters input[type=checkbox]").map(function() {return $(this).val();}).get();
502                $.each(values,function(index,item) {
503                     var idx = filters.indexOf(values[index])
504                     if (idx > -1) filters.splice(idx,1);
505                })
506                $programFinder.find(".dropdown-majorfilters input[type=checkbox]").prop("checked",false).parent().removeClass("d-none");
507                $programFinder.find(".search-programs").val("");
508                showResults();
509           })
510 
511           $programFinder.find(".btn-apply").on("click",function(e) {
512                $programFinder.find(".dropdown-majorfilters, .btn-toggle-majors").removeClass("active");
513                showResults();
514           })
515
516           // Filter majors search
517           $programFinder.find(".search-programs").on("keyup",function(e) {
518               var inputValue = $(this).val().toLowerCase();
519               if (inputValue.length >= 1) {
520                    $programFinder.find(".dropdown-majorfilters .custom-checkbox").addClass("d-none").each(function(index,item) {
521                         if ($(this).find("label").text().toLowerCase().indexOf(inputValue) >= 0) $(this).removeClass("d-none");
522                    })
523               } else {
524                    $programFinder.find(".dropdown-majorfilters .custom-checkbox").removeClass("d-none");
525               }
526           })
527
528          // Grid btns
529          $programFinder.find(".btn-smallgrid").on("click",function(e) {
530               $programFinder.find(".btn-largegrid").removeClass("active");
531               $(this).addClass("active");
532               $programList.find(".col-12").removeClass("col-12 col-custom").addClass("col-6 col-md-3").end()
533                    .find(".object-fit").addClass("object-aspectratio object-aspectratio-16x9").end()
534                    .find(".program-details").addClass("d-none");
535          })
536          $programFinder.find(".btn-largegrid").on("click",function(e) {
537               $programFinder.find(".btn-smallgrid").removeClass("active");
538               $(this).addClass("active");
539               $programList.find(".col-6").removeClass("col-6 col-md-3").addClass("col-12 col-custom").end()
540                    .find(".object-fit").removeClass("object-aspectratio object-aspectratio-16x9").end()
541                    .find(".program-details").removeClass("d-none");
542          })
543
544          // Grid filters
545          $programFinder.find("input[name=program-type]").on("change",function(e) {
546               var filter = $(this).val(),
547                    values = $programFinder.find("input[name=program-type]").map(function() {return $(this).val();}).get();
548  
549               $.each(values,function(index,item) {
550                    var idx = filters.indexOf(values[index])
551                    if (idx > -1) filters.splice(idx,1);
552               })
553
554               if (filter != "") filters.push(filter);
555               showResults();
556          })
557          $programFinder.find("input[name=program-from]").on("change",function(e) {
558               var filter = $(this).val(),
559                    values = $programFinder.find("input[name=program-from]").map(function() {return $(this).val();}).get();
560               
561               $.each(values,function(index,item) {
562                    var idx = filters.indexOf(values[index])
563                    if (idx > -1) filters.splice(idx,1);
564               })
565
566               if (filter != "") filters.push(filter);
567               showResults();
568          })
569
570          // Checkbox on load
571          if ($(".graduate-program-finder").length) {
572               $("#Graduate").attr("checked",true).trigger("change");
573          }
574          if ($(".undergraduate-program-finder").length) {
575               $("#Undergraduate").attr("checked",true).trigger("change");
576          }
577     }
578
579     /* ==========================================================================
580          Directory
581     ========================================================================== */
582     
583     var directoryForm = function() {
584          var $btnSubmit = $directoryForm.find(".btn-directory-form-submit"),
585          $inputName = $directoryForm.find(".directory-name"),
586          $selectColleges = $(".select-colleges"),
587          $selectDepts = $(".select-depts"),
588          $loc;
589          
590			if($selectColleges.length) {
591				$selectColleges.on("change",function(e) {
592					if($(this).val().length) {
593						location.href = $(this).val();
594					}
595				});
596			}
597          
598			if($selectDepts.length) {
599				$selectDepts.on("change",function(e) {
600					if($(this).val().length) {
601						location.href = $(this).val();
602					}
603				});
604			}
605			
606          $btnSubmit.on("click",function(e) {
607          	e.preventDefault();
608			
609          	if($inputName.val().trim().length) {
610          		$loc = $inputName.val().replace(/[^0-9a-zA-Z]/g,'');
611          		location.href = $inputName.data("refers") + $loc;
612          	}
613          })
614     }
615
616     var directoryTabs = function() {
617          $directoryTabs
618               .find(".nav .nav-item:first-child p").addClass("active").end()
619               .find(".tab-content .tab-pane:first-child").addClass("active show");
620     }
621
622     /* ==========================================================================
623          Alumni Slideshow
624     ========================================================================== */
625     
626     var alumniSlideshow = function() {
627          var $alumniSlideshow = $(".alumni-slideshow"),
628               breakpoint;
629
630          // Customize dots
631          var addDots = function() {
632               $alumniSlideshow.find(".slick-slide:not(.slick-cloned)").each(function(index,item) {
633                    $alumniSlideshow.find(".slick-dots li:nth-child("+(index+1)+")").append("<div>"+$(this).data("year")+"</div>");
634               })
635               console.log("Updated")
636          }
637          $(window).on("load",function(e) {    
638               addDots();
639           })
640           // Start slideshow
641          $alumniSlideshow.slick({
642                autoplay: false,
643                arrows: false,
644                dots: true,
645                infinite: true,
646                slide: '.item',
647                useTransform: true,
648                useCSS: true,
649                centerMode: true,
650                centerPadding: "0px",
651                cssEase: 'ease-out',
652                responsive: [
653                     {
654                          breakpoint: 9999,
655                          settings: {
656                               slidesToShow: 3,
657                               slidesToScroll: 1
658                          }
659                     },
660                     {
661                          breakpoint: 767,
662                          settings: {
663                               slidesToShow: 2,
664                               slidesToScroll: 1
665                          }
666                     },
667                     {
668                          breakpoint: 479,
669                          settings: {
670                               slidesToShow: 1,
671                               slidesToScroll: 1
672                          }
673                     }
674                ]
675           }).on('breakpoint', function(event, slick, breakpoint) {
676               addDots();
677           })
678
679           $alumniSlideshow.find(".slick-prev").on("click", function (e) {
680                $alumniSlideshow.slick('prev');
681           })
682           $alumniSlideshow.find(".slick-next").on("click", function (e) {
683                $alumniSlideshow.slick('next');
684           })
685     }
686
687     /* ==========================================================================
688          Alumni Slideshow
689     ========================================================================== */
690     
691     var videoWrapper = function() {
692          $videoWrapper.find(".btn-toggle-video").on("click",function(e) {
693               if ($(this).find("span").hasClass("fa-pause")) {
694                    $(this).find("span").removeClass("fa-pause").addClass("fa-play");
695                    $videoWrapper.find("video")[0].pause();
696               } else {
697                    $(this).find("span").removeClass("fa-play").addClass("fa-pause");
698                    $videoWrapper.find("video")[0].play();
699               }
700          })
701     }
702
703     /* ==========================================================================
704          Cookie Consent
705     ========================================================================== */
706     
707     var getCookie = function(name) {
708          var match = document.cookie.match(RegExp('(?:^|;\\s*)' + name + '=([^;]*)')); return match ? match[1] : null;
709     }
710
711     var cookieConsent = function() {
712          // Show cookie consent?    
713          if (getCookie("fvsu-cookie-consent") === null) {
714               $cookieWrapper.removeClass("d-none");
715			$cookieWrapper.find(".btn-close").on("click",function(e) {
716				$cookieWrapper.addClass("d-none");
717				var expiryDate = new Date();
718				expiryDate.setDate(expiryDate.getDate() + 364);
719				document.cookie = "fvsu-cookie-consent=accept; expires=" + expiryDate.toGMTString() + ";path=/";
720			})
721		} else {
722			$cookieWrapper.addClass("d-none");
723		}
724     }
725
726     /* ==========================================================================
727	   Init
728    ========================================================================== */
729    
730	var $html = $("html"),
731          $mainmenu = $("header .mainmenu"),
732          $alertWrapper = $(".alert-wrapper"),
733          $homepage = $(".homepage"),
734          $alertModal = $("#alert-modal"),
735          $subMenu = $(".submenu"),
736          $programFinder = $(".programfinder-wrapper"),
737          $alumniSlideshow = $(".alumni-slideshow"),
738          $directoryForm = $(".directory-search"),
739          $directoryTabs = $(".directory-tabs"),
740          $videoWrapper = $(".video-wrapper"),
741          $cookieWrapper = $(".cookie-wrapper");
742
743     // Skins
744     if ($mainmenu.length) mainMenu();
745     if ($alertWrapper.length) siteAlert();
746     if ($alertModal.length) alertModal();
747     if ($subMenu.length) subMenu();
748     if ($programFinder.length) programFinder();
749     if ($alumniSlideshow.length) alumniSlideshow();
750     if ($directoryForm.length) directoryForm();
751     if ($directoryTabs.length) directoryTabs();
752     if ($videoWrapper.length) videoWrapper();
753     if ($cookieWrapper.length) cookieConsent();
754
755     // Templates
756     if ($homepage.length) homePage();
757
758     // CMS Additions
759     if ($(".cms-tabs").length) cmsTabs();
760     if ($("table.table").length) bootstrapTables();
761
762     // Polyfill - object-fit 
763     objectFitImages();
764     objectFitVideos();
765
766     // Plugin - AOS
767     if (!$(".admin-edit").length) {
768          AOS.init({
769               anchorPlacement: "top",
770               startEvent: "load",
771               once: true
772          })
773     
774     }
775
776     bindSlickAccessibilityCleanup();
777     removeSlickDivAccessibilityAttrs();
778     removeCardTabIndexAttrs();
779     replaceCollapseParagraphTriggers();
780     bindCmsAccordionAccessibilityCleanup();
781     patchCmsAccordionAccessibility();
782     patchCmsStepperAriaLabels();
783
784}
785	 
786$(document).ready(function() {
787
788   cmsSite();
789
790})

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.