1jQuery(function($) { 2 $('.topnav .main-menu > li.menu-item-has-children > a').on('click',function(){ 3 var ww = $(window).width(); 4 if (ww < 1200) { 5 $(this).parent('li').toggleClass('open'); 6 return false; 7 } 8 }); 9 $(window).scroll(function(){ 10 if ($('body').hasClass('home')) { 11 var wh = $(window).height(); 12 if ($(this).scrollTop() > wh) { 13 $('.float-menu').addClass('visible'); 14 } 15 } 16 if ($('body').hasClass('hide-social-top')) { 17 var wh = $(window).height(); 18 if ($(this).scrollTop() > wh) { 19 $('.top-nav-social').addClass('fade-in'); 20 } 21 } 22 }); 23 $('.hide-off-hours').each(function(){ 24 var availableHours = $(this).data('hours'); 25 console.log(availableHours); 26 if (availableHours) { 27 $(this).hide(); 28 var currentTime = new Date(); 29 var day = currentTime.getDay(); 30 switch (day) { 31 case 0: 32 day = "Sunday"; 33 break; 34 case 1: 35 day = "Monday"; 36 break; 37 case 2: 38 day = "Tuesday"; 39 break; 40 case 3: 41 day = "Wednesday"; 42 break; 43 case 4: 44 day = "Thursday"; 45 break; 46 case 5: 47 day = "Friday"; 48 break; 49 case 6: 50 day = "Saturday"; 51 } 52 var hours = currentTime.getHours(); 53 var minutes = currentTime.getMinutes(); 54 var hoursTime = hours + (minutes/60); 55 var i; 56 for (i = 0; i < availableHours.length; i++) { 57 if (availableHours[i].day == day) { 58 var openingTime = availableHours[i].open; 59 var openHour = parseInt(openingTime.substr(0, openingTime.indexOf(':'))); 60 var openMinute = parseInt(openingTime.split(':')[1]); 61 var closingTime = availableHours[i].close; 62 var closeHour = parseInt(closingTime.substr(0, closingTime.indexOf(':'))); 63 var closeMinute = parseInt(closingTime.split(':')[1]); 64 var openTime = openHour + (openMinute / 60); 65 var closeTime = closeHour + (closeMinute / 60); 66 if ((hoursTime > openTime) && (hoursTime < closeTime)) { 67 $(this).show(); 68 } 69 } 70 } 71 } 72 }); 73 var ww = $(window).width(); 74 if (ww > 1000) { 75 var s = skrollr.init({ 76 forceHeight: false, 77 mobileDeceleration: 1 78 }); 79 } 80 $('.ginput_container_textarea textarea').attr('rows',4); 81 $('[data-menu]').on('click',function(){ 82 $('body').toggleClass('menu-open'); 83 }); 84 $('[data-video]').on('click',function(){ 85 var videoHTML = $(this).data('video'); 86 var modal = '<div class="video-modal-back"><div class="video-modal"><a class="btn" data-close-video>Close Video</a><div class="video-box">'+videoHTML+'</div></div></a>'; 87 $('body').addClass('modal-open'); 88 $('body').append(modal); 89 return false; 90 }); 91 $('a[href*="#video"]').on('click',function(){ 92 var href = $(this).attr('href'); 93 var youTubeId = href.split('#video=')[1]; 94 var videoHTML = '<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/'+youTubeId+'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'; 95 var modal = '<div class="video-modal-back"><div class="video-modal"><a class="btn" data-close-video>Close Video</a><div class="video-box">'+videoHTML+'</div></div></a>'; 96 $('body').addClass('modal-open'); 97 $('body').append(modal); 98 return false; 99 }); 100 $('body').on('click','[data-close-video]',function(){ 101 $('body').removeClass('modal-open'); 102 $(this).closest('.video-modal-back').remove(); 103 }); 104 $('[data-toggle]').click(function(){ 105 var target = $(this).closest('[data-toggler]'); 106 var targetClass = target.data('toggler'); 107 target.toggleClass(targetClass); 108 return false; 109 }); 110 $('.schema-faq-question').on('click',function(){ 111 $(this).parent('.schema-faq-section').toggleClass('open'); 112 }); 113 // var myElement = document.querySelector(".topnav"); 114 // if (myElement) { 115 // var options = { 116 // offset : 0, 117 // tolerance : 0, 118 // tolerance : { 119 // up : 20, 120 // down : 1 121 // } 122 // }; 123 // var headroom = new Headroom(myElement,options); 124 // headroom.init(); 125 // } 126 $('[data-modal]').on('click',function(){ 127 var modalId = $(this).data('modal'); 128 $('#'+modalId).addClass('active'); 129 $('body').addClass('active-modal'); 130 return false;
131 }); 132 $('body').on('click','[data-close-modal]',function(){ 133 $(this).closest('.modalwindow').removeClass('active'); 134 $('body').removeClass('active-modal'); 135 return false; 136 }); 137});
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.