window.addEventListener("load",event=>{document.querySelector("footer .ccs-logo").append(document.querySelector(".ccs-logo a").cloneNode(true));function shuffleArray(array){for(let i=array.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[array[i],array[j]]=[array[j],array[i]]}return array}function shuffleChildDivs(parentSelector){const parentDiv=document.querySelector(parentSelector);if(!parentDiv)return;const childDivs=Array.from(parentDiv.children);const shuffledDivs=shuffleArray(childDivs);shuffledDivs.forEach(div=>parentDiv.appendChild(div))}shuffleChildDivs("body.home div.is-style-sotp-row-scroll.topics");function formatEventsRssItems(){const elements=document.querySelectorAll("ul.cu-events .wp-block-rss__item-excerpt");elements.forEach(element=>{let text=element.innerText;const whereIndex=text.indexOf("Where:");const descriptionIndex=text.indexOf("Description:");if(whereIndex!==-1&&descriptionIndex!==-1){const dateText=text.slice(0,whereIndex).trim();const locationText=text.slice(whereIndex+6,descriptionIndex).trim();const descriptionText=text.slice(descriptionIndex+12).trim();const dateDiv=document.createElement("div");dateDiv.className="event-date";dateDiv.textContent=dateText;const encodedLocation=encodeURIComponent(locationText);const googleMapsLink=`https://www.google.com/maps/search/?api=1&query=${encodedLocation}`;const locationDiv=document.createElement("div");locationDiv.className="event-location";locationDiv.innerHTML=`${locationText}`;const descriptionP=document.createElement("p");descriptionP.className="event-excerpt";descriptionP.textContent=descriptionText;element.parentNode.insertBefore(dateDiv,element);element.parentNode.insertBefore(locationDiv,element);element.replaceWith(descriptionP)}});const titles=document.querySelectorAll("ul.cu-events .wp-block-rss__item-title");titles.forEach(title=>{title.classList.remove("wp-block-rss__item-title");title.classList.add("event-title");const link=title.querySelector("a:first-of-type");link.target="_blank"})}formatEventsRssItems()});