1$(function () { 2 3 /* ========================================= 4 * tooltip 5 * =======================================*/ 6 7 $('.customer img').tooltip(); 8 9 10 /* ========================================= 11 * counters 12 * =======================================*/ 13 14 $('.counter').counterUp({ 15 delay: 10, 16 time: 1000 17 }); 18 19 /* ================================================= 20 * Preventing URL update on navigation link click 21 * ==============================================*/ 22 23 $('.link-scroll').on('click', function (e) { 24 var anchor = $(this); 25 $('html, body').stop().animate({ 26 scrollTop: $(anchor.attr('href')).offset().top 27 }, 1000); 28 e.preventDefault(); 29 }); 30 31 32 /* ========================================= 33 * Scroll Spy 34 * =======================================*/ 35 36 $('body').scrollspy({ 37 target: '#navbarcollapse', 38 offset: 80 39 }); 40 41 42 /* ========================================= 43 * testimonial slider 44 * =======================================*/ 45 46 $(".testimonials").owlCarousel({ 47 nav: false, 48 dots: true, 49 responsiveClass: true, 50 responsive: { 51 0: { 52 items: 1 53 }, 54 600: { 55 items: 1 56 }, 57 1000: { 58 items: 3 59 }, 60 1200: { 61 items: 4 62 } 63 } 64 }); 65 66 67 /* ========================================= 68 * Leflet map 69 * =======================================*/ 70 map(); 71 72 73 /* ========================================= 74 * parallax 75 * =======================================*/ 76 $(window).scroll(function () { 77 78 var scroll = $(this).scrollTop(); 79 80 if ($(window).width() > 1250) { 81 $('.parallax').css({ 82 'background-position': 'left -' + scroll / 8 + 'px' 83 }); 84 } else { 85 $('.parallax').css({ 86 'background-position': 'center center' 87 }); 88 } 89 }); 90 91 /* ========================================= 92 * filter 93 * =======================================*/ 94 95 $('#filter a').click(function (e) { 96 e.preventDefault(); 97 98 $('#filter li').removeClass('active'); 99 $(this).parent('li').addClass('active'); 100 101 var categoryToFilter = $(this).attr('data-filter'); 102 103 $('.reference-item').each(function () { 104 105 if ($(this).data('category') === categoryToFilter || categoryToFilter === 'all') { 106 $(this).show(); 107 } else { 108 $(this).hide(); 109 } 110 }); 111 112 }); 113 114 115 /* ========================================= 116 * reference functionality 117 * =======================================*/ 118 $('.reference a').on('click', function (e) { 119 120 e.preventDefault(); 121 122 var title = $(this).find('.reference-title').text(), 123 description = $(this).siblings('.reference-description').html(); 124 125 $('#detail-title').text(title); 126 $('#detail-content').html(description); 127 128 var images = $(this).siblings('.reference-description').data('images').split(','); 129 if (images.length > 0) { 130 sliderContent = ''; 131 for (var i = 0; i < images.length; ++i) { 132 sliderContent = sliderContent + '<div class="item"><img src=' + images[i] + ' alt="" class="img-fluid"></div>'; 133 } 134 } else { 135 sliderContent = ''; 136 } 137 138 openReference(sliderContent); 139 140 }); 141 142 function openReference(sliderContent) { 143 $('#detail').slideDown(); 144 $('#references-masonry').slideUp(); 145 146 147 if (sliderContent !== '') { 148 149 var slider = $('#detail-slider'); 150 151 if (slider.hasClass('owl-loaded')) { 152 slider.trigger('replace.owl.carousel', sliderContent); 153 } else { 154 slider.html(sliderContent); 155 slider.owlCarousel({ 156 nav: false, 157 dots: true, 158 items: 1 159 }); 160 161 } 162 } 163 } 164 165 166 function closeReference() { 167 $('#references-masonry').slideDown(); 168 $('#detail').slideUp(); 169 } 170 171 $('#filter button, #detail .close').on('click', function () { 172 closeReference(); 173 }); 174 175 176 /* ========================================= 177 * animations 178 * =======================================*/ 179 180 delayTime = 0; 181 182 $('[data-animate]').waypoint(function (direction) { 183 delayTime += 250; 184 185 var element = $(this.element); 186 187 $(this.element).delay(delayTime).queue(function (next) { 188 element.toggleClass('animated'); 189 element.toggleClass(element.data('animate')); 190 delayTime = 0; 191 next(); 192 }); 193 194 this.destroy(); 195 196 }, {
197 offset: '90%' 198 }); 199 200 $('[data-animate-hover]').hover(function () { 201 $(this).css({ 202 opacity: 1 203 }); 204 $(this).addClass('animated'); 205 $(this).removeClass($(this).data('animate')); 206 $(this).addClass($(this).data('animate-hover')); 207 }, function () { 208 $(this).removeClass('animated'); 209 $(this).removeClass($(this).data('animate-hover')); 210 }); 211 212 /* ========================================= 213 * for demo purpose 214 * =======================================*/ 215 216 var stylesheet = $('link#theme-stylesheet'); 217 $("<link id='new-stylesheet' rel='stylesheet'>").insertAfter(stylesheet); 218 var alternateColour = $('link#new-stylesheet'); 219 220 if ($.cookie("theme_csspath")) { 221 alternateColour.attr("href", $.cookie("theme_csspath")); 222 } 223 224 $("#colour").change(function () { 225 226 if ($(this).val() !== '') { 227 228 var theme_csspath = 'css/style.' + $(this).val() + '.css'; 229 230 alternateColour.attr("href", theme_csspath); 231 232 $.cookie("theme_csspath", theme_csspath, { 233 expires: 365, 234 path: document.URL.substr(0, document.URL.lastIndexOf('/')) 235 }); 236 237 } 238 239 return false; 240 }); 241 242}); 243 244 245 246/* ========================================= 247 * styled Leaflet Map 248 * =======================================*/ 249// ------------------------------------------------------ // 250// styled Leaflet Map 251// ------------------------------------------------------ // 252 253function map() { 254 255 var mapId = 'map', 256 mapCenter = [47.823834, 13.039174], 257 mapMarker = true; 258 259 if ($('#' + mapId).length > 0) { 260 261 var icon = L.icon({ 262 iconUrl: 'img/marker.png', 263 iconSize: [25, 37.5], 264 popupAnchor: [0, -18], 265 tooltipAnchor: [0, 19] 266 }); 267 268 var dragging = false, 269 tap = false; 270 271 if ($(window).width() > 700) { 272 dragging = true; 273 tap = true; 274 } 275 276 var map = L.map(mapId, { 277 center: mapCenter, 278 zoom: 16, 279 dragging: dragging, 280 tap: tap, 281 scrollWheelZoom: false 282 }); 283 284 var Stamen_TonerLite = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { 285 attribution: 'Map tiles by <a href="http://www.openstreetmap.org">OpenStreetMap</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', 286 subdomains: 'abcd', 287 minZoom: 0, 288 maxZoom: 20, 289 ext: 'png' 290 }); 291 292 Stamen_TonerLite.addTo(map); 293 294 map.once('focus', function () { 295 map.scrollWheelZoom.enable(); 296 }); 297 298 if (mapMarker) { 299 var marker = L.marker(mapCenter, { 300 icon: icon 301 }).addTo(map); 302 303 marker.bindPopup("<div class='p-4'><h5>University of Salzburg</h5><p>Interfaculty Department of Geoinformatics - Z_GIS<br>Copernicus Masters in Digital Earth</p></div>", { 304 minwidth: 200, 305 maxWidth: 600, 306 className: 'map-custom-popup' 307 }) 308 309 } 310 } 311 312}
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.