function gtagInit() {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-GWMHR5J8EH');
}
const gtagScript = document.createElement("script");
gtagScript.async = true;
gtagScript.src = "https://www.googletagmanager.com/gtag/js?id=G-GWMHR5J8EH";
gtagScript.onload = gtagInit;
document.head.appendChild(gtagScript);
const doc = document.getElementById('header_container')?.shadowRoot || document;
const links = doc.querySelectorAll('link');
const copyLinks = [
'fonts.googleapis.com',
'fonts.gstatic.com',
'use.typekit.net',
'kit.fontawesome.com'
];
links.forEach(link => {
if(copyLinks.some(l => link.href.includes(l))) {
document.head.appendChild(link);
}
});
//Chat ref pennant
function closemodal() {
var x = document.getElementById("modalref");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
//"OPEN NOW" WIDGET VIA COMMUNICO ENGINEERS
// Function to get the current day
function getCurrentDay() {
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const today = new Date().getDay();
return days[today];
}
// Function to get the current time in 12-hour clock with AM/PM
function getCurrentTime() {
const now = new Date();
const options = { hour: 'numeric', minute: 'numeric', hour12: true };
return now.toLocaleString('en-US', options);
}
// Function to display open hours
function displayOpenHours() {
const openHoursWidget = doc.getElementById('open-hours-widget');
const [currentDay] = [getCurrentDay()];
const currentTime = getCurrentTime();
// Define open hours based on the day
const openHours = {
'Sunday': '13:00-17:00',
'Monday': '8:30-21:00',
'Tuesday': '8:30-21:00',
'Wednesday': '8:30-21:00',
'Thursday': '8:30-21:00',
'Friday': '8:30-16:30',
'Saturday': '9:00-16:30',
};
// Determine if the business is open or closed
const isOpen = isOpenNow(openHours[currentDay]);
// Display the result with the visual indicator
if (isOpen) {
const html = doc.querySelector('.open-hours-widget-open').innerHTML;
openHoursWidget.innerHTML = html.replace('{currentDay}', currentDay).replace('{openUntil}', formatTime(openHours[currentDay]));
} else {
const html = doc.querySelector('.open-hours-widget-closed').innerHTML;
openHoursWidget.innerHTML = html;
}
}
// Function to check if the current time is within the open hours
function isOpenNow(openHours) {
if (openHours === 'Closed') {
return false;
}
const now = new Date();
const [open, close] = openHours.split('-').map(time => time.split(':').map(Number));
const currentHour = now.getHours();
const currentMinute = now.getMinutes();
// Check if the current time is within the open hours
return (
(currentHour > open[0] || (currentHour === open[0] && currentMinute >= open[1])) &&
(close[0] > currentHour || (currentHour === close[0] && close[1] >= currentMinute))
);
}
// Function to format time in 12-hour clock format with AM/PM
function formatTime(time) {
const [hours, minutes] = time.split('-')[1].split(':').map(Number);
const ampm = hours >= 12 ? 'PM' : 'AM';
const formattedHours = hours % 12 || 12;
return `${formattedHours}:${10 > minutes ? '0' : ''}${minutes} ${ampm}`;
}
function togglePopup(e) {
var popup = doc.getElementById('ohPop');
if (popup) {
popup.classList.toggle('show');
}
}
// Call the function to display open hours
displayOpenHours();
const sengines = doc.querySelector('#sengines');
const searchterms = doc.querySelector('#searchbar');
console.log(sengines);
console.log(searchterms);
function dosearch() {
if (!searchterms.value) return;
const href = sengines.options[sengines.selectedIndex].value + encodeURIComponent(searchterms.value);
window.location.href = href;
return false;
}
Skip to main content
Add to Calendar2026-02-24 00:00:002026-02-24 23:59:00America/New_YorkSpice Club: PaprikaRegistration required with an email address. The Spice Club is a take-and-make activity. It is not associated with an online class.CMCL Online -
Each month we will feature a different spice. The spice kit be available on the last Tuesday of each month at the circulation desk at the branch you select at the time of registration. Spice kits include: sample of the featured spice, 3-4 recipes, and the information about the spice. If you are interested in more recipes with this spice, please browse the Cape May County Library System's collection. One kit per family. Registration opens February 3rd. Registration will close on February 17th. Please pick your spice kit by the end of February.
Once you have created you culinary masterpieces at home, we'd love for you to share photos with us. Email adultevents@cmclibrary.org or share them to our Facebook group