<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />

<meta property="og:image" content="https://w2.chabad.org/media/images/831/atrn8319287.jpg" itemprop="image" width="150" height="150" />
<meta property="og:image:width" content="150" />
<meta property="og:image:height" content="150" />
<meta name="keywords" content="Friendship,Circle" />
<meta name="title" content="Friendship Circle - Chabad of Clarksville, Maryland" />
<meta property="og:type" content="website" />
<meta name="scope-aids" content="1344463-1344471-1457510" />
<meta name="article-keywords" content="20962-16025-8495-8497-6760-7559-16669-2170-2898" />
<meta name="scope-aid" content="1344463" />
<meta name="scope-aid" content="1344471" />
<meta name="scope-aid" content="1457510" />
<meta name="article-keyword" content="20962" />
<meta name="article-keyword" content="16025" />
<meta name="article-keyword" content="8495" />
<meta name="article-keyword" content="8497" />
<meta name="article-keyword" content="6760" />
<meta name="article-keyword" content="7559" />
<meta name="article-keyword" content="16669" />
<meta name="article-keyword" content="2170" />
<meta name="article-keyword" content="2898" />
<meta property="og:url" content="https://www.chabadclarksville.org/templates/section_cdo/aid/1457510/jewish/Friendship-Circle.htm" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@chabad" />
<meta property="og:title" content="Friendship Circle" /><link rel="canonical" href="https://www.chabadclarksville.org/templates/section_cdo/aid/1457510/jewish/Friendship-Circle.htm" />
<link rel="icon" type="image/jpg" href="https://www.chabadclarksville.org/media/images/831/atrn8319287.jpg" />
<link rel="Stylesheet" href="/css/fonts/font-awesome/font-awesome-5.css?v=98662BF4" id="kfont-awesome" type="text/css"/>
<link rel="Stylesheet" href="/css/DefaultGrid.css?v=44B79007" id="kgrid" type="text/css"/>
<link rel="Stylesheet" href="/css/Elements.css?v=E669C926" id="k6" type="text/css"/>
<link rel="Stylesheet" href="/css/vendor/ds/tokens/sites.css?v=D77AD1C0" id="ksites-ds-css" type="text/css"/>
<link rel="Stylesheet" href="/css/new/main.css?v=2B7F734E" id="k7" type="text/css"/>
<link rel="Stylesheet" href="/css/old/global.css?v=F7C22456" id="k2898" type="text/css"/>
<link rel="Stylesheet" href="/css/cco/minisites/themes/friendship_circle/styles.css?v=46970A1E" id="k16025" type="text/css"/>
<link rel="Stylesheet" href="https://w2.chabad.org/css/cco/minisites/global.css" id="k20962" type="text/css"/>

<script>$q=[];$j=function(f){$q.push(f);}</script>
	
 
	
	<style type="text/css">
		body{margin:0;}
	</style>
	
	


<script>
	window.dataLayer = window.dataLayer || [];
	dataLayer.push({"event":"datalayer-initialized","page":{"numberOfComments":0,"publicationDate":"2011-03-07","primaryArticleId":1457510,"title":"Friendship Circle","author":"","authorId":0,"contentLevel1":"My Site","contentLevel2":"Friendship Circle","siteName":"Chabad of Clarksville, Maryland"},"time":{"upcomingHoliday":"The Three Weeks","daysToUpcomingHoliday":39,"hebrewDate":"5786-03-08"}});
		dataLayer.push({ 'articleHierarchy': '-1344463-1344471-1457510-', 'keywords': '-k2898-k2170-k16669-k7559-k6760-k8497-k8495-k16025-k20962-', 'k': '-1344463-1344471-1457510--k2898-k2170-k16669-k7559-k6760-k8497-k8495-k16025-k20962-' });
	
</script>
<script>

(function(c,h,a,b,a,d){c[a]=c[a]||[];c[a].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=h.getElementsByTagName(b)[0],
j=h.createElement(b);j.async=true;
j.src='https://w6.chabad.org/mitzvah-tank.js';f.parentNode.insertBefore(j,f);
})(window,document,0,'script','dataLayer');</script>

	<!-- Start of StatCounter Code -->
	<script type="text/javascript">
	var sc_project = 6360000;var sc_partition = 80;var sc_invisible = 1;var sc_remove_link=1;var sc_security = "bce15bf0";var sc_https = 1;
	</script>
	<script type="text/javascript" src="https://secure.statcounter.com/counter/counter_xhtml.js" defer async></script>
	<noscript><img src="//c81.statcounter.com/counter.php?sc_project=6360000&amp;java=0&amp;security=bce15bf0&amp;invisible=1" border="0" /> </noscript>
	<!-- End of StatCounter Code -->


<title>
	Friendship Circle - Chabad of Clarksville, Maryland
</title></head>
<body class="lang_en dir_ltr cco_body cco_templateless_page section_root">
	
	
		<div width="100%" class="cco_templateless_template" style="z-index:100 !important;display:block !important;left:0px !important;top:0px !important;height:30px!important;width:100% !important;line-height:30px !important; position:relative !important; margin-bottom:0 !important; padding:0;text-indent: 25px;" align="Left"><a href="//www.ChabadClarksville.org" style="display:block!important;font-size:14px !important;">&laquo; Back to&nbsp;Chabad of Clarksville, Maryland</a></div>
	
	<div class="cco_templatelates_content">
		
	<div class="co_content_container clearfix local_content" id="co_content_container">
		<div class="clearfix">
			<!-- BEGIN HEADER -->
<div id="chabad_body_page">
<div id="chabad_main_content">
<div id="chabad_head">


<div class="chabad_content_head">
<table border="0" cellSpacing="0" cellPadding="0" width="100%">
<tbody>
<tr>
<td class="chabad_logo" align="left">
<h1>

<div>
<a href="/1457510">
<img border="0" alt="Friendship Circle" src="https://w2.chabad.org/images/shluchim/minisites/themes/friendship_circle/friendship_logo.png" width="276" height="100" /></a></div>
<div ></div></h1></td>
<td class="chabad_text_head">

<img border="0" alt="Giving Friendship to children with special needs." src="https://w2.chabad.org/images/shluchim/minisites/themes/friendship_circle/friendship_text_head.png" /></td></tr></tbody></table></div>

<div id="navigation" class="chabad_navigator_bar">
<div class="chabad_menu_content">
<ul id="menu" class="navi">
<li class="item parent selected">
<a href="/article.asp?aid=1457510" class="parent selected">Home</a>
|
</li>
<li class="item parent">
<a href="/article.asp?aid=1457511" class="parent">About Us</a>
|
</li>
<li class="item parent">
<a href="/article.asp?aid=1457512" class="parent">Programs</a>
|
</li>
<li class="item parent">
<a href="/article.asp?aid=1457514" class="parent">Parents/Family</a>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=1457515" class="parent arrow">Photos</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=1568346">Bike 4 Friendship Pics</a>
</li>
<li class="item last">
<a href="/article.asp?aid=1617843">Back to School Bowling</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent">
<a href="/article.asp?aid=1457626" class="parent">Volunteers</a>
</li>

</ul>
</div>
</div>


</div>

<div id="chabad_body_content" class="content_full_width">
<div name="content_area" id="ContentArea" type="static" detached="true" actions="copy,delete" class="chabad_left_colum content_full_width"><!-- END HEADER -->
			
			
			<div class="clearfix bh mobile-only align_right">ב"ה</div>
			
			<div class="body_wrapper clearfix co_body">
				<div class="" id="co_body_container">
					
					<div id="ContentBody">
						
						
							<div class="content-area-parent no_margin">
								
	
<div id="chabad_left_colum">

<div id="content_banner" class="chabad_banner_content">
<div class="chabad_image_content">
<div class="chabad_image_banner">

<img border="0" alt="Welcome" src="https://w2.chabad.org/images/shluchim/minisites/themes/friendship_circle/friendship_banner_image.jpg" /></div>
<div id="chabad_banner_text" class="chabad_text_banner">
<div class="chabad_welcome">welcome</div>

<div class="chabad_text_banner_description">
<strong>The Friendship Circle provides services and support for Jewish children and teens with special needs through the help of trained teen volunteers and professional therapists.</strong></div>
</div></div></div>

<div class="chabad_box_content_first">
<div class="chabad_box_content_head" ></div>
<div class="chabad_box_content_body">
<div class="chabad_box_gradient">
<div class="chabad_announce">
<div class="chabad_title_box">
<div class="big_title">
Our Mission</div></div>
<div class="chabad_text_box">

<div>
<p>The Friendship Circle provides assistance and support to the families of children with special needs. In addition to helping those in need, the Friendship Circle enriches its vast network of volunteers by enabling them to reap the rewards of selfless giving.</p>
<p>The Friendship Circle was founded on the idea that within each person is a soul, and that soul is the same regardless of any limitations that may surround it. That regardless of whatever natural gifts we may have or lack, regardless of what obstacles and challenges we may confront, our souls are sacred and worthy of boundless love.</p>
<p>We believe that every human being, regardless of background or faith, deserves the gift of true friendship. Friendship has a ripple effect on the community, impacting the lives of all involved, raising the consciousness of society at large.</p></div></div></div></div></div></div>

<div class="chabad_box_content_second">
<div class="chabad_box_content_head menor" ></div>
<div class="chabad_box_content_body menor">
<div class="chabad_box_gradient menor">
<div class="chabad_announce">
<div class="chabad_title_box no_line">
<div class="medium_title">
Friends @ Home</div></div>
<div class="chabad_text_box">

<div class="bold">
<strong>
<span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: medium; line-height: normal; font-family: 'times new roman'; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;" class="Apple-style-span">
<strong>
<span style="color: rgb(70, 25, 114);" class="style1">Friends@Home</span>
<span class="Apple-converted-space" ></span><br/></strong>One of our programs, The Friends@Home program provides children with the chance to bond with their volunteers in an environment they are most comfortable: their own homes. Together, they can bake cookies, play games, create arts & crafts, read books and do just about anything fun! With so much to look forward to at these visits children wait all week for their volunteers to show up at their doorsteps</span></strong></div></div></div></div></div></div></div>
</div>
						
						<div class="break_floats"></div>
						
					</div>
				</div>
				
				
				
			</div>
			
			<!-- BEGIN FOOTER --></div>

</div>

</div>
<div id="border_bottom" ></div>
</div>
<!-- END FOOTER -->
		</div>
		
		<aside class="page-tools-sidebar js-page-tools-sidebar hide_for_print">
<div class="page-tools js-page-tools-menu">
<div class="page-tools__section page-tools__section--share">
<a class="page-tools__tool js-share-popup page-tools__tool--facebook" data-share-url="https://www.facebook.com/dialog/share?app_id=188669250943&amp;display=popup&amp;href=https%3a%2f%2fwww.chabadclarksville.org%2ftemplates%2fsection_cdo%2faid%2f1457510%2fjewish%2fFriendship-Circle.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dFB">
				<i class="fa fa-facebook"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--twitter" data-share-url="https://twitter.com/intent/tweet?text=Friendship+Circle+-+Chabad+of+Clarksville%2c+Maryland&amp;url=https%3a%2f%2fwww.chabadclarksville.org%2ftemplates%2fsection_cdo%2faid%2f1457510%2fjewish%2fFriendship-Circle.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dtwitter&amp;via=Chabad">
				<i class="fa fa-twitter"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--whatsapp d-lg-none js-share-whatsapp" data-share-url="whatsapp://send?text=Friendship+Circle+-+Chabad+of+Clarksville%2c+Maryland https%3a%2f%2fwww.chabadclarksville.org%2ftemplates%2fsection_cdo%2faid%2f1457510%2fjewish%2fFriendship-Circle.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dwhatsapp">
				<i class="fa fa-whatsapp">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" fill="#128c7e" width="1em" height="1em"><path d="M25 2C12.318 2 2 12.318 2 25c0 3.96 1.023 7.854 2.963 11.29L2.037 46.73c-.096.343-.003.711.245.966.191.197.451.304.718.304.08 0 .161-.01.24-.029l10.896-2.699C17.463 47.058 21.21 48 25 48c12.682 0 23-10.318 23-23S37.682 2 25 2zm11.57 31.116c-.492 1.362-2.852 2.605-3.986 2.772-1.018.149-2.306.213-3.72-.231-.857-.27-1.957-.628-3.366-1.229-5.923-2.526-9.791-8.415-10.087-8.804-.295-.389-2.411-3.161-2.411-6.03s1.525-4.28 2.067-4.864c.542-.584 1.181-.73 1.575-.73s.787.005 1.132.021c.363.018.85-.137 1.329 1.001.492 1.168 1.673 4.037 1.819 4.33.148.292.246.633.05 1.022s-.294.632-.59.973-.62.76-.886 1.022c-.296.291-.603.606-.259 1.19s1.529 2.493 3.285 4.039c2.255 1.986 4.158 2.602 4.748 2.894.59.292.935.243 1.279-.146.344-.39 1.476-1.703 1.869-2.286s.787-.487 1.329-.292c.542.194 3.445 1.604 4.035 1.896.59.292.984.438 1.132.681.148.242.148 1.41-.344 2.771z"/></svg>
				</i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--pinterest d-none d-lg-block" data-share-url="http://pinterest.com/pin/create/button/?url=https%3a%2f%2fwww.chabadclarksville.org%2ftemplates%2fsection_cdo%2faid%2f1457510%2fjewish%2fFriendship-Circle.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dpinterest&amp;description=Friendship+Circle+-+Chabad+of+Clarksville%2c+Maryland">
				<i class="fa fa-pinterest"></i>
			</a>
<a class="page-tools__tool" onclick="showEmailLayer(this);">
<i class="fa fa-envelope"></i>
</a>
</div>
<div class="page-tools__section page-tools__section--other js-page-tool-other">
<div class="page-tools__tool popover-parent d-lg-block">
<div class="popover popover--right align_left nowrap">
<div class="popover__content">
<label class="bold bottom_margin block">
Print Options:
</label>
<form class="vcenter" name="print-form" onsubmit="coPrint(event, 1344471);return false;">
<div>
<label><input type="checkbox" name="print-green"><span title="Save paper and ink">Print without images <i class="fa fa-leaf text-green"></i></span></label>
</div>
<br/>
<div class="center">
<button class="co-button page-tools__print-button">Print</button>
</div>
</form>
</div>
</div>
<i class="fa fa-print"></i>
</div>
</div>
</div>
<div class="js-fab-wrapper fab-wrapper">
<div class="fab">
<i class="fab-icon"></i>
</div>
</div>
</aside>
<!-- END CACHE -->
	</div>

	</div>

	<div id="BodyContainer">
		<div class="g960 footer">
			<div class="poweredby large_bottom_margin">
				



	<div class="footer3">
		<span class="footer-title" >Chabad of Clarksville, Maryland</span>
		<div class="footer-address">
			<span class="footer-street">6125 Tulane Drive </span>
			<span class="footer-city-state">Clarksville, MD 21029-1505</span>
		</div>
			<span>443-474-0340</span>
	</div>
	<img src="https://w2.chabad.org/images/global/spacer.gif" width="1" height="6" border="0" /><br />



Powered by <a href="https://www.chabad.org/" target="_new" class="">Chabad.org</a> &copy; 1993-2026 <a href="/4026210" target="_blank" class="privacy-link">Privacy Policy</a>




			</div>
		</div>
	</div>
	
	

	
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery-latest.min.js?v=0293E3EC"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/co/dist/CoLib.js?v=F809B22F"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/WebComponents/bundles/magen-cdo-global.js?v=95D39855"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/modules/pagetools.js?v=930B07AB"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/minisites.js?v=F38E4DA5"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/subscribeprompt.js?v=86D84DC2"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/deprecated.js?v=D506A83E"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/OverrideJSDocumentWrite.js?v=9A0227AA"></script><script>$j = $j.fn ? $j : jQuery;$j(()=>{$q.forEach(f=>{try{f.call(window);}catch(ex){console.error(ex);}});})</script>
	
<script  language="javascript" type="text/javascript"> Co.Settings      = {CacheClassName:'js-cache-default',MosadName:'Chabad of Clarksville, Maryland'}; Co.ArticleId     = '1457510';Co.SectionId     = 1457510;Co.PartnerSiteId = 0;Co.SiteId        = 8842;Co.IsMobilePage  = false;Co.IsResponsive  = false;Co.DbDomain      = 'ChabadClarksville.org';Co.LanguageCode  = '';Co.LoginStatus   = 'None';</script>
	
	


<script>
//<![CDATA[
    /* <-----------Upcoming Events Carousel (Google Sheets) ---------> */
    if (window.location.pathname === '/' || window.location.pathname === '/default.aspx' || window.location.pathname === '') {

        (async function() {

            // Global Error listener to catch broken images safely without triggering Cloudflare WAF via inline onerror attributes
            document.addEventListener('error', function(e) {
                if (e.target && e.target.tagName && e.target.tagName.toLowerCase() === 'img') {
                    if (!e.target.dataset.fallbackApplied) {
                        e.target.dataset.fallbackApplied = 'true';
                        e.target.src = 'https://placehold.co/400x300/eee/ccc?text=Image+Not+Found';
                    }
                }
            }, true);

            // =========================================================
            // CONFIGURATION
            // =========================================================
            const SHEET_ID = '1EPGntfwESm5hdd-RPpR7kmNARdvi9dpDT3YrJnO0ens'; 
            const TARGET_LOCATION = 'Chabad of Clarksville'; 
            const MAX_EVENTS = 10; 
            // =========================================================

            // Using \u0026 to guarantee XML/WAF parsers don't break on the ampersand
            const EVENTS_URL = `https://docs.google.com/spreadsheets/d/${SHEET_ID}/gviz/tq?tqx=out:json\u0026sheet=Events`;
            const SETTINGS_URL = `https://docs.google.com/spreadsheets/d/${SHEET_ID}/gviz/tq?tqx=out:json\u0026sheet=Settings`;
            
            let categoryColors = {}; 
            let locationLogos = {};
            let demoColors = {}; // Added for Demographics
            const dayOfWeekMap = { 'sunday':0, 'monday':1, 'tuesday':2, 'wednesday':3, 'thursday':4, 'friday':5, 'saturday':6 };

            function parseGoogleJson(text) {
                return JSON.parse(text.substring(text.indexOf('{'), text.lastIndexOf('}') + 1));
            }

            // Generate Calendar Links (Using Blob and DOM parsing to bypass WAF)
            function createCalendarLinks(title, desc, loc, dateObj, timeStr) {
                let hours = 0, mins = 0;
                if (timeStr) {
                    const match = timeStr.match(/(\d+):(\d+)\s*(AM|PM)/i);
                    if (match) {
                        hours = parseInt(match[1]); mins = parseInt(match[2]);
                        if (match[3].toUpperCase() === 'PM' && hours < 12) hours += 12;
                        if (match[3].toUpperCase() === 'AM' && hours === 12) hours = 0;
                    }
                }
                
                const start = new Date(dateObj);
                start.setHours(hours, mins, 0);
                const end = new Date(start.getTime() + 60 * 60 * 1000); 
                
                const formatICSDate = (d) => {
                    return d.getUTCFullYear() + String(d.getUTCMonth() + 1).padStart(2, '0') + String(d.getUTCDate()).padStart(2, '0') + 'T' + String(d.getUTCHours()).padStart(2, '0') + String(d.getUTCMinutes()).padStart(2, '0') + String(d.getUTCSeconds()).padStart(2, '0') + 'Z';
                };

                const startStr = formatICSDate(start);
                const endStr = formatICSDate(end);
                
                // Safely extract text without triggering WAF regex blocks
                const tempDiv = document.createElement('div');
                tempDiv.innerHTML = desc || '';
                const cleanDesc = tempDiv.textContent || tempDiv.innerText || '';

                const gCalUrl = `https://calendar.google.com/calendar/render?action=TEMPLATE\u0026text=${encodeURIComponent(title)}\u0026dates=${startStr}/${endStr}\u0026details=${encodeURIComponent(cleanDesc)}\u0026location=${encodeURIComponent(loc)}`;
                
                const icsContent = `BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT\nDTSTART:${startStr}\nDTEND:${endStr}\nSUMMARY:${title}\nDESCRIPTION:${cleanDesc}\nLOCATION:${loc}\nEND:VEVENT\nEND:VCALENDAR`;
                
                // Use a Blob object to generate a secure internal URL instead of a "data:" URI payload that WAFs block
                const blob = new Blob([icsContent], { type: 'text/calendar;charset=utf-8' });
                const icsUrl = URL.createObjectURL(blob);

                return { gCalUrl, icsUrl };
            }

            const runTransformation = async () => {
                try {
                    // Fetch Settings for Colors and Logos
                    try {
                        const setRes = await fetch(SETTINGS_URL);
                        const setData = parseGoogleJson(await setRes.text());
                        if (setData && setData.table && setData.table.rows) {
                            setData.table.rows.forEach(row => {
                                const catName = row.c[0] ? String(row.c[0].v).trim() : null;
                                const catColor = row.c[1] ? String(row.c[1].v).trim() : null;
                                if(catName && catColor) categoryColors[catName.toLowerCase()] = catColor;

                                const locName = row.c[2] ? String(row.c[2].v).trim() : null;
                                const locLogo = row.c[3] ? String(row.c[3].v).trim() : null;
                                if(locName && locLogo) locationLogos[locName.toLowerCase()] = locLogo;
                                
                                // Added Demographic Colors fetch
                                const demoName = row.c[4] ? String(row.c[4].v).trim() : null;
                                const demoColor = row.c[5] ? String(row.c[5].v).trim() : null;
                                if(demoName && demoColor) demoColors[demoName.toLowerCase()] = demoColor;
                            });
                        }
                    } catch (err) { console.warn("Could not load Settings.", err); }

                    // Fetch Events
                    let processedEvents = [];
                    const today = new Date();
                    today.setHours(0,0,0,0);

                    const evRes = await fetch(EVENTS_URL);
                    const evText = await evRes.text();
                    if (evText.toLowerCase().includes('<!doctype html>')) return;

                    const evData = parseGoogleJson(evText);
                    const rows = evData.table.rows;

                    rows.forEach(row => {
                        const getVal = (idx) => (row.c && row.c[idx] && row.c[idx].v !== null) ? String(row.c[idx].v).trim() : '';
                        
                        const title = getVal(0);
                        if(!title) return; 

                        const location = getVal(12);
                        if (!location.toLowerCase().includes(TARGET_LOCATION.toLowerCase())) return; 

                        const description = getVal(1) || '';
                        const imageSrc = getVal(2) || 'https://placehold.co/600x400/eee/ccc?text=Event+Image';
                        const demographics = getVal(3); // Added demographics
                        const eventType = getVal(4);
                        
                        // ROBUST DATE PARSER
                        let dateObj = null;
                        let dateVal = row.c && row.c[6] ? row.c[6].v : null;
                        if (typeof dateVal === 'string' && dateVal.startsWith('Date(')) {
                            const parts = dateVal.match(/Date\((\d+),(\d+),(\d+)\)/);
                            if (parts) dateObj = new Date(parts[1], parts[2], parts[3]);
                        } else if (typeof dateVal === 'number') {
                            dateObj = new Date(Math.round((dateVal - 25569) * 86400 * 1000));
                        } else if (dateVal) {
                            dateObj = new Date(dateVal);
                        }

                        // TIME PARSER
                        let time = (row.c && row.c[7] && row.c[7].f) ? row.c[7].f : String(getVal(7));
                        if (time.startsWith('Date(')) {
                            const tParts = time.match(/Date\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/);
                            if (tParts) {
                                let h = parseInt(tParts[4], 10);
                                let m = parseInt(tParts[5], 10);
                                let ampm = h >= 12 ? 'PM' : 'AM';
                                h = h % 12 || 12; m = m < 10 ? '0' + m : m;
                                time = `${h}:${m} ${ampm}`;
                            }
                        }

                        const isRecurring = String(getVal(8)).toLowerCase() === 'true' || String(getVal(8)).toLowerCase() === 'yes';
                        const dayOfWeekStr = String(getVal(9)).toLowerCase();
                        const untilDateRaw = row.c && row.c[10] ? row.c[10].v : null;
                        let moreInfoLink = getVal(11) || '#';
                        const institution = getVal(12);

                        const displayTitle = title.replace('[E]', '').trim();

                        if (isRecurring && dayOfWeekMap[dayOfWeekStr] !== undefined && untilDateRaw) {
                            let currentDate = new Date();
                            currentDate.setHours(0,0,0,0);
                            
                            let untilDate = null;
                            if(typeof untilDateRaw === 'string' && untilDateRaw.startsWith('Date(')){
                                const parts = untilDateRaw.match(/Date\((\d+),(\d+),(\d+)\)/);
                                if(parts) untilDate = new Date(parts[1], parts[2], parts[3]);
                            } else { untilDate = new Date(untilDateRaw); }

                            const targetDay = dayOfWeekMap[dayOfWeekStr];

                            if (untilDate) {
                                let loopCount = 0; 
                                while (currentDate <= untilDate && loopCount < 365) {
                                    if (currentDate.getDay() === targetDay && currentDate >= today) {
                                        const calLinks = createCalendarLinks(displayTitle, description, location, currentDate, time);
                                        processedEvents.push({ title: displayTitle, description, imageSrc, eventType, demographics, location, institution, time, moreInfoLink, dateObj: new Date(currentDate), calLinks });
                                    }
                                    currentDate.setDate(currentDate.getDate() + 1);
                                    loopCount++;
                                }
                            }
                        } 
                        else if (dateObj && dateObj >= today) {
                            const calLinks = createCalendarLinks(displayTitle, description, location, dateObj, time);
                            processedEvents.push({ title: displayTitle, description, imageSrc, eventType, demographics, location, institution, time, moreInfoLink, dateObj: dateObj, calLinks });
                        }
                    });

                    const featuredEvents = processedEvents.sort((a, b) => a.dateObj - b.dateObj).slice(0, MAX_EVENTS);

                    if (featuredEvents.length === 0) return;

                    // --- DOM Injection Logic ---
                    const eventsSection = document.createElement('div');
                    eventsSection.className = 'injected-featured-events-section';
                    eventsSection.id = 'injected-upcoming-events-section';

                    eventsSection.innerHTML = `
                      <div class="injected-featured-events-header"><h2>Upcoming Events</h2></div>
                    `;

                    const carouselContainer = document.createElement('div');
                    carouselContainer.className = 'injected-events-carousel-container';
                    const carouselWrapper = document.createElement('div');
                    carouselWrapper.className = 'injected-events-carousel-wrapper';

                    featuredEvents.forEach((ev) => {
                        let tagColor = 'var(--color-primary-navy)'; 
                        if (ev.eventType && categoryColors[ev.eventType.toLowerCase()]) tagColor = categoryColors[ev.eventType.toLowerCase()];
                        
                        let dColor = '#888888';
                        if (ev.demographics && demoColors[ev.demographics.toLowerCase()]) dColor = demoColors[ev.demographics.toLowerCase()];

                        let logoHtml = '';
                        if (ev.institution && locationLogos[ev.institution.toLowerCase()]) {
                            logoHtml = `<img src="${locationLogos[ev.institution.toLowerCase()]}" class="uec-inst-logo" alt="Logo" />`;
                        }

                        const dateStr = ev.dateObj.toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' }).toUpperCase();
                        let timeText = ev.time ? ev.time.trim().toUpperCase() : '';
                        if (timeText) timeText = timeText.replace(/(\d)([AP]M)$/, '$1 $2');
                        const dateTimeString = timeText ? `${dateStr} | ${timeText}` : dateStr;

                        const card = document.createElement('div');
                        card.className = 'unified-event-card';
                        card.innerHTML = `
                            <div class="uec-image">
                                <a href="${ev.moreInfoLink}">
                                    <img src="${ev.imageSrc}" alt="${ev.title}" />
                                </a>
                            </div>
                            <div class="uec-body">
                                <div class="uec-header-row">
                                    <div class="uec-tags">
                                        ${ev.eventType ? `<span class="uec-category" style="background-color: ${tagColor}">${ev.eventType}</span>` : ''}
                                        ${ev.demographics ? `<span class="uec-category" style="background-color: ${dColor}">${ev.demographics}</span>` : ''}
                                    </div>
                                    ${logoHtml}
                                </div>
                                
                                ${ev.location ? `<div class="uec-location"><i class="fas fa-map-marker-alt"></i> ${ev.location}</div>` : ''}
                                <div class="uec-date"><i class="far fa-clock"></i> ${dateTimeString}</div>
                                
                                <h3 class="uec-title"><a href="${ev.moreInfoLink}">${ev.title}</a></h3>
                                <div class="uec-desc" title="${ev.description.replace(/"/g, '\u0026quot;')}">${ev.description}</div>
                                
                                <div class="uec-actions">
                                    <a href="${ev.moreInfoLink}" class="uec-btn-main">MORE INFO</a>
                                    <div class="uec-cal-col">
                                        <a href="${ev.calLinks.gCalUrl}" target="_blank" class="uec-btn-cal" title="Add to Google Calendar">
                                            <i class="fab fa-google"></i> Add to Google Calendar
                                        </a>
                                        <a href="${ev.calLinks.icsUrl}" download="event.ics" class="uec-btn-cal" title="Add to Apple/Outlook Calendar">
                                            <i class="fab fa-apple"></i> Add to Apple / Outlook
                                        </a>
                                    </div>
                                </div>
                            </div>
                        `;
                        carouselWrapper.appendChild(card);
                    });

                    const viewAllCard = document.createElement('a');
                    viewAllCard.className = 'unified-event-card view-all-card';
                    viewAllCard.href = 'https://www.chabadclarksville.org/templates/articlecco_cdo/aid/7294561/jewish/Upcoming-Events.htm';
                    viewAllCard.innerHTML = `
                      <div class="view-all-content">
                        <h3>View All</h3><p>Upcoming Events</p><span class="view-all-arrow">→</span>
                      </div>
                    `;
                    carouselWrapper.appendChild(viewAllCard);

                    carouselContainer.appendChild(carouselWrapper);
                    eventsSection.appendChild(carouselContainer);

                    const swipeHint = document.createElement('div');
                    swipeHint.className = 'mobile-swipe-hint';
                    swipeHint.innerHTML = '<span>Swipe for more events</span> <span class="arrow">→</span>';
                    eventsSection.appendChild(swipeHint);

                    if (featuredEvents.length > 3) {
                        const prevButton = document.createElement('button');
                        prevButton.className = 'events-carousel-arrow prev'; prevButton.innerHTML = '❮';
                        const nextButton = document.createElement('button');
                        nextButton.className = 'events-carousel-arrow next'; nextButton.innerHTML = '❯';
                        carouselContainer.appendChild(prevButton); carouselContainer.appendChild(nextButton);

                        let currentIndex = 0;
                        const itemsToShowDesktop = 3;
                        const totalItems = carouselWrapper.children.length;

                        const updateCarousel = () => {
                            if (carouselWrapper.children.length === 0) return;
                            const cardWidth = carouselWrapper.children[0].offsetWidth;
                            const gap = 30;
                            const totalMove = (cardWidth + gap) * currentIndex;
                            carouselWrapper.style.transform = `translateX(-${totalMove}px)`;
                            prevButton.disabled = currentIndex === 0;
                            nextButton.disabled = currentIndex >= totalItems - itemsToShowDesktop;
                        };

                        prevButton.addEventListener('click', () => { if (currentIndex > 0) { currentIndex--; updateCarousel(); } });
                        nextButton.addEventListener('click', () => { if (currentIndex < totalItems - itemsToShowDesktop) { currentIndex++; updateCarousel(); } });

                        updateCarousel();
                        window.addEventListener('resize', updateCarousel);
                    }

                    const insertionPoint = document.querySelector('#BodyContainer > div > div.g960 > div > div.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.no_margin.g960.no_margin > div > div.hp-row.hp-row-first');

if (insertionPoint) {
    // This puts the eventsSection exactly after the insertionPoint
    insertionPoint.after(eventsSection);
} else {
    // If that giant selector fails, it adds it to the bottom of the page
    document.body.appendChild(eventsSection);
}

                } catch (error) { console.error('Error fetching data:', error); }
            };

            const injectCSS = () => {
                const style = document.createElement('style');
                style.textContent = `
                    @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Raleway:wght@400;700;900&display=swap');
                    :root { --color-accent-green: #afc78b; --color-accent-plum: #6b1457; --color-primary-navy: #212459; --color-bg-light: #f8f9fa; }
                    .injected-featured-events-section { padding: 80px 20px; background-color: var(--color-bg-light); font-family: 'Poppins', sans-serif; box-sizing: border-box; }
                    .injected-featured-events-header { text-align: center; margin-bottom: 50px; max-width: 800px; margin-left: auto; margin-right: auto; }
                    .injected-featured-events-header h2 { font-size: 42px; font-weight: 700; color: var(--color-primary-navy); letter-spacing: -1px; margin-bottom: 10px; position: relative; display: inline-block; }
                    .injected-featured-events-header h2:after { content: ''; display: block; width: 60px; height: 4px; background: var(--color-accent-green); margin: 15px auto 0; border-radius: 2px; }
                    .injected-events-carousel-container { position: relative; max-width: 1200px; margin: 0 auto; overflow: hidden; padding: 20px 0 40px 0; }
                    .injected-events-carousel-wrapper { display: flex; gap: 30px; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
                    
                    /* UNIFIED CARD STYLES FOR HOMEPAGE */
                    .unified-event-card { 
                        flex: 0 0 calc(33.333% - 20px); background: #ffffff; border-radius: 16px; overflow: hidden; 
                        box-shadow: 0 10px 40px -10px rgba(33, 36, 89, 0.1); display: flex; flex-direction: column; 
                        border: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease;
                    }
                    .unified-event-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px -10px rgba(33, 36, 89, 0.2); }
                    
                    .uec-image { position: relative; height: 200px; overflow: hidden; background-color: #eee; flex-shrink: 0; }
                    .uec-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
                    .unified-event-card:hover .uec-image img { transform: scale(1.05); }
                    
                    .uec-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
                    
                    .uec-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
                    .uec-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
                    .uec-category { 
                        display: inline-flex; align-items: center; justify-content: center;
                        font-size: 10px; font-weight: 700; text-transform: uppercase; 
                        padding: 4px 12px; border-radius: 50px; 
                        color: white; white-space: nowrap; 
                    }
                    
                    .uec-inst-logo { max-height: 28px; max-width: 90px; object-fit: contain; }
                    
                    .uec-location { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
                    .uec-date { font-family: 'Poppins', sans-serif; color: var(--color-accent-plum); font-weight: 700; font-size: 13px; letter-spacing: 0.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
                    
                    .uec-title { margin: 0 0 10px; line-height: 1.3; }
                    .uec-title a { font-size: 18px; font-weight: 700; color: var(--color-primary-navy); text-decoration: none; transition: color 0.2s; }
                    .uec-title a:hover { color: var(--color-accent-plum); }
                    
                    .uec-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0 0 20px; flex-grow: 1; max-height: 60px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
                    
                    .uec-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
                    .uec-btn-main { display: block; width: 100%; background-color: var(--color-primary-navy); color: white; padding: 10px; border-radius: 8px; text-decoration: none; font-weight: 600; text-align: center; border: 2px solid var(--color-primary-navy); transition: all 0.2s; font-size: 13px; }
                    .uec-btn-main:hover { background-color: var(--color-accent-plum); border-color: var(--color-accent-plum); color: white; }
                    
                    .uec-cal-col { display: flex; flex-direction: column; gap: 8px; }
                    .uec-btn-cal { display: block; width: 100%; text-align: center; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #555; background: #f0f0f0; text-decoration: none; transition: all 0.2s; box-sizing: border-box; }
                    .uec-btn-cal:hover { background: #e0e0e0; color: #222; }
                    .uec-btn-cal i { margin-right: 4px; }

                    .view-all-card { justify-content: center; align-items: center; text-align: center; background-color: #ffffff; border: 2px dashed var(--color-accent-green); text-decoration: none; }
                    .view-all-card:hover { background-color: #fcfcfc; border-color: var(--color-accent-plum); }
                    .view-all-card .view-all-content h3 { font-size: 22px; font-weight: 700; color: var(--color-accent-plum); margin: 0 0 5px; text-transform: uppercase; }
                    .view-all-card .view-all-content p { font-size: 15px; color: #888; margin: 0 0 15px; }
                    .view-all-card .view-all-arrow { font-size: 32px; font-weight: bold; color: var(--color-accent-green); transition: transform 0.3s; display: inline-block; }
                    .view-all-card:hover .view-all-arrow { transform: translateX(5px); color: var(--color-accent-plum); }

                    .events-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background-color: #fff; border: 1px solid #eee; border-radius: 50%; width: 48px; height: 48px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--color-primary-navy); z-index: 10; transition: all 0.2s; }
                    .events-carousel-arrow:hover { background-color: var(--color-primary-navy); color: #fff; }
                    .events-carousel-arrow.prev { left: 0px; }
                    .events-carousel-arrow.next { right: 0px; }
                    .mobile-swipe-hint { display: none; text-align: center; margin-top: 10px; font-family: 'Poppins', sans-serif; color: #999; font-size: 13px; align-items: center; justify-content: center; gap: 8px; }
                    
                    @media (max-width: 1250px) { .events-carousel-arrow.prev { left: 10px; } .events-carousel-arrow.next { right: 10px; } }
                    @media (max-width: 900px) { .unified-event-card { flex-basis: calc(50% - 15px); } }
                    @media (max-width: 600px) {
                      .injected-featured-events-header h2 { font-size: 28px; }
                      .injected-events-carousel-container { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; padding: 0 20px 20px 20px; margin: 0 -20px; }
                      .injected-events-carousel-container::-webkit-scrollbar { display: none; }
                      .injected-events-carousel-wrapper { width: max-content; transform: none !important; padding-right: 20px; gap: 15px; }
                      .unified-event-card { flex-basis: 85vw; scroll-snap-align: start; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
                      .events-carousel-arrow { display: none; }
                      .mobile-swipe-hint { display: flex; }
                    }
                `;
                document.head.appendChild(style);
            };

            injectCSS();
            if (document.readyState === 'complete' || document.readyState === 'interactive') runTransformation();
            else window.addEventListener('DOMContentLoaded', runTransformation);

        })();
    }
//]]>
</script>
</body>
</html>