Planta árboles | Wilderness International window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('consent', 'default', { ad_storage: 'denied', analytics_storage: 'denied', wait_for_update: 1500 //milliseconds }); gtag('set', 'ads_data_redaction', true); (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-WTK5JPV'); document.addEventListener("DOMContentLoaded", function(e) { var contactFooter = document.getElementById('7549d590-0f72-4009-9c77-3ed01ccd6570'); if (contactFooter) { contactFooter.addEventListener('click', function(event) { event.preventDefault(); if (window && window['Beacon']) { window['Beacon']('open'); window['Beacon']('navigate', '/ask/message'); } }) } const cookieFirstMenu = document.getElementById('02ddd074-3fab-43ee-9e74-7f99678f3706'); if (cookieFirstMenu) { cookieFirstMenu.addEventListener('click', function(event) { event.preventDefault(); CookieFirst.openPanel("settings"); }) } var btnCopyLink = document.getElementById('icon-copy'); if (btnCopyLink) { btnCopyLink.addEventListener('click', function() { navigator.clipboard.writeText(window.location.href).then(() => { var tooltip = document.getElementById("myTooltip"); tooltip.innerHTML = "Copied!"; }); }) } var btnSocials = document.getElementsByClassName('social-share'); if (btnSocials) { for (var i = 0; i < btnSocials.length; i++) { if (btnSocials[i].getAttribute('id') && btnSocials[i].getAttribute('id') === 'btn-whatsapp') { var isMobilePlatform = /(android|iphone|ipad|mobile)/i.test(navigator.userAgent); var hrefWhatsapp = 'https://' + (isMobilePlatform ? 'api' : 'web') + '.whatsapp.com/send?text='; btnSocials[i].setAttribute("href", hrefWhatsapp + window.location.href); } else { var dataHref = btnSocials[i].getAttribute('data-href'); btnSocials[i].setAttribute("href", dataHref + window.location.href); } } } }); Weglot.initialize({ api_key: 'wg_b35bba4d28c48998ac575eb47ff70a111', hide_switcher: true }); Weglot.on("initialized", function() { var selectLanguage = document.getElementById("abw_language_select"); initialLanguageList(selectLanguage); selectLanguage.onchange = function() { Weglot.switchTo(this.value); selectLanguage.innerHTML = ""; initialLanguageList(selectLanguage); }; }); const initialLanguageList = function(selectLanguage) { var availableLanguages = ["es","en","de"]; const currentLanguages = Weglot.options.languages; if (currentLanguages) { availableLanguages = currentLanguages.map((language) => language.language_to) .concat(Weglot.options.language_from); } const currentLang = Weglot.getCurrentLang(); for (var i = 0; i < availableLanguages.length; i++) { const lang = availableLanguages[i]; var option = document.createElement("option"); option.value = lang; option.text = Weglot.getLanguageName(lang); if (lang === currentLang) { option.selected = "selected"; } selectLanguage.appendChild(option); } }