PageSourceSearch

https://www.murraystate.edu/_resources/js/scripts.js

js murraystate.edu collected 2026-09-24 09:00:20 UTC 10,135 bytes, 343 lines download raw bytes

1var _DeferredScripts = _DeferredScripts || [];
2
3$('#personatoggle').click(function() {
4    if($('#personatoggle').prop('checked')) {
5        $('.personas label').addClass('open');        
6    } else {
7        $('.personas label').removeClass('open');
8    }
9});
10
11$('#mobiletoggle').click(function() {
12    if($('#mobiletoggle').prop('checked')) {
13        $('.mobile label').addClass('open');        
14    } else {
15        $('.mobile label').removeClass('open');
16    }
17});
18
19$('.quicklinks').click(function() { 
20    if($('.searchToggle').prop('checked')) {
21        $('.mobile label').addClass('open');  
22        $('.searchToggle').prop('checked', false);          
23    } else {          
24        $('.mobile label').removeClass('open'); 
25        $('.searchToggle').prop('checked', true); 
26        $('.toggle').prop('checked', false);   
27    }      
28});
29
30$('.searchMenuLabel').click(function() { 
31    if($('.toggle').prop('checked')) {          
32        $('.toggle').prop('checked', false);          
33    }
34});
35
36$('.mainMenuLabel').click(function() { 
37    if($('.searchToggle').prop('checked')) {          
38        $('.searchToggle').prop('checked', false);          
39    }
40});
41
42
43$('.mobile-menu ul.main li').click(function() {
44    $(this).toggleClass('open');  
45});  
46
47function initDeferredVideos() {
48    var maxVideoResolution = 768;
49    $("video.defer.init").each(function () {
50        if (window.innerWidth >= maxVideoResolution) {
51            $(this).find("source").each(function () {
52                var sourceFile = $(this).attr("data-src");
53                $(this).attr("src", sourceFile);
54            });
55            $(this).removeClass("init");
56            var video = $(this)[0];
57            video.load();
58            video.play();
59        }
60    });
61    $("video.defer:not(.init)").each(function () {
62        var video = $(this)[0];
63        if (window.innerWidth >= maxVideoResolution) {
64            video.play();
65        } else {
66            video.pause();
67        }
68    });
69}
70
71// BEGIN DOC READY
72jQuery(document).ready(function() {
73
74    // BEGIN: TABS SECTION FOR INTERIOR PAGE
75    if (jQuery(".featuredTab").length != 0){
76        jQuery(function () {
77        //FEATURED TABS
78            jQuery('.featuredTab').responsiveTabs({
79            rotate: false,
80            collapsible: 'accordion',
81            setHash: false
82            });
83        });
84    }
85    // END: TABS
86    // BEGIN: LANDING PAGE INFOGRAPHICS SLIDER
87    $('.threeColLandingSlider').slick({
88        infinite: true,
89        speed: 300,
90        slidesToShow: 3,
91        slidesToScroll: 1,
92        arrows: false,
93        dots: true,
94        accessiblity: false,
95        responsive: [
96            {
97              breakpoint: 1024,
98              settings: {
99                slidesToShow: 2,
100                slidesToScroll: 1,
101                arrows: true
102
103              }
104            },
105            {
106              breakpoint: 720,
107              settings: {
108                slidesToShow: 1,
109                slidesToScroll: 1,
110                arrows: true
111              }
112            }
113        ]
114      });
115    // END: LANDING PAGE INFOGRAPHICS SLIDER
116
117    // BEGIN: THREE COLUMN SLIDER
118    $('.threeColumns .slider').slick({
119        infinite: true,
120        slide: ".slide",
121        speed: 300,
122        slidesToShow: 3,
123        slidesToScroll: 1,
124        // arrows: true,
125        dots: true,
126        appendDots: ".dotsContainer",
127        // prevArrow: ".previousArrow",
128        // nextArrow: ".nextArrow",
129        accessiblity: false,
130        responsive: [
131            {
132              breakpoint: 1024,
133              settings: {
134                slidesToShow: 2,
135                slidesToScroll: 1,
136                // arrows: true
137
138              }
139            },
140            {
141              breakpoint: 720,
142              settings: {
143                slidesToShow: 1,
144                slidesToScroll: 1,
145                // arrows: true
146              }
147            }
148        ]
149    });
150    // END: THREE COLUMN SLIDER
151
152    //BEGIN: TABLE SAW
153	if (jQuery(".wysiwyg table").length != 0) {
154		$(".wysiwyg table").each(function(){
155			$(this)
156				.attr("class", "tablesaw tablesaw-stack" )
157				.attr("data-tablesaw-mode", "stack");
158		});
159	}//END: TABLE SAW
160
161
162    // BEGIN: HOMEPAGE TESTIMONIALS SLIDER
163    if ($('.testimonialSlider').length > 0) {   
164        $('.testimonialSlider').slick({
165          slide: '.slide', 
166          infinite: true,        
167          arrows: false,
168          dots: true,
169          accessiblity: true
170        });
171
172        $('.testimonialSlider .slide').each(function () {    
173            var $slide = $(this);        
174            if ($slide.attr('aria-describedby') != undefined) { 
175              // ignore extra/cloned slides        
176              $(this).attr('id', $slide.attr('aria-describedby'));    
177            }
178        });
179    }
180    // END: FEAUTURED SLIDER
181    // BEGIN: YOUTUBE POPUP MAGNIFIC-POPUP
182    if (jQuery('.popup-youtube').length > 0) {
183        jQuery('.popup-youtube').magnificPopup({
184            //disableOn: 700,
185            type: 'iframe',
186            mainClass: 'mfp-fade',
187            removalDelay: 160,
188            preloader: false,
189            fixedContentPos: false
190        });
191    }
192    // END: YOUTUBE POPUP MAGNIFIC-POPUP
193    //BEGIN: EMERGENCY POPUP MAGNIFIC-POPUP
194    if (jQuery(".toggleAlertBtn").length != 0) {
195//       $(window).load(function () { <- no longer supported in jQuery 3.0+
196		$(window).on("load", function() {
197        if (!localStorage.getItem('popup_show')) {
198          $.magnificPopup.open({
199              callbacks: {
200                  open: function(){
201                      jQuery(".toggleAlertBtn").hide();
202                  },
203                  close: function(){
204                    jQuery(".toggleAlertBtn").show();
205                  }
206              },
207              items: {
208                  src: '#alertMessage'
209              },
210              type: 'inline',
211              mainClass: 'mfp-fade',
212              removalDelay: 160,
213              preloader: false,
214              fixedContentPos: false,
215              closeOnContentClick: false
216          }, 0);
217        localStorage.setItem('popup_show', 'true'); // Set the flag in localStorage
218        }
219      });
220    }
221    if (jQuery(".toggleAlertBtn").length != 0) {
222      jQuery('.toggleAlertBtn').magnificPopup({
223          callbacks: {
224              open: function(){
225                  jQuery(".toggleAlertBtn").hide();
226              },
227              close: function(){
228                jQuery(".toggleAlertBtn").show();
229              }
230          },
231          items: {
232              src: '#alertMessage'
233          },
234          type: 'inline',
235          mainClass: 'mfp-fade',
236          removalDelay: 160,
237          preloader: false,
238          fixedContentPos: false,
239          closeOnContentClick: false
240      });
241    }
242    //END: EMERGENCY POPUP MAGNIFIC-POPUP
243    // BEGIN: HOMEPAGE IMPACT BG VIDEO DEFER SCRIPT AND PLAY/PAUSE BUTTON
244    if ($("video.defer").length > 0) {
245        _DeferredScripts.push({
246            //object properties here:
247            priority: 1,
248            thirdParty: 0,
249            callback: function () {
250                $(window).bind("resize", function () {
251                    initDeferredVideos();
252                });
253                initDeferredVideos();
254            }
255        });
256   
257        var playButton = document.getElementById("playButton");
258        // Event listener for the play/pause button
259        playButton.addEventListener("click", function() {
260          if (video.paused == true) {
261            // Play the video
262            video.play();
263
264            // Update the button text to 'Pause'
265            $(playButton).toggleClass('paused');
266          } else {
267            // Pause the video
268            video.pause();
269
270            // Update the button text to 'Play'
271            $(playButton).toggleClass('paused');
272          }
273        });
274    }
275    // END: HOMEPAGE IMPACT BG VIDEO DEFER SCRIPT  AND PLAY/PAUSE BUTTON
276
277}); 
278// END DOC READY
279
280function custInterval(func, wait, times) {
281    var interv = function (w, t) {
282        return function () {
283            if (typeof t === "undefined" || t-- > 0) {
284                setTimeout(interv, w);
285                try {
286                    func.call(null);
287                }
288                catch (e) {
289                    t = 0;
290                    throw e.toString();
291                }
292            }
293        };
294    }(wait, times);
295
296    setTimeout(interv, wait);
297};
298// Include these at the end  of the main scripts file:
299function downloadJSAtOnload() {
300    // call function now
301    getDeferredScripts();
302    // create function interval
303    custInterval(getDeferredScripts, 5000, 10);
304}
305function getDeferredScripts() {
306  // if _DeferredScripts is an object and has items
307    if (typeof _DeferredScripts == 'object' && _DeferredScripts.length > 0) {
308    // Sort
309        _DeferredScripts.sort(function (a, b) {
310            try {
311        // if they have the same priority
312                if (a.priority == b.priority) {
313                    return a.thirdParty - b.thirdParty;
314                } else {
315                    //priority is different so third party doesn't matter
316                    return a.priority - b.priority;
317                }
318            } catch (e) {
319                return 1;
320            }
321        });
322        while (_DeferredScripts.length > 0) {
323      // remove the first item in _DeferredScripts and return that item
324            var scriptObj = _DeferredScripts.shift();
325      
326      // if returned object has a callback function
327      // else if it has a url 
328            if (typeof scriptObj.callback == 'function') {
329                scriptObj.callback();
330            } else if (typeof scriptObj.url == 'string') {
331                var element = document.createElement("script");
332                element.src = scriptObj.url;
333                document.body.appendChild(element);
334            }
335        }
336    }
337}
338if (window.addEventListener)
339    window.addEventListener("load", downloadJSAtOnload, false);
340else if (window.attachEvent)
341    window.attachEvent("onload", downloadJSAtOnload);
342else
343    window.onload = downloadJSAtOnload;

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.