https://www.alleenstrasse.com/_assets/8d3b97fdd41f5d6c4edfa20572965d75/JavaScript/main.js?1790166553
1"use strict"; 2 3$().ready(function () { 4 // initialHash is set by typoscript in file Page.typoscript:147 5 if (initialHash !== undefined && initialHash !== "") { 6 setTimeout(scrollToTarget(initialHash), 500); 7 } 8 9 $('a[href^="#c"]').click(function (event) { 10 event.preventDefault(); 11 scrollToTarget(event.target.hash); 12 }); 13 14 function scrollToTarget(hash) { 15 // get element from hash 16 var targetElement = document.getElementById(hash.substr(1)); // set the history to new location without directly scolling 17 18 window.history.pushState(null, document.title, window.location.origin + window.location.pathname + hash); // setup new scrolling position 19 20 var isDesktopView = $('.Header-Section .desktop-nav').is(":visible"); 21 var scrollPosition = getScrollPosition(targetElement).top; 22 23 if (isDesktopView) { 24 // calculate desktop scroll position (header position is absolute!) 25 // unscrolled header height 140px (40 px service + 100 px navigation) 26 // scrolled header height 40px (fixed navigation is position absolute 65 px) 27 // diff 100px + scrolled navigation height (65px) = 165 px 28 // logo has translationY by 18px = 183 px offset 29 scrollPosition -= 183; 30 var serviceUnten = document.querySelector('.Header-Section .Service-Unten'); 31 32 if (serviceUnten.classList.contains('fixed')) { 33 // is page scrolled. normal navigation is hidden, so adjust scroll position 34 scrollPosition += 100; 35 } 36 } // scroll to the new position 37 38 39 window.scrollTo({ 40 top: scrollPosition, 41 behavior: 'smooth' 42 }); 43 } 44 45 function getScrollPosition(el) { 46 var elRect = el.getBoundingClientRect(); 47 var bodyRect = document.body.getBoundingClientRect(); 48 var left = elRect.left + window.scrollX; 49 var top = elRect.top + window.scrollY - 20; // default offset 50 51 return { 52 left: left, 53 top: top 54 }; 55 } 56}); 57"use strict"; 58 59$().ready(function () { 60 var donationToggleSwitch = document.querySelector('.donation_toggle .switch input[type="checkbox"]'); 61 var donationToggleLink1 = document.querySelector('.donation_toggle-link1'); 62 var donationToggleLink2 = document.querySelector('.donation_toggle-link2'); 63 64 if (donationToggleSwitch) { 65 var checkDonationToggleTarget = function checkDonationToggleTarget() { 66 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; 67 68 if (donationToggleSwitch.checked) { 69 // target 2 70 donationToggleLink2.style.display = "none"; 71 donationToggleLink1.style.display = "block"; 72 } else { 73 // target 1 74 donationToggleLink1.style.display = "none"; 75 donationToggleLink2.style.display = "block"; 76 } 77 }; 78 79 donationToggleSwitch.addEventListener("click", function () { 80 checkDonationToggleTarget(); 81 }); 82 checkDonationToggleTarget(); 83 } 84}); 85"use strict"; 86 87$().ready(function () { 88 var desktopNav = document.querySelector('body > .Header-Section > .container > .desktop-nav'); 89 document.addEventListener("scroll", function (e) { 90 setFixedClassByScrollState(); 91 }); 92 setFixedClassByScrollState(); 93 94 function setFixedClassByScrollState() { 95 if (document.scrollingElement.scrollTop > 39) { 96 desktopNav.classList.add("fixed"); 97 } else { 98 desktopNav.classList.remove("fixed"); 99 } 100 } 101}); 102"use strict"; 103 104$().ready(function () { 105 // Desktop 106 // Main Nav 107 var mainMenuItems = $('.desktop-nav .mainnavigation .menu-item.hasChildren'); 108 var mainSubMenuItems = $('.desktop-nav .mainnavigation .submenu-item.hasChildren'); 109 var mainMenuChilds = $('.desktop-nav .mainnavigation .nav-childlist'); 110 mainMenuItems.hover(function () { 111 var currentItem = $(this); 112 var childList = $('.' + currentItem.data('toggle')); 113 currentItem.children('a').addClass('show'); 114 childList.addClass('show'); 115 }, function () { 116 mainMenuChilds.each(function () { 117 $(this).removeClass('show'); 118 }); 119 var currentItem = $(this); 120 var currentChildList = $('.' + currentItem.data('toggle')); 121 122 if (currentChildList.is(':visible')) { 123 mainMenuItems.children('a').each(function () { 124 $(this).not(currentItem.children('a')).removeClass('show'); 125 }); 126 } else { 127 mainMenuItems.children('a').each(function () { 128 $(this).removeClass('show'); 129 }); 130 } 131 }); 132 mainSubMenuItems.hover(function () { 133 var currentItem = $(this); 134 var childList = $('.' + currentItem.data('toggle')); 135 currentItem.children('a').addClass('show'); 136 childList.addClass('show'); 137 }, function () { 138 mainMenuChilds.each(function () { 139 $(this).removeClass('show'); 140 }); 141 var currentItem = $(this); 142 var currentChildList = $('.' + currentItem.data('toggle')); 143 144 if (currentChildList.is(':visible')) { 145 mainSubMenuItems.children('a').each(function () { 146 $(this).not(currentItem.children('a')).removeClass('show'); 147 }); 148 } else { 149 mainSubMenuItems.children('a').each(function () { 150 $(this).removeClass('show'); 151 }); 152 } 153 }); // Service Nav 154 155 var serviceMenuItems = $('.servicenavigation .menu-item.hasChildren'); 156 var serviceMenuChilds = $('.servicenavigation .nav-childlist'); 157 serviceMenuItems.hover(function () { 158 var currentItem = $(this); 159 var childList = $('.' + currentItem.data('toggle')); 160 currentItem.children('a').addClass('show'); 161 childList.addClass('show'); 162 }, function () { 163 serviceMenuChilds.each(function () { 164 $(this).removeClass('show'); 165 }); 166 var currentItem = $(this); 167 var currentChildList = $('.' + currentItem.data('toggle')); 168 169 if (currentChildList.is(':visible')) { 170 serviceMenuItems.children('a').each(function () { 171 $(this).not(currentItem.children('a')).removeClass('show'); 172 }); 173 } else { 174 serviceMenuItems.children('a').each(function () { 175 $(this).removeClass('show'); 176 }); 177 } 178 }); // Mobile 179 // Menutoggle and DoubleTabToGo 180 181 var mobileMenuToggle = $('#menu-toggle-checkbox'); 182 var mobileNavigation = $('.mobile-nav .mobilenavigation'); 183 mobileNavigation.doubleTapToGo(); 184 mobileMenuToggle.change(function () { 185 mobileNavigation.toggleClass('show', mobileMenuToggle.is(':checked')); 186 }); // init check state on loading 187 188 mobileMenuToggle.trigger('change'); // Menu hover state 189 190 var mobileMainMenuItems = $('.mobile-nav .hasChildren'); 191 mobileMainMenuItems.hover(function () { 192 var currentItem = $(this); 193 var currentChildList = $('.' + currentItem.data('toggle')); 194 currentChildList.addClass('show'); 195 }, function () { 196 var currentItem = $(this); 197 var currentChildList = $('.' + currentItem.data('toggle')); 198 currentChildList.removeClass('show'); 199 }); 200}); 201"use strict"; 202 203$().ready(function () { 204 var pageBrowseSection = $('ul.tx-indexedsearch-browsebox'); 205 pageBrowseSection.each(function (index, element) { 206 // element is one pagination area 207 var pageBrowseList = $(element); 208 var pageBrowseItemPrevious = pageBrowseList.find("li:contains('<')"); 209 pageBrowseItemPrevious.addClass('pagination-button-prev'); 210 pageBrowseItemPrevious.find('a').text(''); 211 var pageBrowseItemNext = pageBrowseList.find("li:contains('>')"); 212 pageBrowseItemNext.addClass('pagination-button-next'); 213 pageBrowseItemNext.find('a').text(''); 214 }); 215}); 216"use strict"; 217 218jQuery(document).ready(function () { 219 // Init 220 new IndexSearchAutoComplete(); 221}); 222 223function IndexSearchAutoComplete() { 224 var debounceTimeout = null; // Used to reduce the amount of querys 225 226 var lastSearchQuery = ''; // Used to reduce the amount of querys 227 // Check whether there is an input box to apply the autocomplete to 228 229 if (jQuery('input.search, input.tx-indexedsearch-searchbox-sword, input.indexed-search-atocomplete-sword, input.indexed-search-autocomplete-sword').length == 0) return; // Initialise the autocomplete 230 231 var that = this; 232 jQuery('input.search, input.tx-indexedsearch-searchbox-sword, input.indexed-search-atocomplete-sword, input.indexed-search-autocomplete-sword').on('keypress keyup', function (e) { 233 that.autocomplete(e, this); 234 }).attr('autocomplete', 'off'); // When a click is performed somewhere on the page, remove the autocomplete-box 235 236 jQuery('*').click(function () { 237 var elem = jQuery(this); 238 var targetClassResults = '.search-autocomplete-results'; 239 var targetClassInput = 'input.search, input.tx-indexedsearch-searchbox-sword, input.indexed-search-atocomplete-sword, input.indexed-search-autocomplete-sword'; 240 241 if (jQuery('.search-autocomplete-results > *').length == 0) { 242 return; // Result-Div is not shown 243 } 244 245 while (elem.prop("tagName") != 'HTML' && !elem.hasClass(targetClassResults)) { 246 elem = elem.parent(); 247 } 248 249 if (elem.prop("tagName") == 'HTML') { 250 jQuery(targetClassResults).html('').hide().removeClass('results').addClass('no-results'); 251 jQuery(targetClassInput).removeClass('results'); 252 } 253 }); 254} 255/** 256 * Autocomplete a query 257 * 258 * @param e jQuery-Event which gets fired in case of a keypress 259 */ 260 261 262IndexSearchAutoComplete.prototype.autocomplete = function (e, ref) { 263 var $input = jQuery(ref); 264 var $elem = jQuery(ref); 265 var $results; // Find the corrosponding div for the results 266 267 var cnt = 0; 268 269 while ($elem.prop("tagName") !== 'HTML') { 270 $results = $elem.find('.search-autocomplete-results'); 271 272 if ($results.length > 0) { 273 break; 274 } 275 276 $elem = $elem.parent(); 277 } 278 279 if ($elem.prop("tagName") === 'HTML') { 280 console.log("we couldn't find a result div (.search-autocomplete-results)"); 281 return; 282 } // Retrive options 283 284 285 var mode = typeof $results.data('mode') === 'undefined' ? 'word' : $results.data('mode'); 286 var soc = $results.data('searchonclick') == true; // navigate through the suggestions/results 287 288 if (e.which === 38 || e.which === 40 || e.keyCode === 10 || e.keyCode === 13) { 289 // up / down / enter 290 if (e.which === 38 && e.type === 'keyup') { 291 // up 292 var $prev = $results.find('li.highlighted').prev(); 293 294 if ($results.find('li.highlighted').length === 0 || $prev.length === 0) { 295 $results.find('li.highlighted').removeClass('highlighted'); 296 $results.find('li').last().addClass('highlighted'); 297 return; 298 } 299 300 $results.find('li.highlighted').removeClass('highlighted'); 301 $prev.addClass('highlighted'); 302 } 303 304 if (e.which === 40 && e.type === 'keyup') { 305 // down 306 var $next = $results.find('li.highlighted').next(); 307 308 if ($results.find('li.highlighted').length === 0 || $next.length === 0) { 309 $results.find('li.highlighted').removeClass('highlighted'); 310 $results.find('li').first().addClass('highlighted'); 311 return; 312 } 313 314 $results.find('li.highlighted').removeClass('highlighted'); 315 $next.addClass('highlighted'); 316 } 317 318 if ((e.keyCode === 10 || e.keyCode === 13) && e.type === 'keypress') { 319 // enter 320 if ($results.is(':visible') && $results.find('li.highlighted').length > 0) { 321 if (mode === 'word') { 322 $results.find('li.highlighted').click(); // Search on click 323 324 if (soc) { 325 $input.closest('form').submit(); 326 } 327 } else { 328 window.location = $results.find('li.highlighted a.navigate-on-enter').attr('href'); 329 } 330 331 e.preventDefault(); 332 } 333 } 334 335 return; 336 } // Catch left / right arrow keys 337 338 339 if (e.keyCode === 37 || e.keyCode === 39) return; // Do only start a query if a key is released to save querys 340 341 if (e.type !== 'keyup') return; // Empty the results 342 343 $results.html('').hide().removeClass('results').addClass('no-results'); 344 $input.removeClass('results'); // Retrive the query 345 346 var val = jQuery(ref).val().trim(); 347 var minlen = typeof $results.data('minlength') === 'undefined' ? 3 : $results.data('minlength'); 348 var maxResults = typeof $results.data('maxresults') === 'undefined' ? 10 : $results.data('maxresults'); // Check if the query is long enough 349 350 if (val.length < minlen) { 351 console.log("not min length, no list"); 352 return; 353 } // Check whether the search term changed 354 355 356 if (val == this.lastSearchQuery) { 357 console.log("val is equal to lastSearchQuery, no list"); 358 return; 359 } // Set the old query value 360 361 362 this.lastSearchQuery = val; // tell the user the search is running 363 364 $results.addClass('autocomplete_searching'); // Perform the query 365 366 this.performQuery(val, mode, maxResults, $results, $input); 367}; 368 369IndexSearchAutoComplete.prototype.performQuery = function (val, mode, maxResults, $results, $input) { 370 // Debounce 371 clearTimeout(this.debounceTimeout); 372 this.debounceTimeout = setTimeout(function () { 373 clearTimeout(this.debounceTimeout); // Execute the query 374 375 jQuery.ajax({ 376 url: $results.data('searchurl'), 377 cache: false, 378 method: 'POST', 379 data: { 380 s: val, 381 m: mode, 382 mr: maxResults 383 }, 384 success: function success(data) { 385 // Insert the results 386 var $li = $results.show().html(data).removeClass('autocomplete_searching').find('li'); // Add a click action 387 388 $li.click(function () { 389 $input.val(jQuery(this).text().trim()); 390 $results.html('').hide(); 391 $input.removeClass('results'); 392 }); // Check if there are results and update the FE depending on it 393 394 if ($li.length == 0) { 395 // No results 396 $results.html('').hide(); 397 $results.removeClass('results').addClass('no-results'); 398 $input.removeClass('results'); 399 } else { 400 // Results 401 $results.removeClass('no-results').addClass('results'); 402 $input.addClass('results'); 403 } 404 } 405 }); 406 }, 250); 407}; 408"use strict"; 409 410$().ready(function () {
411 var backgroundMediaVideo = document.querySelector('.Background_Media_Video'); 412 var backgroundMediaFallback = document.querySelector('.Background_Media_Fallback'); 413 var isMobile = { 414 Android: function Android() { 415 return navigator.userAgent.match(/Android/i); 416 }, 417 BlackBerry: function BlackBerry() { 418 return navigator.userAgent.match(/BlackBerry/i); 419 }, 420 iOS: function iOS() { 421 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 422 }, 423 Opera: function Opera() { 424 return navigator.userAgent.match(/Opera Mini/i); 425 }, 426 Windows: function Windows() { 427 return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i); 428 }, 429 any: function any() { 430 return Boolean(isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); 431 } 432 }; // if fall back exists and is mobile 433 434 if (backgroundMediaFallback != undefined && isMobile.any()) { 435 // then show fallback (will be initial) but make sure 436 backgroundMediaFallback.classList.remove('d-none'); // check if video exists, then show 437 438 if (backgroundMediaVideo != undefined) { 439 backgroundMediaVideo.classList.add('d-none'); 440 } 441 } 442 443 if (!isMobile.any()) { 444 // is Desktop, show video 445 // check if Fallback exists and is shown, then hide 446 if (backgroundMediaFallback != undefined) { 447 backgroundMediaFallback.classList.add('d-none'); 448 } // check if video exists, then show 449 450 451 if (backgroundMediaVideo != undefined) { 452 backgroundMediaVideo.classList.remove('d-none'); 453 } 454 } 455}); 456"use strict"; 457 458$().ready(function () { 459 var onineMediaElements = $('.online-media'); 460 461 if (localStorage.getItem('allow_external_video') !== null) { 462 activateIFrames(); 463 } else { 464 onineMediaElements.each(function (index, element) { 465 $(element).find('a').click(function (event) { 466 localStorage.setItem('allow_external_video', true); 467 activateIFrames(); 468 }); 469 }); 470 } 471 472 function activateIFrames() { 473 onineMediaElements.each(function (index, element) { 474 var videoWrapper = $(element).closest('.online-media'); 475 var iframe = videoWrapper.find('iframe'); 476 iframe.addClass('video-embed-item responsive-video'); 477 videoWrapper.replaceWith(iframe); 478 iframe.attr('src', iframe.data('src')); 479 iframe.removeAttr('data-src'); 480 }); 481 } 482}); 483"use strict"; 484 485$().ready(function () { 486 var searchOpenToggle = $('.Search-Open-Toggle'); 487 var searchCloseToggle = $('.Search-Close-Toggle'); 488 var searchOverlay = $('.Search-Overlay'); 489 searchOpenToggle.click(function () { 490 searchOverlay.addClass('show'); 491 }); 492 searchCloseToggle.click(function () { 493 searchOverlay.removeClass('show'); 494 }); 495}); 496"use strict"; 497 498$().ready(function () { 499 // init Swiper: 500 var swiper = { 501 newsListViewSwiper: new Swiper('.news-list-view.swiper-container', { 502 slidesPerView: '1', 503 spaceBetween: 30, 504 breakpoints: { 505 992: { 506 slidesPerView: 2 507 }, 508 1340: { 509 slidesPerView: 3 510 } 511 }, 512 centeredSlides: false, 513 navigation: { 514 nextEl: '.swiper-button-next', 515 prevEl: '.swiper-button-prev' 516 }, 517 watchOverflow: true, 518 watchSlidesVisibility: true 519 }), 520 newsDetailViewSwiper: new Swiper('.news-detail-view.swiper-container', { 521 slidesPerView: '1', 522 spaceBetween: 30, 523 breakpoints: { 524 992: { 525 slidesPerView: 2 526 }, 527 1340: { 528 slidesPerView: 3 529 } 530 }, 531 centeredSlides: false, 532 navigation: { 533 nextEl: '.swiper-button-next', 534 prevEl: '.swiper-button-prev' 535 }, 536 watchOverflow: true, 537 watchSlidesVisibility: true 538 }), 539 eventListViewSwiper: new Swiper('.event-list-view.swiper-container', { 540 slidesPerView: '1', 541 spaceBetween: 30, 542 breakpoints: { 543 992: { 544 slidesPerView: 2 545 } 546 }, 547 centeredSlides: false, 548 navigation: { 549 nextEl: '.swiper-button-next', 550 prevEl: '.swiper-button-prev' 551 }, 552 watchOverflow: true, 553 watchSlidesVisibility: true 554 }),
555 eventDetailViewSwiper: new Swiper('.event-detail-view.swiper-container', { 556 slidesPerView: '1', 557 spaceBetween: 30, 558 breakpoints: { 559 992: { 560 slidesPerView: 2 561 } 562 }, 563 centeredSlides: false, 564 navigation: { 565 nextEl: '.swiper-button-next', 566 prevEl: '.swiper-button-prev' 567 }, 568 watchOverflow: true, 569 watchSlidesVisibility: true 570 }) 571 }; // check if slider is the first child of grid column, then add a class to handler slider is moving up 572 573 $.each(swiper, function (index, value) { 574 // this = value 575 if (this.hasOwnProperty('initialized')) { 576 var element = $(this.el); 577 var elementParentFrame = element.closest('.frame'); 578 var frameParentColumn = elementParentFrame.parent(); 579 var frameParentRow = elementParentFrame.closest('.grid-content'); 580 581 if (frameParentColumn.children().index(elementParentFrame) == 0) { 582 // is the first child of this parent column 583 frameParentRow.addClass('slider-is-first-child'); // add padding right to the grid container because of slider navigation overlay 584 585 frameParentRow.siblings('.grid-header').addClass('padding-for-slider'); 586 } 587 } 588 }); 589}); 590"use strict"; 591 592$().ready(function () { 593 var vmap_germany; 594 var vmap_germany_selector = $('#vmap_germany'); 595 var excludedCodes = []; 596 var linkMapping = new Map(); 597 linkMapping.set('sh', 'https://sdw-sh.de/'); // schleswig holstein 598 599 linkMapping.set('hh', 'https://www.sdw-hamburg.de/'); // hamburg 600 601 linkMapping.set('mv', 'https://www.sdw-mv.de/'); // mecklenburg vorpommern 602 603 linkMapping.set('hb', 'http://sdw-nds.de/'); // bremen 604 605 linkMapping.set('ni', 'http://sdw-nds.de/'); // niedersachsen 606 607 linkMapping.set('st', 'http://sdw-sa.de/'); // sachsen anhalt 608 609 linkMapping.set('bb', 'https://www.sdw-brandenburg.de/'); // brandenburg 610 611 linkMapping.set('be', 'http://waldinberlin.de/'); // berlin 612 613 linkMapping.set('nw', 'http://sdw-nrw.de/'); // nordrhein westfalen 614 615 linkMapping.set('he', 'https://sdwhessen.de/'); // hessen 616 617 linkMapping.set('th', 'https://www.sdw-thueringen.de/'); // thüringen 618 619 linkMapping.set('sn', 'http://sdw-sachsen.de/'); // sachsen 620 621 linkMapping.set('rp', 'https://www.sdw-rlp.de/index.php?sdw'); // rheinland pfalz 622 623 linkMapping.set('by', 'https://www.sdw-bayern.de/'); // bayern 624 625 linkMapping.set('bw', 'https://www.sdw-bw.de/'); // baden würtemberg 626 627 linkMapping.set('sl', 'https://sdw-saar.de/'); // saarland 628 629 if ($.fn.vectorMap) { 630 // vectorMap is loaded and available 631 var getPinLabels = function getPinLabels() { 632 // get path data for given map 633 var mapData = JQVMap.maps['germany_en']; 634 var newPinTextMapping = Object.create(null); 635 linkMapping.forEach(function (value, code) { 636 // gets 'Hamburg' for key 'hh' 637 // exception for Bremen since the name should not appear on map 638 if (code != 'hb') { 639 newPinTextMapping[code] = mapData.paths[code].name; 640 } else { 641 newPinTextMapping[code] = ' '; 642 } 643 }, linkMapping); // set new Pins 644 645 return newPinTextMapping; 646 }; 647 648 var newPins = getPinLabels(); 649 650 JQVMap.prototype.resize = function () { 651 // reset possible width and height 652 this.width = this.container.parent().width(); // reset container height based on default aspect ratio 653 654 this.height = this.width * this.defaultHeight / this.defaultWidth; 655 this.container.css("width", this.width + "px"); 656 this.container.css("height", this.height + "px"); 657 var curBaseScale = this.baseScale; 658 659 if (this.width / this.height > this.defaultWidth / this.defaultHeight) { 660 this.baseScale = this.height / this.defaultHeight; 661 this.baseTransX = Math.abs(this.width - this.defaultWidth * this.baseScale) / (2 * this.baseScale); 662 } else { 663 this.baseScale = this.width / this.defaultWidth; 664 this.baseTransY = Math.abs(this.height - this.defaultHeight * this.baseScale) / (2 * this.baseScale); 665 } 666 667 this.scale *= this.baseScale / curBaseScale; 668 this.transX *= this.baseScale / curBaseScale; 669 this.transY *= this.baseScale / curBaseScale; 670 }; 671 672 VectorCanvas.prototype.applyTransformParams = function (scale, transX, transY) { 673 if (this.mode === 'svg') { 674 this.rootGroup.setAttribute('transform', 'scale(' + scale + ') translate(' + transX + ', ' + transY + ')'); 675 } else { 676 this.rootGroup.coordorigin = this.width - transX + ',' + (this.height - transY); 677 this.rootGroup.coordsize = this.width / scale + ',' + this.height / scale; 678 } 679 }; 680 681 JQVMap.prototype.placePins = function (pins, pinMode) { 682 var map = this; 683
684 if (!pinMode || pinMode !== 'content' && pinMode !== 'id') { 685 pinMode = 'content'; 686 } 687 688 if (pinMode === 'content') { 689 //treat pin as content 690 jQuery.each(pins, function (index, pin) { 691 if (jQuery('#' + map.getCountryId(index)).length === 0) { 692 return; 693 } 694 695 if (newPins[index]) { 696 pin = newPins[index]; 697 } 698 699 var pinIndex = map.getPinId(index); 700 var $pin = jQuery('#' + pinIndex); 701 702 if ($pin.length > 0) { 703 $pin.remove(); 704 } // theses lines places the pins on the map 705 706 707 if (jQuery.inArray(index, excludedCodes) === -1) { 708 map.container.append('<div id="' + pinIndex + '" for="' + index + '" class="jqvmap-pin" style="position:absolute">' + pin + '</div>'); 709 } 710 }); 711 } else { 712 //treat pin as id of an html content 713 jQuery.each(pins, function (index, pin) { 714 if (jQuery('#' + map.getCountryId(index)).length === 0) { 715 return; 716 } 717 718 var pinIndex = map.getPinId(index); 719 var $pin = jQuery('#' + pinIndex); 720 721 if ($pin.length > 0) { 722 $pin.remove(); 723 } // theses lines places the pins on the map 724 725 726 if (jQuery.inArray(code, excludedCodes) > -1) { 727 map.container.append('<div id="' + pinIndex + '" for="' + index + '" class="jqvmap-pin" style="position:absolute"></div>'); 728 $pin.append(jQuery('#' + pin)); 729 } 730 }); 731 } 732 733 this.positionPins(); 734 735 if (!this.pinHandlers) { 736 this.pinHandlers = true; 737 738 var positionFix = function positionFix() { 739 map.positionPins(); 740 }; 741 742 this.container.bind('zoomIn', positionFix).bind('zoomOut', positionFix).bind('drag', positionFix); 743 } 744 }; 745 746 vmap_germany_selector.vectorMap({ 747 map: 'germany_en', 748 enableZoom: false, 749 showTooltip: false, 750 showLabels: true, 751 backgroundColor: 'transparent', 752 color: '#F7F8E5', 753 selectedColor: '#F7F8E5', 754 hoverColor: '#84A311', 755 borderColor: '#A9BDCA', 756 borderOpacity: 1, 757 borderWidth: 1, 758 onRegionClick: function onRegionClick(element, code, region) { 759 if (jQuery.inArray(code, excludedCodes) !== -1) { 760 return; 761 } 762 763 var link = linkMapping.get(code); 764 window.open(link, '_blank'); 765 } 766 }); 767 } 768});
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.