PageSourceSearch

https://collaborativeconservation.org/wp-content/themes/csu-theme/assets/js/script-v3.min.js

js collaborativeconservation.org collected 2026-09-26 00:17:48 UTC 21,585 bytes, 2 lines download raw bytes

1var body=document.body,overlay,megamenu,menubtn,sidenavbar,modalsearch,searchbtn,searchinput;function checkScroll(){window.scrollY>10?document.body.classList.add("scrollactive"):document.body.classList.remove("scrollactive")}function getHeaderPosition(){var header,top=document.querySelector("#mainheader").getBoundingClientRect().top;top>32?document.documentElement.style.setProperty("--headertop",top+"px"):(top=32,document.documentElement.style.setProperty("--headertop","32px"))}function cloneImages(el){if(!body.classList.contains("elementor-editor-active")){var tabs=el.querySelectorAll(".elementor-tab-content"),images=el.querySelectorAll(".elementor-widget-image img");tabs.forEach((function(tab,index){var image=images[index].cloneNode(!0),div=document.createElement("div");div.classList.add("tab-image"),div.appendChild(image),tab.appendChild(div)}))}}function escapeActions(evt){"Escape"==(evt=evt||window.event).key&&(megamenu.classList.contains("active")&&(toggleMegaMenu(),menubtn.focus()),modalsearch.classList.contains("active")&&(toggleSearch(),searchbtn.focus()),navToggle(),closeDropdowns())}function closeMegaMenuItems(){var accordions;document.querySelectorAll(".megamenu .e-n-tab-title").forEach(accordion=>{"true"===accordion.getAttribute("aria-selected")&&accordion.click()})}function toggleSearch(e){searchinput=modalsearch.querySelector("input.gsc-input"),megamenu.classList.contains("active")&&toggleMegaMenu(),void 0!==e&&e.preventDefault();var mobile=!1;window.innerWidth<992&&(mobile=!0),modalsearch.classList.contains("active")?(modalsearch.classList.remove("active"),searchbtn.classList.remove("active"),sidenavbar.classList.remove("active")):(!0===mobile?setTimeout((function(){modalsearch.classList.add("active"),searchbtn.classList.add("active"),sidenavbar.classList.add("active")}),100):(modalsearch.classList.add("active"),searchbtn.classList.add("active"),sidenavbar.classList.add("active")),searchinput.focus())}function toggleMegaMenu(e){modalsearch.classList.contains("active")&&toggleSearch(),void 0!==e&&e.preventDefault();var mobile=!1;window.innerWidth<992&&(mobile=!0),megamenu.classList.contains("active")?(megamenu.classList.remove("active"),menubtn.classList.remove("active"),sidenavbar.classList.remove("active")):!0===mobile?setTimeout((function(){megamenu.classList.add("active"),menubtn.classList.add("active"),sidenavbar.classList.add("active")}),100):(megamenu.classList.add("active"),menubtn.classList.add("active"),sidenavbar.classList.add("active"))}window.addEventListener("scroll",(function(){checkScroll()})),checkScroll(),document.addEventListener("DOMContentLoaded",(function(){var over=document.createElement("div");over.classList.add("overlay"),document.body.appendChild(over),overlay=document.querySelector(".overlay")})),enterDom(".wc-toggle-wrap",(function(el){cloneImages(el)})),enterDom(".elementor-element-edit-mode.elementor-widget-accordion",(function(el){setTimeout((function(){el.click(),el.querySelector(".elementor-tab-title").click()}),500)})),enterDom(".wc-expanding-links .elementor-tab-title",(function(el){var parent;el.closest(".elementor-accordion").setAttribute("role","tablist"),el.setAttribute("role","tab"),el.addEventListener("click",(function(e){el.classList.contains("elementor-active")&&e.stopImmediatePropagation();var tab=el.getAttribute("data-tab"),images=document.querySelectorAll(".wc-expanding-links .elementor-widget-image"),image=images[tab-1];images.forEach(image=>image.classList.remove("active")),images.forEach(image=>image.setAttribute("data-active","false")),image.classList.add("active"),image.setAttribute("data-active","true"),image.setAttribute("data-tab",tab)}))})),enterDom(".wc-expanding-links :not(.elementor-widget-image) + .elementor-widget-image",(function(el){el.setAttribute("data-active","true"),el.classList.add("active")})),document.addEventListener("DOMContentLoaded",(function(){megamenu=document.querySelector(".megamenu"),(sidenavbar=document.querySelector(".sidenavbar"))?(menubtn=sidenavbar.querySelector(".btn--menu"),searchbtn=sidenavbar.querySelector(".btn--search")):(menubtn=null,
1searchbtn=null),modalsearch=document.querySelector(".modal-search"),null!==menubtn&&menubtn.addEventListener("click",(function(e){toggleMegaMenu(e)})),null!==searchbtn&&searchbtn.addEventListener("click",(function(e){console.log("searchbtn clicked"),toggleSearch(e)})),window.innerWidth<992&&setTimeout((function(){closeMegaMenuItems()}),500)})),document.addEventListener("DOMContentLoaded",(function(){overlay.addEventListener("click",(function(e){megamenu.classList.contains("active")&&toggleMegaMenu()}))})),enterDom("td.gsc-input",(function(el){var input=el.querySelector("input#gsc-i-id1.gsc-input");function removeGoogleEvents(input){input.onkeydown=function(e){"Escape"==e.key&&(e.stopImmediatePropagation(),modalsearch.classList.contains("active")&&(toggleSearch(),searchbtn.focus()))}}setTimeout((function(){removeGoogleEvents(input)}),100)})),document.onkeydown=escapeActions,enterDom(".modal-search .gsc-control-cse input.gsc-input",(function(el){el.setAttribute("placeholder","Search")})),enterDom(".search-panel",(function(el){var ps=new PerfectScrollbar(el,{wheelSpeed:2,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0})})),enterDom(".megamenu .e-n-tab-title[data-link]",(function(el){var link=el.getAttribute("data-link");el.setAttribute("href",link),el.addEventListener("click",(function(e){e.preventDefault(),e.stopImmediatePropagation(),location.href=link})),el.removeAttribute("aria-controls"),el.removeAttribute("role"),el.removeAttribute("tabindex"),el.removeAttribute("aria-selected")})),enterDom('.megamenu [role="tabpanel"]',(function(el){var tabId,tabNum=el.getAttribute("id").match(/\d+/)[0],button=document.createElement("button");button.classList.add("btn-back"),button.innerHTML="back",el.prepend(button);var tabID="#e-n-tab-title-"+tabNum,tabItem=document.querySelector(tabID);button.addEventListener("click",(function(e){e.preventDefault(),tabItem&&tabItem.click()})),el.classList.contains("e-active")&&window.innerWidth<992&&setTimeout((function(){tabItem.click()}),300);var ps=new PerfectScrollbar(el,{wheelSpeed:2,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0})})),function(){let isOnPageLoad=!0;window.addEventListener("load",()=>{setTimeout(()=>{isOnPageLoad=!1},100)}),document.querySelector(".elementor-editor-active")||document.querySelectorAll(".megamenu .e-n-tab-title").forEach(tabTitle=>{tabTitle.addEventListener("click",(function(){isOnPageLoad||"true"===this.getAttribute("aria-selected")&&setTimeout(()=>{const tabId=this.getAttribute("aria-controls"),tabContent=document.getElementById(tabId);tabContent&&(tabContent.style.display="none",tabContent.classList.remove("e-active")),this.setAttribute("aria-selected","false")},30)}))})}(),enterDom(".megamenu .e-n-tabs-heading, .megamenu .wc-stack-menu .elementor-widget-text-editor",(function(el){var div=document.createElement("div"),ps;div.classList.add("scrollwrap"),el.parentNode.insertBefore(div,el),div.appendChild(el),new PerfectScrollbar(el,{wheelSpeed:2,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0}).update()}));var host=window.location.host;function formatEventDate(el){let dateContent=el.textContent,[month,dayNum,dayText]=dateContent.split(","),formattedDate=`\n        <span class="month">${month}</span>\n        <span class="day-num">${dayNum}</span>\n        <span class="day-text">${dayText}</span>\n    `;el.innerHTML=formattedDate}function getQueryParam(param){const urlParams=new URLSearchParams(window.location.search);return urlParams.get(param)}function navToggle(){var toggle;document.body.classList.contains("nav-active")&&document.querySelector(".c-hamburger").click()}function handleFirstTab(e){9===e.keyCode&&(document.body.classList.add("user-is-tabbing"),window.removeEventListener("keydown",handleFirstTab),window.addEventListener("mousedown",handleMouseDownOnce))}function handleMouseDownOnce(){document.body.classList.remove("user-is-tabbing"),window.removeEventListener("mousedown",handleMouseDownOnce),window.addEventListener("keydown",handleFirstTab)}function closeDropdowns(){$activeMenu=$("#mainheader .sub-menu.active"),$activeMenu.removeClass("active"),$activeMenu.parent().removeClass("active"),$activeMenu.siblings("a").attr("aria-expanded","fal
1se")}function addVideoPauseButton(el){const pauseButton=document.createElement("button");pauseButton.textContent="Pause Slideshow",pauseButton.setAttribute("aria-pressed","false"),pauseButton.setAttribute("aria-label","Pause background video"),pauseButton.setAttribute("role","button"),pauseButton.classList.add("wc-video-pause-btn"),el.appendChild(pauseButton)}enterDom(".megamenu .wc-stack-menu a",(function(el){var linkHost;new URL(el.href).host!==host&&el.classList.add("wc-external-link")})),enterDom("a[data-image]",(function(el){var image=el.getAttribute("data-image"),image_md=el.getAttribute("data-image-medium");el.style.setProperty("--image-icon","url("+image+")"),el.style.setProperty("--image-medium","url("+image_md+")")})),enterDom(".wc-event .eventdate",(function(el){formatEventDate(el)})),enterDom('a > i[aria-hidden="true"]:only-child',(function(el){var parentElement=el.parentNode,text;""==[].reduce.call(parentElement.childNodes,(function(a,b){return a+(3===b.nodeType?b.textContent:"")}),"").trim()&&(el.parentNode.setAttribute("aria-hidden","true"),el.parentNode.setAttribute("tabindex","-1"))})),enterDom(".menu-item-has-children > a",(function(el){el.setAttribute("aria-expanded","false")})),document.addEventListener("DOMContentLoaded",(function(){jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/loop-carousel.post",(function($scope,$){if($scope.closest(".wc-students").length)var $carousel=$scope.find(".swiper.elementor-loop-container"),elementId=$scope.data("id"),checkSwiper=setInterval((function(){var swiperInstance=$carousel.data("swiper");swiperInstance&&(clearInterval(checkSwiper),swiperInstance.params.touchRatio=0,swiperInstance.params.simulateTouch=!1,swiperInstance.params.allowTouchMove=!1,swiperInstance.params.keyboard.enabled=!1,swiperInstance.update(),$carousel.on("mousedown touchstart",(function(e){return e.preventDefault(),e.stopPropagation(),!1})))}),100)}))}))})),enterDom(".wc-student",(function(el){el.onclick=function(){el.classList.toggle("wc-student-active")}})),$(document).ready((function($){$(".popup-vimeo a").magnificPopup({type:"iframe",mainClass:"mfp-fade",removalDelay:160,preloader:!1,fixedContentPos:!1}),$("body").on("click",'a[href*="youtube.com/watch?v="], a[href*="youtu.be/"]',(function(e){return e.preventDefault(),e.stopImmediatePropagation(),$(this).magnificPopup({type:"iframe",iframe:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:function(url){var matches;return(/v=([^&]+)/gi.exec(url)||[])[1]},src:"//www.youtube.com/embed/%id%?autoplay=1&rel=0"},youtubeshort:{index:"youtu.be/",id:function(url){var slashPos=url.lastIndexOf("/"),vidId;return url.substr(slashPos)},src:"//www.youtube.com/embed/%id%?autoplay=1"}},srcAction:"iframe_src"}}).magnificPopup("open"),!1}))})),enterDom("table.dataTable",(function(el){el.parentElement.classList.add("tablepress")})),document.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){var tdPhone;document.querySelectorAll("table.dataTable td").forEach((function(td){td.textContent.match(/^\(970\)/)&&td.classList.add("tablepress-phone")}))}),500)})),enterDom(".entry-title",(function(el){window.location.href.indexOf("/a-z/")>-1&&document.body.classList.add("a-z")})),document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("table th").forEach(th=>{th.setAttribute("tabindex","0")})})),document.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){var tdPhone;document.querySelectorAll("table.dataTable td").forEach((function(td){td.textContent.match(/^\(970\)/)&&td.classList.add("tablepress-phone")}))}),500)})),document.addEventListener("DOMContentLoaded",(function(){"modal"===getQueryParam("resource")&&setTimeout((function(){searchbtn.click(),window.history.replaceState({},document.title,window.location.pathname)}),100)})),window.addEventListener("keydown",handleFirstTab),function($){console.log("v2")}(jQuery),function($){var tabkey=9,$body=$("body"),$html=$("html"),$nav=$("#mainheader .nav-component"),$navlist=$("#mainheader nav ul").first(),$navtoggle=$("#mainheader .nav-toggle");function touch_setup(){}window.addEventListener("touchstart",(function onFirstTouch(){document.body.classList.add("touching"),window.touching=!0,window.removeEventListener("touchstart",onFirstTouch,!1)}),!1),$('#mainheader nav a[href][href!="#"][href!=""]:not([href^=" "]) + ul').prev().addClass("doublelink"),$('#mainheader nav a[href][href!="#"][href!=""]:not([href^=" "]) + ul').each((function(){var a="<li class='generated-link'><a href='"+$(this).prev().attr("href")+"'>"+$(this).prev().text()+"</a></li>";$(this).prepend(a)}));var $dropdown=$("#mainheader nav ul li a:not(:only-child)"),$dropdownListItem=$dropdown.parent();function offCanvasCheck(el){if(el.hasClass("off-canvas-nav-left"))return"off-canvas-nav-left"}$dropdownListItem.on("mouseenter",(function(e){var $child;$(this).find(">a:not(:only-child)").trigger("click")})),$dropdownListItem.on("mouseleave",(function(e){var $child=$(this).find(">a:not(:only-child)");$child.siblings(".sub-menu").hasClass("active")&&$child.trigger("click")})),$dropdown.on("click",(function(e){$("body").hasClass("mobile")||(e.preventDefault(),e.stopPropagation(),$this=$(this),$this.parent().toggleClass("active"),$this.siblings(".sub-menu").toggleClass("active"),"true"==$this[0].ariaExpanded?$this[0].ariaExpanded="false":$this[0].ariaExpanded="true",$others=$(".
1sub-menu").not($this.siblings()),$others.parent().removeClass("active"),$others.removeClass("active"),$others.siblings("a").attr("aria-expanded","false"))})),$html.on("click",(function(e){closeDropdowns()})),$body.append('<div class="nav-overlay"></div>'),$(".nav-overlay").on("click",(function(){$navlist.removeClass("active"),$nav.find("nav > ul, .nav-toggle").removeClass("active"),$body.removeClass("active"),$html.removeClass("active")})),$navtoggle.on("click",(function(e){e.preventDefault(),e.stopPropagation(),$(this).toggleClass("active");var target=$(this).data("target");target?$("#"+target).find("nav > ul").toggleClass("active"):$(this).parent().parent().find("nav >ul.nav-list").toggleClass("active"),$body.toggleClass("nav-active")}))}(jQuery),enterDom(".e-parent, .e-child",(function(el){const styles=getComputedStyle(el),flexWrapVar=styles.getPropertyValue("--flex-wrap").trim();"wrap"===flexWrapVar&&el.classList.add("wc-container-wrap"),el.classList.contains("e-parent")&&el.parentElement.closest(".e-parent")&&el.classList.add("e-child-parent")})),enterDom('iframe[src*="genially"]',(function(el){el.setAttribute("aria-label","Genially interactive content")})),enterDom("a.elementor-icon > i",(function(el){const platform=el.className.match(/fa-(facebook|instagram|twitter|youtube|linkedin)/);if(platform){const platformName=platform[1].charAt(0).toUpperCase()+platform[1].slice(1);el.parentNode.setAttribute("aria-label",`Link to ${platformName}`)}else el.parentNode.setAttribute("aria-label","Icon link")})),enterDom(":is(h1,h2,h3,h4,h5,h6,table)",(function(el){0===el.children.length&&""===el.textContent.replace(/\u00A0/g,"").trim()&&el.setAttribute("aria-hidden","true")})),document.addEventListener("DOMContentLoaded",(function(){setTimeout((function(){document.querySelectorAll("table.tablepress thead tr").forEach(row=>{row.querySelectorAll("td").forEach(td=>{td.textContent.trim()||td.setAttribute("aria-hidden","true")}),row.querySelectorAll("th").forEach(th=>{th.hasAttribute("scope")||th.setAttribute("scope","col"),th.textContent.trim()||th.setAttribute("aria-hidden","true")})})}),200);const otherTextInputs=document.querySelectorAll('input[type="radio"] + input[value="Other"]');otherTextInputs.forEach((function(textInput){const radioInput=textInput.previousElementSibling,wrapper=textInput.closest("li");if(radioInput&&!document.querySelector('label[for="'+radioInput.id+'"]')){const radioLabel=document.createElement("label");radioLabel.setAttribute("for",radioInput.id),radioLabel.className="sr-only",radioLabel.textContent="Other",wrapper.insertBefore(radioLabel,radioInput)}if(!document.querySelector('label[for="'+textInput.id+'"]')){const textLabel=document.createElement("label");textLabel.setAttribute("for",textInput.id),textLabel.className="sr-only",textLabel.textContent="Please specify other option",wrapper.insertBefore(textLabel,textInput)}}));const oembedProviders=[{name:"Vimeo",match:src=>src.includes("vimeo.com/video/"),buildOEmbedUrl:src=>{const videoUrl=src.split("?")[0].replace("player.","").replace("/video/","/");return`https://vimeo.com/api/oembed.json?url=${encodeURIComponent(videoUrl)}`}},{name:"YouTube",match:src=>src.includes("youtube.com/embed/"),buildOEmbedUrl:src=>{const match=src.match(/youtube\.com\/embed\/([a-zA-Z0-9_-]+)/);if(!match)return null;const videoUrl=`https://www.youtube.com/watch?v=${match[1]}`;return`https://www.youtube.com/oembed?url=${encodeURIComponent(videoUrl)}&format=json`}},{name:"Spotify",match:src=>src.includes("open.spotify.com/embed/"),buildOEmbedUrl:src=>{const baseUrl=src.split("?")[0].replace("/embed/","/");return`https://open.spotify.com/oembed?url=${encodeURIComponent(baseUrl)}`}},{name:"SoundCloud",match:src=>src.includes("w.soundcloud.com/player"),buildOEmbedUrl:src=>{const urlMatch=src.match(/[?&]url=([^&]+)/);if(!urlMatch)return null;const trackUrl=decodeURIComponent(urlMatch[1]);return`https://soundcloud.com/oembed?format=json&url=${encodeURIComponent(trackUrl)}`}}];document.querySelectorAll("iframe").forEach(iframe=>{const src=iframe.src;for(const provider of oembedProviders)if(provider.match(src)){const oembedUrl=provider.buildOEmbedUrl(src);if(!oembedUrl)continue;fetch(oembedUrl).then(res=>res.json()).then(data=>{data.title&&(iframe.setAttribute("title",data.title),iframe.setAttribute("aria-label",data.title))}).catch(err=>{console.warn(`${provider.name} oEmbed failed:`,err)});break}}),document.querySelectorAll("a[href]").forEach((function(a){a.getAttribute("href").trim()||a.setAttribute("aria-hidden","true")})),document.querySelectorAll('a[href^="#"]').forEach((function(a){const children=a.children,isIconOnly=1===children.length&&"i"===children[0].tagName.toLowerCase()&&""===a.textContent.trim(),hash=a.getAttribute("href");isIconOnly&&hash.length>1&&a.setAttribute("aria-label",hash.substring(1))})),document.querySelectorAll(".elementor-widget-icon-box").forEach((function(box){const description=box.querySelector(".elementor-icon-box-description"),link=box.querySelector("a");if(description&&link){const text=description.textContent.trim();text&&link.setAttribute("aria-label",text)}}
1))})),enterDom('[data-elementor-type="wp-page"]',(function(container){const imageSelectors=["img"],headingSelector=["h1","h2","h3","h4","h5","h6",".no-gap",".stretch",".wc-container-wide"],images=Array.from(container.querySelectorAll(imageSelectors.join(", "))),headings=Array.from(container.querySelectorAll(headingSelector.join(", "))),allElements=Array.from(container.querySelectorAll([...imageSelectors,...headingSelector]));for(let el of allElements){if(headings.includes(el))break;if(images.includes(el)){container.classList.add("wc-add-space");break}}})),document.addEventListener("DOMContentLoaded",(function(){const videobg=document.querySelectorAll(".wc-video-bg");videobg.forEach(el=>{addVideoPauseButton(el)})}));let hasInitializedVideoControls=!1;function initVideoControls(){if(hasInitializedVideoControls)return;hasInitializedVideoControls=!0;const containers=document.querySelectorAll(".wc-video-bg");containers.forEach((container,index)=>{const iframe=container.querySelector("iframe"),button=container.querySelector(".wc-video-pause-btn");if(!iframe||!button)return void console.warn(`Video BG Container ${index}: Missing iframe or button`);const src=iframe.src;if(src.includes("vimeo.com")){console.log(`Container ${index}: Initializing Vimeo player`);const vimeoPlayer=new Vimeo.Player(iframe);button.addEventListener("click",()=>{console.log(`Vimeo clicked [${index}]`);const isPaused="false"===button.getAttribute("aria-pressed");isPaused?(vimeoPlayer.pause(),button.setAttribute("aria-pressed","true")):(vimeoPlayer.play(),button.setAttribute("aria-pressed","false"))})}else console.warn(`Container ${index}: Unknown iframe source`)})}function bindYouTubeToggleButtons(){const containers=document.querySelectorAll(".wc-video-bg");containers.forEach((container,index)=>{const iframe=container.querySelector('iframe[src*="youtube.com/embed"]'),button=container.querySelector(".wc-video-pause-btn");iframe&&button||console.warn(`Container ${index}: Missing iframe or button`)})}document.addEventListener("keydown",e=>{if("Escape"===e.key){const buttons=document.querySelectorAll(".wc-video-pause-btn");buttons.forEach(btn=>btn.click())}}),document.querySelectorAll("br:first-child").forEach(br=>{const parent=br.parentNode;if(!parent)return;let node=parent.firstChild;for(;node&&node!==br;){if(node.nodeType===Node.TEXT_NODE&&""!==node.textContent.trim())return;if(node.nodeType===Node.ELEMENT_NODE)return;node=node.nextSibling}br.classList.add("br-hidden")});
2//# sourceMappingURL=script-v3.min.js.map

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.