1/***************** Waypoints ******************/ 2 3$(document).ready(function() { 4 5 $('.wp1').waypoint(function() { 6 $('.wp1').addClass('animated fadeInLeft'); 7 }, { 8 offset: '75%' 9 }); 10 $('.wp2').waypoint(function() { 11 $('.wp2').addClass('animated fadeInUp'); 12 }, { 13 offset: '75%' 14 }); 15 $('.wp3').waypoint(function() { 16 $('.wp3').addClass('animated fadeInDown'); 17 }, { 18 offset: '55%' 19 }); 20 $('.wp4').waypoint(function() { 21 $('.wp4').addClass('animated fadeInDown'); 22 }, { 23 offset: '75%' 24 }); 25 $('.wp5').waypoint(function() { 26 $('.wp5').addClass('animated fadeInUp'); 27 }, { 28 offset: '75%' 29 }); 30 $('.wp6').waypoint(function() { 31 $('.wp6').addClass('animated fadeInDown'); 32 }, { 33 offset: '75%' 34 }); 35 36}); 37 38// function b64EncodeUnicode(str) { 39// return btoa(encodeURIComponent(str)); 40// } 41 42function unicodeDecodeB64(str) { 43 return decodeURIComponent(atob(str)); 44} 45 46/***************** Slide-In Nav ******************/ 47 48$(window).load(function() { 49 50 $('.nav_slide_button').click(function() { 51 $('.pull').slideToggle(); 52 }); 53 54 55 const mail = unicodeDecodeB64("Y29udGFjdCU0MGlraWdhaS5nYW1lcw=="); 56 57 const a = document.querySelector("#contact-us"); 58 a.textContent = mail; 59 a.href = `mailto:${mail}`; 60}); 61 62/***************** Smooth Scrolling ******************/ 63 64$(function() { 65 66 $('a[href*=#]:not([href=#])').click(function() { 67 if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) { 68 69 var target = $(this.hash); 70 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 71 if (target.length) { 72 $('html,body').animate({ 73 scrollTop: target.offset().top 74 }, 2000); 75 return false; 76 } 77 } 78 }); 79 80}); 81 82/***************** Overlays ******************/ 83 84$(document).ready(function(){ 85 if (Modernizr.touch) { 86 // show the close overlay button 87 $(".close-overlay").removeClass("hidden"); 88 // handle the adding of hover class when clicked 89 $(".img").click(function(e){ 90 if (!$(this).hasClass("hover")) { 91 $(this).addClass("hover"); 92 } 93 }); 94 // handle the closing of the overlay 95 $(".close-overlay").click(function(e){ 96 e.preventDefault(); 97 e.stopPropagation(); 98 if ($(this).closest(".img").hasClass("hover")) { 99 $(this).closest(".img").removeClass("hover"); 100 } 101 }); 102 } else { 103 // handle the mouseenter functionality 104 $(".img").mouseenter(function(){ 105 $(this).addClass("hover"); 106 }) 107 // handle the mouseleave functionality 108 .mouseleave(function(){ 109 $(this).removeClass("hover"); 110 }); 111 } 112}); 113 114/***************** Flexsliders ******************/ 115 116$(window).load(function() { 117 118 $('#portfolioSlider').flexslider({ 119 animation: "slide", 120 directionNav: false, 121 controlNav: true, 122 touch: false, 123 pauseOnHover: true, 124 start: function() { 125 $.waypoints('refresh'); 126 } 127 }); 128 129 $('#servicesSlider').flexslider({ 130 animation: "slide", 131 directionNav: false, 132 controlNav: true, 133 touch: true, 134 pauseOnHover: true, 135 start: function() { 136 $.waypoints('refresh'); 137 } 138 }); 139 140 $('#teamSlider').flexslider({ 141 animation: "slide", 142 directionNav: false, 143 controlNav: true, 144 touch: true, 145 pauseOnHover: true, 146 start: function() { 147 $.waypoints('refresh'); 148 } 149 }); 150 151}); 152 153 154/************** CAROUSEL ****************/ 155 156 $('.carousel').each(function () { 157 var $carousel = $(this); 158 var hammertime = new Hammer(this, { 159 recognizers: [ 160 [Hammer.Swipe, { direction: Hammer.DIRECTION_HORIZONTAL }] 161 ] 162 }); 163 hammertime.on('swipeleft', function () { 164 $carousel.carousel('next'); 165 }); 166 hammertime.on('swiperight', function () { 167 $carousel.carousel('prev'); 168 }); 169 }); 170 171$('.navbar-nav>li>a').on('click', function(){ 172 $('.navbar-collapse').collapse('hide'); 173}); 174 175$(window).scroll(function() { 176 if ($(this).scrollTop() > 100){ 177 $('.logo').addClass("sticky"); 178 $('.navbar-brand').addClass("visible"); 179 } 180 else{ 181 $('.logo').removeClass("sticky"); 182 $('.navbar-brand').removeClass("visible"); 183 } 184}); 185 186 187function myFunction() { 188 var popup = document.getElementById("myPopup"); 189 popup.classList.toggle("show"); 190}
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.