<!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/1381/Nife13815054.png" itemprop="image" width="150" height="150" />
<meta property="og:image:width" content="150" />
<meta property="og:image:height" content="150" />
<meta name="keywords" content="Terry,Barbee,,Tustin,,CA" />
<meta name="title" content="Terry Barbee, Tustin, CA - Chabad of Puerto Vallarta" />
<meta property="og:type" content="website" />
<meta name="scope-aids" content="3431758-3431766-3951373-3951374-3951379-3951386" />
<meta name="article-keywords" content="19478-19479-19958-20962-8495-8972-18927-19353-19480-2170-2898-2471-537-6939-31567-32228-63" />
<meta name="scope-aid" content="3431758" />
<meta name="scope-aid" content="3431766" />
<meta name="scope-aid" content="3951373" />
<meta name="scope-aid" content="3951374" />
<meta name="scope-aid" content="3951379" />
<meta name="scope-aid" content="3951386" />
<meta name="article-keyword" content="19478" />
<meta name="article-keyword" content="19479" />
<meta name="article-keyword" content="19958" />
<meta name="article-keyword" content="20962" />
<meta name="article-keyword" content="8495" />
<meta name="article-keyword" content="8972" />
<meta name="article-keyword" content="18927" />
<meta name="article-keyword" content="19353" />
<meta name="article-keyword" content="19480" />
<meta name="article-keyword" content="2170" />
<meta name="article-keyword" content="2898" />
<meta name="article-keyword" content="2471" />
<meta name="article-keyword" content="537" />
<meta name="article-keyword" content="6939" />
<meta name="article-keyword" content="31567" />
<meta name="article-keyword" content="32228" />
<meta name="article-keyword" content="63" />
<meta property="og:url" content="https://www.chabadvallarta.com/" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@chabad" />
<meta property="og:title" content="Terry Barbee, Tustin, CA - Chabad of Puerto Vallarta" /><link rel="canonical" href="https://www.chabadvallarta.com/" />
<link rel="icon" type="image/png" href="https://www.chabadvallarta.com/media/images/1381/Nife13815054.png" />
<link rel="Stylesheet" href="/css/fonts/font-awesome/font-awesome-5.css?v=2D6ABDDB" id="kfont-awesome" type="text/css"/>
<link rel="Stylesheet" href="/css/DefaultGrid.css?v=A13D74E8" id="kgrid" type="text/css"/>
<link rel="Stylesheet" href="/css/Elements.css?v=7A8278DB" id="k6" type="text/css"/>
<link rel="Stylesheet" href="/css/vendor/ds/tokens/sites.css?v=842BEDB8" id="ksites-ds-css" type="text/css"/>
<link rel="Stylesheet" href="/css/vendor/ds/tokens/sites-light.css?v=C7A22DB0" id="ksites-light-ds-css" type="text/css"/>
<link rel="Stylesheet" href="/css/new/main.css?v=402B0A08" id="k7" type="text/css"/>
<link rel="Stylesheet" href="/css/old/global.css?v=43DDBA77" id="k2898" type="text/css"/>
<link rel="Stylesheet" href="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/css/plannedgiving.min.css?v=1" id="k19353" type="text/css"/>
<link rel="Stylesheet" href="https://w2.chabad.org/css/cco/minisites/global.css" id="k20962" type="text/css"/>
<link rel="Stylesheet" href="/css/bootstrap/grid.css?v=F4390F2B" id="kbootstrap4-grid" type="text/css"/>
<link rel="Stylesheet" href="/css/Library/reader-comments.css?v=8AB57D79" id="kCommentsStylesheet" type="text/css"/>
<link rel="Stylesheet" href="/css/inline/BookInfo.css?v=3D052243" id="kBookInfoCss" 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":"2018-02-22","primaryArticleId":2569182,"title":"","author":"","authorId":0,"contentLevel1":"My Site","contentLevel2":"Planned Giving","contentLevel3":"Why Giving Matters","contentLevel4":"Donor Stories","contentLevel5":"Terry Barbee, Tustin, CA","siteName":"Chabad of Puerto Vallarta"},"time":{"upcomingHoliday":"Chanukah","daysToUpcomingHoliday":1,"hebrewDate":"5787-09-24"}});
		dataLayer.push({ 'articleHierarchy': '-3431758-3431766-3951373-3951374-3951379-3951386-', 'keywords': '-k63-k32228-k31567-k6939-k537-k2471-k2898-k2170-k19480-k19353-k18927-k8972-k8495-k20962-k19958-k19479-k19478-', 'k': '-3431758-3431766-3951373-3951374-3951379-3951386--k63-k32228-k31567-k6939-k537-k2471-k2898-k2170-k19480-k19353-k18927-k8972-k8495-k20962-k19958-k19479-k19478-' });
	
</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 = 11104187;var sc_partition = 62;var sc_invisible = 1;var sc_remove_link=1;var sc_security = "b78a377d";var sc_https = 1;
	</script>
	<script type="text/javascript" src="https://secure.statcounter.com/counter/counter_xhtml.js" defer async></script>
	<noscript><img src="//c63.statcounter.com/counter.php?sc_project=11104187&amp;java=0&amp;security=b78a377d&amp;invisible=1" border="0" /> </noscript>
	<!-- End of StatCounter Code -->


<!-- GetButton.io widget -->

<!-- /GetButton.io widget -->

<meta name="google-site-verification" content="2azzqEaKys0qwo3YGVMIHr7BjYXz23pc89yKen8SwDI" />
<link rel="icon" type="image/png" href="https://chabadvallarta.com/media/images/1160/AKcK11605551.png" />

<link href='https://webmk.co/sites/general/cdo-normalize.css' rel='stylesheet' type='text/css'>


<script type="text/javascript">
    (function () {
        var options = {
            whatsapp: "+523221417279", // WhatsApp number
            company_logo_url: "//static.getbutton.io/img/flag.png", // URL of company logo (png, jpg, gif)
            greeting_message: "", // Text of greeting message
            call_to_action: "", // Call to action
            button_color: "#FF6550", // Color of button
            position: "right", // Position may be 'right' or 'left'
            ga: true, // Google Analytics enabled
            branding: false, // Show branding string
            mobile: true, // Mobile version enabled
            desktop: true, // Desktop version enabled
            greeting: false, // Greeting message enabled
            shift_vertical: 0, // Vertical position, px
            shift_horizontal: 0, // Horizontal position, px
            domain: "chabadvallarta.com", // site domain
            key: "HMuJ7eutR9Wbhfr8Yn3Dcg", // pro-widget key
        };
        var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host;
        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js';
        s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
        var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
    })();
</script><script src="https://webmk.co/sites/chabad-vallarta/vallarta-script.js"></script><title>
	Terry Barbee, Tustin, CA - Chabad of Puerto Vallarta
</title></head>
<body class="lang_en dir_ltr cco_body cco_templateless_page section_branch">
	
	
		<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.ChabadVallarta.com" style="display:block!important;font-size:14px !important;">&laquo; Back to&nbsp;Chabad of Puerto Vallarta</a></div>
	
	<div class="cco_templatelates_content">
		
	<div class="co_content_container clearfix local_content" id="co_content_container">
		<div class="clearfix">
			<!-- BEGIN HEADER --><style type="text/css">
	.cco_templateless_template,
	.cco_templateless_template a {
		background: #6C0647;
	}
.sidebar-ads co\:item {
    padding: 3%;
    text-align: center;
    background: #690645;
    display: block;
    margin-bottom: 3%
}

.section_root .sidebar-ads co\:item {
    float: left;
    width: 315px;
    padding: 12px 0;
    text-align: center;
    background: #690645;
    display: block;
    margin-left: 15px
}

body.mobile.section_root .sidebar-ads co\:item {
    float: none;
    display: block;
    width: 100%;
    margin: 5px 0
}

.section_root .sidebar-ads co\:item:first-child {
    margin: 0
}

.sidebar-ads co\:item a {
    text-decoration: none;
    position: absolute;
    width: 283px;
    height: 167px
}

.sidebar-ads co\:item img {
    width: 90%
}

.sidebar-ads co\:item .caption {
    font: 12px/18px Merriweather, times, serif;
    color: #a7a6a2;
    margin-top: 15px
}
co\:item {display:unset!important}
</style>
<div id="chabad_body_page">
    
<div id="chabad_main_content" class="container">
        


<div id="chabad_head" class="header">



<div class="chabad_header header-logo" data-href="/3951373">
<a href="/3951373" class="header-title" title="Planned Giving">
<span>
Planned Giving to Chabad of Puerto Vallarta</span></a>
<div class="header-subtitle">
<a href="/3951373" class="header-subtitle" style="text-decoration: none;">
Make Your Legacy a Jewish Future</a></div>
</div>


<div id="navigation" class="chabad_navigator_bar">
    
<div class="chabad_menu_content">
        
<ul id="menu" class="navi">
            
                    
<li class="item parent arrow">
                        
<a href="/article.asp?aid=3951374" class="parent arrow">Why Giving Matters</a>
                        
                                
                                
<div class="sub_menu">
<ul>
                            
                                
<li class="item first">
                                    
<a href="/article.asp?aid=3951375">Changing Jewish Destiny</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951376">Chabad In The News</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951377">The Rebbe's Mandate</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951378">Giving In Jewish Tradition</a>
                                </li>
                            
                                
<li class="item last">
                                    
<a href="/article.asp?aid=3951379">Donor Stories</a>
                                </li>
                            
                                </ul>
</div>
                            
                
                    |
                    </li>
                    
                
                    
<li class="item parent arrow">
                        
<a href="/article.asp?aid=3951387" class="parent arrow">Ways To Give</a>
                        
                                
                                
<div class="sub_menu">
<ul>
                            
                                
<li class="item first">
                                    
<a href="/article.asp?aid=3951388">Bequest</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951389">Charitable Gift Annuity</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951390">Real Estate</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951391">Life Insurance</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951392">Charitable Trusts</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951393">Retirement Plans</a>
                                </li>
                            
                                
<li class="item last">
                                    
<a href="/article.asp?aid=3951394">Planned Giving Videos</a>
                                </li>
                            
                                </ul>
</div>
                            
                
                    |
                    </li>
                    
                
                    
<li class="item parent arrow">
                        
<a href="/article.asp?aid=3951396" class="parent arrow">Gratitude</a>
                        
                                
                                
<div class="sub_menu">
<ul>
                            
                                
<li class="item first">
                                    
<a href="/article.asp?aid=3951397">Jewish Legacy Society</a>
                                </li>
                            
                                
<li class="item last">
                                    
<a href="/article.asp?aid=3951398">My Story</a>
                                </li>
                            
                                </ul>
</div>
                            
                
                    |
                    </li>
                    
                
                    
<li class="item parent arrow">
                        
<a href="/article.asp?aid=3951400" class="parent arrow">Resources</a>
                        
                                
                                
<div class="sub_menu">
<ul>
                            
                                
<li class="item first">
                                    
<a href="/article.asp?aid=3951401">Bequest Form</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951402">Frequently Asked Questions</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951403">Advisor Information</a>
                                </li>
                            
                                
<li class="item">
                                    
<a href="/article.asp?aid=3951404">Planned Giving Council</a>
                                </li>
                            
                                
<li class="item last">
                                    
<a href="/article.asp?aid=3951405">Glossary of Terms</a>
                                </li>
                            
                                </ul>
</div>
                            
                
                    |
                    </li>
                    
                
                    
<li class="item parent arrow">
                        
<a href="/article.asp?aid=3951406" class="parent arrow">Contact</a>
                        
                                
                                
<div class="sub_menu">
<ul>
                            
                                
<li class="item first">
                                    
<a href="/article.asp?aid=3951407">Contact Us</a>
                                </li>
                            
                                
<li class="item last">
                                    
<a href="/article.asp?aid=3951408">Share Your Story</a>
                                </li>
                            
                                </ul>
</div>
                            
                </li>

        </ul>
    </div>
</div>



</div>
        
<div class="break_floats" ></div>
        
<div id="chabad_body_content">
            
<div detached="true" type="static" id="ContentArea" name="content_area" class="chabad_left_column"><div id="content_page" class="content_page"><!-- END HEADER -->
			
			
			<div class="clearfix bh mobile-only align_right">ב"ה</div>
			
				<div class="master-content-wrapper " >
					

<header class="article-header cf ">
	
	
			<h1 class="article-header__title js-article-title js-page-title">Terry Barbee, Tustin, CA</h1>
		
			<div>
				
			</div>
		
</header>
				</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="cco_body">
		<div class="content  no_margin no_overflow" id="co_content_container">
			
			
	

	<article class="content js-content" itemscope itemtype="http://schema.org/Article">
	



<meta itemprop="mainEntityOfPage headline name" content="" />

<meta itemprop="image" content="" />


<meta itemprop="uploadDate" content="2018-02-22T13:32:56" />
<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
	<meta itemprop="name" content="Chabad of Puerto Vallarta" />
	<meta itemprop="brand" content="Chabad of Puerto Vallarta" />
	<span itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
		<meta itemprop="url" content="https://w2.chabad.org/media/images/1381/Nife13815054.png" />
		<meta itemprop="height" content="150" />
		<meta itemprop="width" content="150" />
	</span>
</span>
<meta itemprop="datePublished" content="2018-02-22T13:32:56" />
			<div itemprop="articleBody">
				<co:body xmlns:co="www1.chabadonline.com/alpha1" xmlns:ext="urn:xslt-extensions">
  <div class="co_body article-body cf">
    <p><img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/terry-barbee_530-272.png" width="485" alt="Terry Barby"></p>
<h4 id="Terry-Barbee">Leaving a Jewish Legacy to Chabad</h4>
<div>
      <p><em>Interview with Terry Barbee, Tustin, CA;</em></p>
<p><strong>What inspired you to become a Legacy donor to Chabad of Tustin?</strong></p>
<p>I was inspired by our Rabbi and his energy and determination in reaching out to Jews across the community; I was inspired by his vision for our congregation and our Shul. I made the decision to leave a monetary gift to Chabad of Tustin when I was having a living trust assembled. For me, it was the perfect time to make a definite commitment to support our Chabad Center.</p>
<p><strong>When you think of Chabad of Tustin, what key words or phrases come to your mind?</strong></p>
<p>My first thought is ‘My Jewish family’. I feel that our shul is an extension of my own family, and its members - my fellow Jews - keep the shul alive and moving forward.</p>
<p>In short, our close friendship and admiration for my Rabbi and his family. Performing Mitzvot, Learning Torah, Davening on Saturday mornings, and immersion in the entire Chabad experience, from Tustin to Crown Heights.</p>
<p><strong>What was the single most important consideration in your decision to make a Planned Gift to Chabad of Tustin?</strong></p>
<p>Is Chabad an ethical, honorable Jewish entity? If I make a monetary contribution to Chabad of Tustin, will the gift be wisely and appropriately used to further Judaism and to attract older and younger members? After getting to know Rabbi Shuey and Rebbetzin Blumi, I feel very much at peace with my decision to make a Legacy gift to Chabad.</p>
<p><strong>Is there an important moment, person or special occasion at Chabad that influenced your decision?</strong></p>
<p>Yes. My first Saturday at Chabad of Tustin, when I was called to the Torah by Rabbi Shuey. No sooner had I sat down with the other congregants than Rabbi Shuey called on me and asked for my Jewish name. I told him. Then he said: ‘Have you ever had an aliyah from the Torah?’ I replied, ‘No, I haven’t.’ He told me, ‘Well, today’s your lucky day.’ And it turned out he was right.</p>
    </div>
</div>
</co:body>
			</div>
			

			<div class="break_floats"></div>
			
	<div class="break_floats"></div>
	

<div class="content-footer">
	
	
	
	
	
	
</div>
	</article>

		</div>
	</div>
</div>
						
						<div class="break_floats"></div>
						
					</div>
				</div>
				
				
				
			</div>
			
			<!-- BEGIN FOOTER --></div></div><div class="co_section">
            
<div class="co_section_head">
                
<div>In this Section</div>
            </div>
            
<div class="co_section_body">
                
<div class="co_section_gradient">
                    
<div class="co_section_text">
    
        
<div class="item first">
            
<span>●</span>
<a href="/article.asp?aid=3951380">Michael Leon, Indianapolis, IN</a>
        </div>
    
        
<div class="item">
            
<span>●</span>
<a href="/article.asp?aid=3951381">Paul Hoffman, San Francisco, CA</a>
        </div>
    
        
<div class="item">
            
<span>●</span>
<a href="/article.asp?aid=3951382">Mannie Gold, Bondi Beach, Australia</a>
        </div>
    
        
<div class="item">
            
<span>●</span>
<a href="/article.asp?aid=3951383">Herman Stern, Tenafly, NJ</a>
        </div>
    
        
<div class="item">
            
<span>●</span>
<a href="/article.asp?aid=3951384">Harriet Cohen, Springfield, MA</a>
        </div>
    
        
<div class="item">
            
<span>●</span>
<a href="/article.asp?aid=3951385">Arthur Karter, Fairlawn, NJ</a>
        </div>
    
        
<div class="item last">
            
<span>●</span>
<a href="/article.asp?aid=3951386">Terry Barbee, Tustin, CA</a>
        </div>
    
                        </div>
                    </div>
                </div>
            
<div class="co_section_footer" ></div>
        </div>
<div class="chabad_right_column">
<div class="caption" id="contact-address">

<p>Rabbi Shneur Hecht<br/>52-322-141-7279<br/>
<a href="mailto:Rabbi@chabadvallarta.com">Rabbi@chabadvallarta.com</a><br/>                 &#160;</p>
<p>
<strong>Mexican Address</strong><br/>Chabad of Puerto Vallarta<br/>                 Francisco Medina Asencio 1951 Local 1C<br/>                 Puerto Vallarta, Mexico, 4833</p>
<p>
<strong>U.S. Legal Address (501c3 Non for Profit)</strong><br/>Chabad of Puerto Vallarta, Inc.&#160;<br/>717 Crown St<br/>Brooklyn NY 11213</p>
<p></p>
<p></p>
<p></p>
<p id=":1sv" jslog="20277; u014N:xr6bB; 1:WyIjdGhyZWFkLWY6MTU2MzcxNTAwOTQ3NTc4MzgzOCJd; 4:WyIjbXNnLWY6MTU2MzcxNTAwOTQ3NTc4MzgzOCIsbnVsbCxudWxsLG51bGwsMSwwLFsxLDAsMF0sNiw0MCxudWxsLG51bGwsbnVsbCxudWxsLG51bGwsMSxudWxsLG51bGwsbnVsbCxudWxsLG51bGwsbnVsbCxudWxsLG51bGwsbnVsbCwwLDBd"></p>
<p id=":1sw"></p>
<p dir="auto"></p>
<p dir="auto">EIN 81-2786067</p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
<ul class="sidebar-ads">


<li>

<a href="/3951375" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-jewish-destiny.png" alt="Changing Jewish Destiny" border="0" />
<div class="caption">
Changing Jewish Destiny</div>

</li>



<li>

<a href="/3951398" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-testimony.png" border="0" />
<div class="caption">
My Story</div>
</li>



<li>

<a href="/3951394" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-planned-giving.png" border="0" />
<div class="caption">
Planned Giving Videos</div>

</li>


</ul>

</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.chabadvallarta.com%2ftemplates%2farticlecco_cdo%2faid%2f3951386%2fjewish%2fTerry-Barbee-Tustin-CA.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=Terry+Barbee%2c+Tustin%2c+CA+-+Chabad+of+Puerto+Vallarta&amp;url=https%3a%2f%2fwww.chabadvallarta.com%2ftemplates%2farticlecco_cdo%2faid%2f3951386%2fjewish%2fTerry-Barbee-Tustin-CA.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=Terry+Barbee%2c+Tustin%2c+CA+-+Chabad+of+Puerto+Vallarta https%3a%2f%2fwww.chabadvallarta.com%2ftemplates%2farticlecco_cdo%2faid%2f3951386%2fjewish%2fTerry-Barbee-Tustin-CA.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.chabadvallarta.com%2ftemplates%2farticlecco_cdo%2faid%2f3951386%2fjewish%2fTerry-Barbee-Tustin-CA.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dpinterest&amp;description=Terry+Barbee%2c+Tustin%2c+CA+-+Chabad+of+Puerto+Vallarta">
				<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, 3951379);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 Puerto Vallarta</span>
		<div class="footer-address">
			<span class="footer-street">Francisco Medina Asencio 1951 Local 1a</span>
			<span class="footer-city-state">Puerto Vallarta, JAL 48333</span>
		</div>
			<span class="footer-country">Mexico</span><span>52-322-141-7279</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-1.8.3.min.js?v=14C45307"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery/jquery.tools.expose.min.js?v=AB0A58F7"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery.tools.1.2.7.min.js?v=FBC14E36"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/co/dist/CoLib.js?v=AD4120C1"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/WebComponents/bundles/magen-cdo-global.js?v=3981EDBB"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/templates/plannedgiving/custom.js?v=8742C543"></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/multimedia/infolayer.js?v=ED1B8531"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/article/comments/reply-form-controller.js?v=A6DD086C"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/commentsloader.js?v=AD6AAB79"></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=ECED4238"></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 Puerto Vallarta'}; Co.ArticleId     = '3951386';Co.SectionId     = 3951373;Co.PartnerSiteId = 0;Co.SiteId        = 10089;Co.IsMobilePage  = false;Co.IsResponsive  = false;Co.DbDomain      = 'ChabadVallarta.com';Co.LanguageCode  = '';Co.LoginStatus   = 'None';</script>
	
	
 





<!-- ===== CHALLAH PROJECT ORDER FORM (form 7628904) — START ===== -->

<!-- ===== CHALLAH PROJECT ORDER FORM — END ===== -->

<!-- CV-HOME-DESIGN START [PAUSED Nov 27 2026: script type changed from text/javascript to text/plain so it does not run; to turn back on, change it back to text/javascript] (new home page design; the design lives in hidden page 7640929. To revert, delete from here to CV-HOME-DESIGN END) -->

<!-- CV-HOME-DESIGN END -->

<script>var _msdaf_id= 'f0736218b3749'</script><script src='https://app.dafwidget.com/api/js/source.js'></script><script>
(function () {

  // ============================================================
  // GATE ON URL
  // ============================================================
  if (!window.location.href.includes('7418518')) return;

  // ============================================================
  // CONFIG — Google Sheet published as CSV.
  // Columns: Item Name, Image URL  (match on the item name WITHOUT the price)
  // File > Share > Publish to web > (this sheet) > CSV
  // ============================================================
  var SHEET_CSV = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vT8uOBS4hwLW0OCJMFARCg503mTDQX9O9JN0F6H2ZPXVjSWOjj_hJMParRB7pPo70EevF0-VcogA9te/pub?gid=0&single=true&output=csv';

  // ============================================================
  // CONDITIONAL SUB-FIELDS
  //   [ conditional <li> id , EXACT item name (data-pv-name) ]
  // ============================================================
  var SUB_FIELDS = [
    ['id_74', 'Grilled Salmon'],
    ['id_75', 'Grilled Chicken'],
    ['id_76', 'Shnitzel']
  ];
  // ============================================================
  // FONTS
  // ============================================================
  var fontLink = document.createElement('link');
  fontLink.rel  = 'stylesheet';
  fontLink.href = 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap';
  document.head.appendChild(fontLink);

  // ============================================================
  // STYLES
  // ============================================================
  var style = document.createElement('style');
  style.textContent = `
    :root {
      --pv-primary:        #b48a80;   /* warm terracotta/rose from old form */
      --pv-primary-dark:   #9a6f65;
      --pv-primary-light:  rgba(180,138,128,0.45);
      --pv-primary-faint:  rgba(180,138,128,0.06);
      --pv-primary-border: rgba(180,138,128,0.35);
      --pv-primary-bg:     rgba(180,138,128,0.13);
      --pv-text-dark:  #3b3b3b;
      --pv-text-med:   #535353;
      --pv-text-light: #8b8b8b;
      --pv-border:       #e0d6d3;
      --pv-border-light: #efe9e7;
      --pv-bg-input: #efe9e7;
      --pv-bg-light: #faf7f6;
      --pv-shadow:   0px 2px 10px rgba(0,0,0,0.05);
      --pv-radius: 12px;
    }

    /* ── SHELL ─────────────────────────────────── */
    #formContainer .form-all {
      font-family: 'Poppins', sans-serif !important;
      width: 100% !important;
      max-width: 1040px !important;
      margin: 0 auto !important;
      padding: 30px 20px 100px !important;
      background: #fff !important;
      box-shadow: none !important;
    }
li#id_72 { display: none !important; }
    .co_body .content .form-all li.form-input-wide,
    .co_body .content .form-all .form-line { padding: 0 !important; }
    .co_body .content .form-all .form-line { grid-template-columns: unset !important; }
    .form-section { list-style: none !important; padding: 0 !important; margin: 0 !important; }
    .form-all .form-label, .form-all .form-label-left, .form-all .form-label-right { width: auto !important; float: none !important; }
    .form-all .label-message { display: none !important; }
    #GenFormStyles { display: none !important; }

    /* ── SECTION HEADERS ───────────────────────── */
    .form-all .form-input-wide .form-header-group {
      margin: 50px 0 20px !important; background: transparent !important; border: none !important; padding: 0 !important; text-align: center !important;
    }
    #cid_1 .form-header-group { margin-top: 10px !important; }
    .form-all h2.form-header {
      font-family: 'Playfair Display', serif !important; font-weight: 700 !important;
      font-size: 34px !important; color: var(--pv-primary) !important;
      text-transform: capitalize !important; margin: 0 !important; padding: 0 !important;
      border: none !important; background: transparent !important; line-height: 1.15 !important;
    }
    .form-all .form-subHeader {
      font-family: 'Poppins', sans-serif !important; font-weight: 400 !important;
      font-size: 15px !important; color: var(--pv-text-light) !important;
      margin-top: 8px !important; text-transform: none !important;
    }

    /* ── ITEM GRID: 2 PER ROW ──────────────────── */
    .pv-item-grid {
      display: grid !important; grid-template-columns: repeat(2, 1fr) !important;
      gap: 16px !important; width: 100% !important; margin-bottom: 6px !important;
      align-items: start !important;
    }
    li.form-line.pv-menu-item {
      border: 1px solid var(--pv-border) !important; border-radius: var(--pv-radius) !important;
      box-shadow: var(--pv-shadow) !important; overflow: hidden !important;
      display: flex !important; align-items: center !important; padding: 0 !important;
      min-height: 120px !important; position: relative !important;
      transition: border-color 0.25s, box-shadow 0.25s !important; background: #fff !important; margin: 0 !important;
    }
    li.form-line.pv-menu-item.pv-selected {
      border: 2px solid var(--pv-primary) !important; box-shadow: 0 0 0 1px var(--pv-primary) !important;
    }
    .pv-item-card { padding: 10px !important; display: flex !important; align-items: center !important; width: 100% !important; height: 100% !important; min-width: 0 !important; gap: 12px !important; }
    .pv-item__img { width: 92px !important; height: 92px !important; border-radius: 8px !important; object-fit: cover !important; flex-shrink: 0 !important; background: var(--pv-bg-light) !important; display: block !important; }
    .pv-item__info { display: flex !important; flex-direction: column !important; gap: 2px !important; flex: 1 !important; min-width: 0 !important; }
    .pv-item__name { font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 16px !important; color: var(--pv-text-dark) !important; text-transform: capitalize !important; line-height: 1.2 !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: none !important; }
    .pv-item__desc { font-family: 'Poppins', sans-serif !important; font-weight: 400 !important; font-size: 12px !important; color: var(--pv-text-light) !important; margin: 2px 0 0 !important; padding: 0 !important; line-height: 1.35 !important; }
    .pv-item__price { font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 17px !important; color: var(--pv-primary) !important; margin-top: 6px !important; }
    .pv-item__ctrl { display: flex !important; flex-direction: column !important; align-items: flex-end !important; flex-shrink: 0 !important; }
    .pv-qty-control { display: flex !important; align-items: center !important; gap: 2px !important; background: var(--pv-bg-input) !important; border: 1px solid var(--pv-primary-border) !important; border-radius: 8px !important; padding: 3px 4px !important; height: 44px !important; width: 118px !important; box-sizing: border-box !important; transition: all 0.25s !important; }
    .pv-qty-btn { width: 34px !important; height: 36px !important; background: #fff !important; border: none !important; border-radius: 6px !important; cursor: pointer !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 20px !important; font-family: 'Poppins', sans-serif !important; color: var(--pv-text-dark) !important; line-height: 1 !important; flex-shrink: 0 !important; transition: background 0.15s, transform 0.1s !important; padding: 0 !important; }
    .pv-qty-btn:hover { background: #f0ebe9 !important; }
    .pv-qty-btn:active { transform: scale(0.9) !important; }
    .pv-qty-display { flex: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 17px !important; color: var(--pv-text-dark) !important; background: rgba(255,255,255,0.5) !important; border-radius: 6px !important; height: 36px !important; user-select: none !important; }
    li.form-line.pv-menu-item.pv-selected .pv-qty-control { background: var(--pv-primary) !important; border-color: var(--pv-primary) !important; }
    li.form-line.pv-menu-item.pv-selected .pv-qty-btn { background: rgba(255,255,255,0.18) !important; color: #fff !important; }
    li.form-line.pv-menu-item.pv-selected .pv-qty-btn:hover { background: rgba(255,255,255,0.3) !important; }
    li.form-line.pv-menu-item.pv-selected .pv-qty-display { background: transparent !important; color: #fff !important; }

    /* ── NESTED CONDITIONAL SUB-FIELD (inside a card) ── */
    li.form-line.pv-menu-item.pv-has-sub {
      flex-direction: column !important; align-items: stretch !important; overflow: visible !important;
    }
    li.form-line.pv-menu-item.pv-has-sub .pv-item-card { width: 100% !important; height: auto !important; }
    li.form-line.pv-sub-field {
      width: 100% !important; margin: 0 !important; padding: 12px !important;
      box-sizing: border-box !important; border: none !important;
      border-top: 1px dashed var(--pv-border) !important;
      background: transparent !important; box-shadow: none !important;
      min-height: 0 !important; list-style: none !important; float: none !important;
    }
    li.form-line.pv-sub-field .form-label-left,
    li.form-line.pv-sub-field .form-label {
      position: static !important; opacity: 1 !important; width: 100% !important; height: auto !important;
      float: none !important; display: block !important; overflow: visible !important;
      pointer-events: auto !important; margin: 0 0 6px !important; padding: 0 !important; text-align: left !important;
    }
    li.form-line.pv-sub-field label {
      font-family: 'Poppins', sans-serif !important; font-weight: 600 !important;
      font-size: 13px !important; color: var(--pv-text-med) !important;
      float: none !important; width: auto !important; margin: 0 !important;
    }
    li.form-line.pv-sub-field .form-required { color: var(--pv-primary) !important; }
    li.form-line.pv-sub-field .form-input,
    li.form-line.pv-sub-field .form-input-wide {
      position: static !important; opacity: 1 !important; width: 100% !important; height: auto !important;
      float: none !important; display: block !important; max-width: 100% !important;
      overflow: visible !important; pointer-events: auto !important; padding: 0 !important;
    }
    li.form-line.pv-sub-field .form-dropdown,
    li.form-line.pv-sub-field select {
      width: 100% !important; max-width: 100% !important; height: 44px !important;
      border: 2px solid var(--pv-border-light) !important; border-radius: 10px !important;
      padding: 0 12px !important; font-family: 'Poppins', sans-serif !important;
      font-size: 14px !important; color: var(--pv-text-dark) !important;
      background: #fff !important; box-sizing: border-box !important; outline: none !important; box-shadow: none !important;
    }
    li.form-line.pv-sub-field .form-dropdown:focus,
    li.form-line.pv-sub-field select:focus { border-color: var(--pv-primary) !important; }

    /* ── SECTION BOX (Shabbat / grouped sections) ─ */
    .pv-section-box {
      border: 1px solid var(--pv-primary-border) !important; border-radius: 16px !important;
      background: var(--pv-primary-faint) !important; padding: 10px 26px 30px !important;
      margin: 40px 0 10px !important;
    }
    .pv-section-box .form-header-group { margin-top: 30px !important; }

    /* ── TOP NOTES BLOCK (#id_36) ──────────────── */
    #id_36 { margin-bottom: 20px !important; }
    #text_36 {
      border: 1px solid var(--pv-primary-border) !important; border-radius: var(--pv-radius) !important;
      background: var(--pv-primary-faint) !important; padding: 22px 28px !important;
      font-family: 'Poppins', sans-serif !important; color: var(--pv-text-dark) !important;
    }
    #text_36 p { font-family: 'Poppins', sans-serif !important; font-size: 14px !important; color: var(--pv-text-med) !important; margin: 0 0 8px !important; line-height: 1.5 !important; }
    #text_36 p b, #text_36 p strong { color: var(--pv-primary-dark) !important; }
    #text_36 ul { margin: 8px 0 0 !important; padding-left: 20px !important; }
    #text_36 li { font-family: 'Poppins', sans-serif !important; font-size: 13px !important; color: var(--pv-text-med) !important; line-height: 1.6 !important; margin-bottom: 4px !important; }

    /* ── DONATION (#id_57 control_amount) ──────── */
    #id_57 { margin-top: 15px !important; }
    #id_57 #label_57, #id_57 .form-label-left {
      display: block !important; float: none !important; width: 100% !important; text-align: center !important; margin-bottom: 14px !important;
    }
    #id_57 #label_57 label {
      font-family: 'Playfair Display', serif !important; font-weight: 700 !important;
      font-size: 22px !important; color: var(--pv-primary) !important;
    }
    #id_57 .form-input { width: 100% !important; max-width: 100% !important; float: none !important; }
    #id_57 .form-multiple-column {
      display: flex !important; flex-wrap: wrap !important; gap: 12px !important; justify-content: center !important; width: 100% !important;
    }
    #id_57 .clearfix { display: none !important; }
    #id_57 .form-radio-item {
      flex: 1 1 130px !important; max-width: 200px !important; clear: none !important; float: none !important;
      display: flex !important; align-items: center !important; justify-content: center !important; gap: 10px !important;
      background: var(--pv-bg-light) !important; border: 1px solid var(--pv-border) !important;
      border-radius: var(--pv-radius) !important; padding: 16px 18px !important; cursor: pointer !important;
      box-sizing: border-box !important; margin: 0 !important; transition: border-color 0.15s, background 0.15s !important;
    }
    #id_57 .form-radio-item:hover { border-color: var(--pv-primary) !important; }
    #id_57 .form-radio-item.pv-checked { border-color: var(--pv-primary) !important; background: var(--pv-primary-bg) !important; }
    #id_57 .form-radio, #id_57 input[type="radio"] {
      appearance: none !important; -webkit-appearance: none !important; width: 20px !important; height: 20px !important; min-width: 20px !important;
      border: 2px solid var(--pv-border) !important; border-radius: 50% !important; margin: 0 !important; cursor: pointer !important;
      position: relative !important; flex-shrink: 0 !important; background: #fff !important; transition: border-color 0.15s !important;
    }
    #id_57 input[type="radio"]:checked { border-color: var(--pv-primary) !important; }
    #id_57 input[type="radio"]:checked::after {
      content: '' !important; position: absolute !important; top: 50% !important; left: 50% !important;
      transform: translate(-50%, -50%) !important; width: 10px !important; height: 10px !important;
      border-radius: 50% !important; background: var(--pv-primary) !important;
    }
    #id_57 .form-radio-item label { font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 17px !important; color: var(--pv-text-dark) !important; cursor: pointer !important; margin: 0 !important; float: none !important; width: auto !important; }
    #id_57 .form-radio-other-input {
      appearance: auto !important; -webkit-appearance: auto !important; width: 90px !important; height: auto !important;
      border: 2px solid var(--pv-border-light) !important; border-radius: 8px !important; padding: 8px 10px !important;
      font-family: 'Poppins', sans-serif !important; font-size: 15px !important; background: #fff !important;
    }

    /* ── ORDER SUMMARY BOX ─────────────────────── */
    #pv-order-box-el {
      border: 1px solid var(--pv-primary-light) !important; border-radius: 14px !important;
      padding: 30px !important; margin-top: 55px !important; background: #fff !important; display: none;
    }
    .pv-order-box-title { font-family: 'Playfair Display', serif !important; font-weight: 700 !important; font-size: 28px !important; color: var(--pv-text-dark) !important; margin: 0 0 16px !important; }
    .pv-order-divider { width: 100% !important; height: 1px !important; background: var(--pv-border) !important; margin-bottom: 22px !important; }
    #id_67 { padding: 0 !important; margin: 0 !important; }
    .pv-order-items { display: flex !important; flex-direction: column !important; gap: 12px !important; margin-bottom: 18px !important; }
    .pv-order-line { display: flex !important; align-items: center !important; justify-content: space-between !important; padding-bottom: 8px !important; border-bottom: 1px dashed var(--pv-border-light) !important; animation: pvFadeUp 0.3s ease forwards !important; }
    @keyframes pvFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    .pv-order-line__left { display: flex !important; align-items: center !important; gap: 16px !important; }
    .pv-order-qty  { font-family:'Poppins',sans-serif !important; font-weight:700 !important; font-size:16px !important; color:var(--pv-primary) !important; }
    .pv-order-name { font-family:'Poppins',sans-serif !important; font-weight:400 !important; font-size:18px !important; color:var(--pv-text-dark) !important; }
    .pv-order-price{ font-family:'Poppins',sans-serif !important; font-weight:600 !important; font-size:18px !important; color:var(--pv-text-dark) !important; }
.pv-order-side {
      display: inline-block !important; margin-left: 10px !important;
      font-family: 'Poppins', sans-serif !important; font-weight: 500 !important;
      font-size: 12px !important; color: var(--pv-primary-dark) !important;
      background: var(--pv-primary-bg) !important; border-radius: 20px !important;
      padding: 3px 11px !important; vertical-align: middle !important; white-space: nowrap !important;
    }
    .pv-order-side--empty {
      color: var(--pv-text-light) !important; background: var(--pv-bg-light) !important;
      border: 1px dashed var(--pv-border) !important; font-style: italic !important;
    }

    /* ── NESTED CONDITIONAL SUB-FIELD (inside a card) ── */
    li.form-line.pv-menu-item.pv-has-sub {
      flex-direction: column !important; align-items: stretch !important; overflow: visible !important;
    }
    li.form-line.pv-menu-item.pv-has-sub .pv-item-card { width: 100% !important; height: auto !important; order: 1 !important; }
    li.form-line.pv-menu-item.pv-has-sub .form-label-left,
    li.form-line.pv-menu-item.pv-has-sub > .form-input { order: 0 !important; }
    li.form-line.pv-sub-field {
      width: 100% !important; margin: 0 !important; padding: 12px !important;
      box-sizing: border-box !important; border: none !important;
      border-top: 1px dashed var(--pv-border) !important;
      background: transparent !important; box-shadow: none !important;
      min-height: 0 !important; list-style: none !important; float: none !important;
      order: 2 !important;
    }
    li.form-line.pv-sub-field .form-label-left,
    li.form-line.pv-sub-field .form-label {
      position: static !important; opacity: 1 !important; width: 100% !important; height: auto !important;
      float: none !important; display: block !important; overflow: visible !important;
      pointer-events: auto !important; margin: 0 0 6px !important; padding: 0 !important; text-align: left !important;
    }
    li.form-line.pv-sub-field label {
      font-family: 'Poppins', sans-serif !important; font-weight: 600 !important;
      font-size: 13px !important; color: var(--pv-text-med) !important;
      float: none !important; width: auto !important; margin: 0 !important;
    }
    li.form-line.pv-sub-field .form-required { color: var(--pv-primary) !important; }
    li.form-line.pv-sub-field .form-input,
    li.form-line.pv-sub-field .form-input-wide {
      position: static !important; opacity: 1 !important; width: 100% !important; height: auto !important;
      float: none !important; display: block !important; max-width: 100% !important;
      overflow: visible !important; pointer-events: auto !important; padding: 0 !important;
    }
    li.form-line.pv-sub-field .form-dropdown,
    li.form-line.pv-sub-field select {
      width: 100% !important; max-width: 100% !important; height: 44px !important;
      border: 2px solid var(--pv-border-light) !important; border-radius: 10px !important;
      padding: 0 12px !important; font-family: 'Poppins', sans-serif !important;
      font-size: 14px !important; color: var(--pv-text-dark) !important;
      background: #fff !important; box-sizing: border-box !important; outline: none !important; box-shadow: none !important;
    }
    li.form-line.pv-sub-field .form-dropdown:focus,
    li.form-line.pv-sub-field select:focus { border-color: var(--pv-primary) !important; }
    li.form-line.pv-sub-field .form-error-message,
    li.form-line.pv-sub-field .form-error-arrow {
      position: static !important; margin-top: 6px !important; max-width: 100% !important;
      box-sizing: border-box !important; font-family: 'Poppins', sans-serif !important; font-size: 12px !important;
    }
    #id_67 {
      display: flex !important; align-items: center !important; justify-content: space-between !important;
      background: var(--pv-primary-bg) !important; border-radius: 8px !important; padding: 20px 22px !important; margin-top: 0 !important;
    }
    #id_67 #label_67 { width: auto !important; float: none !important; }
    #id_67 #label_67 label { font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 22px !important; color: var(--pv-text-dark) !important; }
    #id_67 #cid_67 { float: none !important; max-width: none !important; }
    #total_amount { font-family: 'Poppins', sans-serif !important; font-weight: 800 !important; font-size: 24px !important; color: var(--pv-primary) !important; }

    /* ── DELIVERY + CHECKOUT BOX ───────────────── */
    #pv-checkout-box-el {
      border: 1px solid var(--pv-primary-light) !important; border-radius: 14px !important;
      padding: 34px !important; margin-top: 40px !important; background: #fff !important;
    }
    #pv-checkout-box-el .form-header-group { margin-top: 0 !important; text-align: left !important; margin-bottom: 20px !important; }
    #pv-checkout-box-el h2.form-header { font-size: 26px !important; }
    #pv-checkout-box-el .form-line { display: flex !important; flex-direction: column !important; padding: 0 0 20px !important; width: 100% !important; }
    #pv-checkout-box-el .form-input, #pv-checkout-box-el .form-input-wide { width: 100% !important; float: none !important; max-width: 100% !important; display: block !important; }
    #pv-checkout-box-el .form-label-left { width: 100% !important; float: none !important; display: block !important; margin-bottom: 8px !important; }
    #pv-checkout-box-el .form-label-left label { font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 16px !important; color: var(--pv-text-med) !important; }
    #pv-checkout-box-el .form-textbox, #pv-checkout-box-el .form-dropdown {
      width: 100% !important; height: 52px !important; border: 2px solid var(--pv-border-light) !important;
      border-radius: var(--pv-radius) !important; padding: 0 16px !important; font-family: 'Poppins', sans-serif !important;
      font-size: 16px !important; color: var(--pv-text-dark) !important; outline: none !important;
      transition: border-color 0.15s !important; box-sizing: border-box !important; background: #fff !important; box-shadow: none !important;
    }
    #pv-checkout-box-el .form-textbox:focus, #pv-checkout-box-el .form-dropdown:focus { border-color: var(--pv-primary) !important; }
    #pv-checkout-box-el .form-textarea {
      width: 100% !important; min-height: 120px !important; border: 2px solid var(--pv-border-light) !important;
      border-radius: var(--pv-radius) !important; padding: 14px 16px !important; font-family: 'Poppins', sans-serif !important;
      font-size: 16px !important; color: var(--pv-text-dark) !important; outline: none !important; resize: vertical !important;
      transition: border-color 0.15s !important; box-sizing: border-box !important;
    }
    #pv-checkout-box-el .form-textarea:focus { border-color: var(--pv-primary) !important; }
    #pv-checkout-box-el .form-sub-label { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; color: var(--pv-text-light) !important; margin-top: 4px !important; display: block !important; }
    /* date fields */
    #pv-checkout-box-el .date-fields { display: inline-flex !important; align-items: center !important; gap: 4px !important; background: #fff !important; border: 2px solid var(--pv-border-light) !important; border-radius: var(--pv-radius) !important; padding: 0 14px !important; height: 52px !important; }
    #pv-checkout-box-el .date-fields:focus-within { border-color: var(--pv-primary) !important; }
    #pv-checkout-box-el .date-fields input.form-textbox { border: none !important; height: auto !important; width: 40px !important; padding: 0 !important; text-align: center !important; background: transparent !important; }
    #pv-checkout-box-el #year_63 { width: 60px !important; }
    #pv-checkout-box-el .date-fields .form-sub-label { display: none !important; }
    #pv-checkout-box-el .date-fields img { width: 22px !important; cursor: pointer !important; flex-shrink: 0 !important; }
    /* whatsapp checkbox #id_65 */
    #id_65 .form-single-column { display: flex !important; gap: 12px !important; }
    #id_65 .clearfix { display: none !important; }
    #id_65 .form-checkbox-item { display: flex !important; align-items: center !important; gap: 10px !important; background: var(--pv-bg-light) !important; border: 1px solid var(--pv-border) !important; border-radius: 8px !important; padding: 12px 18px !important; cursor: pointer !important; clear: none !important; float: none !important; }
    #id_65 .form-checkbox { appearance: none !important; -webkit-appearance: none !important; width: 22px !important; height: 22px !important; min-width: 22px !important; border: 2px solid #bbb !important; border-radius: 4px !important; cursor: pointer !important; position: relative !important; background: #fff !important; margin: 0 !important; transition: all 0.2s !important; }
    #id_65 .form-checkbox:checked { background: var(--pv-primary) !important; border-color: var(--pv-primary) !important; }
    #id_65 .form-checkbox:checked::after { content: '' !important; position: absolute !important; left: 6px !important; top: 2px !important; width: 6px !important; height: 11px !important; border: solid #fff !important; border-width: 0 2px 2px 0 !important; transform: rotate(45deg) !important; }
    #id_65 .form-checkbox-item label { font-family: 'Poppins', sans-serif !important; font-weight: 500 !important; font-size: 15px !important; color: var(--pv-text-dark) !important; cursor: pointer !important; margin: 0 !important; float: none !important; width: auto !important; }
    /* whatsapp note #id_66 */
    #id_66 #text_66 p { font-family: 'Poppins', sans-serif !important; font-style: italic !important; font-size: 13px !important; color: var(--pv-text-med) !important; text-align: center !important; margin: 6px 0 0 !important; }

    /* opt-in checkbox #id_71 */
    #id_71 { padding: 0 0 20px !important; }
    #id_71 .form-label-hidden, #id_71 #label_71 { display: none !important; }
    #id_71 .form-input { width: 100% !important; float: none !important; max-width: 100% !important; }
    #id_71 .form-checkbox-item { display: flex !important; align-items: center !important; gap: 12px !important; background: var(--pv-bg-light) !important; border: 1px solid var(--pv-border) !important; border-radius: var(--pv-radius) !important; padding: 14px 18px !important; cursor: pointer !important; clear: none !important; float: none !important; }
    #id_71 .form-checkbox { appearance: none !important; -webkit-appearance: none !important; width: 22px !important; height: 22px !important; min-width: 22px !important; border: 2px solid #bbb !important; border-radius: 4px !important; cursor: pointer !important; position: relative !important; background: #fff !important; margin: 0 !important; flex-shrink: 0 !important; transition: all 0.2s !important; }
    #id_71 .form-checkbox:checked { background: var(--pv-primary) !important; border-color: var(--pv-primary) !important; }
    #id_71 .form-checkbox:checked::after { content: '' !important; position: absolute !important; left: 6px !important; top: 2px !important; width: 6px !important; height: 11px !important; border: solid #fff !important; border-width: 0 2px 2px 0 !important; transform: rotate(45deg) !important; }
    #id_71 label { font-family: 'Poppins', sans-serif !important; font-weight: 500 !important; font-size: 15px !important; color: var(--pv-text-dark) !important; cursor: pointer !important; margin: 0 !important; float: none !important; width: auto !important; }

    /* payment #id_68 */
    #id_68 .form-payment-methods { display: none !important; }
    #id_68 .form-address-table { width: 100% !important; }
    #id_68 th { font-family: 'Poppins', sans-serif !important; text-align: left !important; padding: 16px 0 8px !important; color: var(--pv-text-dark) !important; font-size: 17px !important; font-weight: 600 !important; }
    #id_68 .cc-icons { display: flex !important; gap: 8px !important; margin: 6px 0 !important; }
    #id_68 .form-sub-label-container { display: block !important; margin-bottom: 10px !important; }
    #id_68 .form-textbox, #id_68 .form-dropdown {
      width: 100% !important; height: 50px !important; border: 2px solid var(--pv-border-light) !important;
      border-radius: var(--pv-radius) !important; padding: 0 14px !important; font-family: 'Poppins', sans-serif !important;
      font-size: 15px !important; box-sizing: border-box !important; background: #fff !important;
    }
    #id_68 .form-textbox:focus, #id_68 .form-dropdown:focus { border-color: var(--pv-primary) !important; outline: none !important; }
    #id_68 .form-sub-label { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; color: var(--pv-text-light) !important; margin-top: 4px !important; display: block !important; }

    /* confirmation note #id_69 */
    #id_69 #text_69 p { font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 14px !important; color: var(--pv-text-dark) !important; text-align: center !important; margin: 10px 0 !important; }

    /* submit */
    .form-buttons-wrapper { text-indent: 0 !important; text-align: center !important; }
    .form-submit-button {
      width: 100% !important; background: var(--pv-primary) !important; border: none !important; border-radius: 14px !important;
      padding: 22px !important; font-family: 'Poppins', sans-serif !important; font-weight: 600 !important; font-size: 22px !important;
      color: #fff !important; cursor: pointer !important; display: block !important; transition: background 0.2s, transform 0.1s !important; margin: 10px auto 0 !important;
    }
    .form-submit-button:hover { background: var(--pv-primary-dark) !important; }
    .form-submit-button:active { transform: scale(0.99) !important; }

    @media (max-width: 768px) {
      .pv-item-grid { grid-template-columns: 1fr !important; }
      #formContainer .form-all { padding: 20px 12px 80px !important; }
      .pv-section-box { padding: 6px 14px 20px !important; }
      .form-all h2.form-header { font-size: 26px !important; }
      .pv-item__img { width: 76px !important; height: 76px !important; }
      .pv-item__name { font-size: 14px !important; }
      .pv-qty-control { width: 108px !important; }
      #pv-order-box-el, #pv-checkout-box-el { padding: 20px !important; }
    }
  `;
  document.head.appendChild(style);

  // ============================================================
  // INIT
  // ============================================================
  function ready(fn){ if(document.readyState!=='loading'){fn();} else {document.addEventListener('DOMContentLoaded',fn);} }

  ready(function () {

    // 1. Transform every number input into a card
    document.querySelectorAll('input[data-type="input-number"]').forEach(function (input) {
      var li = input.closest('li.form-line');
      if (li) transformToCard(li, input);
    });

    // 1b. Move conditional sub-fields INSIDE their parent item card
    //     (must run before grid grouping so the run isn't broken)
    SUB_FIELDS.forEach(function (pair) { nestConditional(pair[0], pair[1]); });

    // 2. Group consecutive item cards into 2-col grids (per section)
    groupItemsIntoGrids();

    // 3. Box up the Shabbat section (headers 24 + 25 through the last Shabbos item #id_35)
    boxSection('cid_24', ['cid_24','cid_25','id_26','id_27','id_28','id_29','id_30','id_31','id_32','id_33','id_34','id_35']);

    // 4. Donation radio styling
    setupDonation();

    // 5. Order summary
    setupOrderSummary();
    wrapOrderSection();

    // 6. Delivery + checkout box
    wrapCheckoutSection();

    updateOrderSummary();

    // 7. Images
    if (SHEET_CSV && SHEET_CSV.indexOf('http') === 0) fetchImages();

    // 8. Save phone + name for the receipt / office email
    var kvForm = document.getElementById('7418518');
    if (kvForm) {
      kvForm.addEventListener('submit', function () {
        try {
          var ph = document.getElementById('input_64_full');
          var fn = document.getElementById('first_73');
          var ln = document.getElementById('last_73');
          sessionStorage.setItem('kv-phone', ph ? ph.value : '');
          sessionStorage.setItem('kv-name', ((fn ? fn.value : '') + ' ' + (ln ? ln.value : '')).trim());
        } catch (e) {}
      }, true);
    }
  });

  // ============================================================
  // NEST A CONDITIONAL FIELD INSIDE ITS ITEM CARD
  //   condId   = the <li> id of the conditional field (e.g. 'id_74')
  //   nameMatch= EXACT item name, matches data-pv-name (e.g. 'Grilled Salmon')
  //   The form's conditional engine still toggles display on the <li>
  //   by id — moving it in the DOM doesn't break that.
  // ============================================================
  function nestConditional(condId, nameMatch) {
    var cond = document.getElementById(condId);
    if (!cond) return;

    var needle = nameMatch.toLowerCase().trim();
    var host = null;
    document.querySelectorAll('li.form-line.pv-menu-item').forEach(function (li) {
      if (host) return;
      var n = (li.getAttribute('data-pv-name') || '').toLowerCase().trim();
      if (n === needle) host = li;   // exact match, not substring
    });
    if (!host) { console.warn('[PV] No card matched "' + nameMatch + '" for ' + condId); return; }

    cond.classList.add('pv-sub-field');
    host.classList.add('pv-has-sub');

    // Put (or re-put) the conditional li directly after the card content.
    function place() {
      if (cond.parentNode === host && cond.previousElementSibling &&
          cond.previousElementSibling.classList.contains('pv-item-card')) return;
      var cardEl = host.querySelector('.pv-item-card');
      if (cardEl && cardEl.nextSibling) host.insertBefore(cond, cardEl.nextSibling);
      else host.appendChild(cond);
    }
    place();

    // Refresh the order summary when the side changes
    var sel = cond.querySelector('select');
    if (sel) {
      sel.addEventListener('change', updateOrderSummary);
      sel.addEventListener('input',  updateOrderSummary);
    }

    // The form's conditional engine re-inserts the field at its original
    // position when it shows it — watch for that and move it back.
    var target = document.querySelector('.form-all .form-section') || document.body;
    new MutationObserver(function () { place(); })
      .observe(target, { childList: true, subtree: true });
  }
  // ============================================================
  // CARD TRANSFORM
  // ============================================================
  function transformToCard(li, input) {
    var labelEl = li.querySelector('.form-label-left label:not(.label-message)');
    if (!labelEl) return;
    var raw        = labelEl.textContent.trim();
    var priceMatch = raw.match(/\$(\d+(?:\.\d+)?)/);
    var price      = priceMatch ? parseFloat(priceMatch[1]) : 0;
    var name       = raw.replace(/\s*\$\d+(?:\.\d+)?\s*$/, '').trim();
    var subEl      = li.querySelector('.form-sub-label');
    var desc       = subEl ? subEl.textContent.trim() : '';

    li.classList.add('pv-menu-item');
    li.setAttribute('data-pv-name', name);

    var labelLeft = li.querySelector('.form-label-left');
    var formInput = li.querySelector('.form-input');
    if (labelLeft) labelLeft.style.cssText = 'position:absolute;opacity:0;pointer-events:none;width:0;height:0;overflow:hidden;';
    if (formInput) formInput.style.cssText = 'position:absolute;opacity:0;pointer-events:none;width:0;height:0;overflow:hidden;';

    var descHTML = desc ? '<p class="pv-item__desc">' + desc + '</p>' : '';
    var card = document.createElement('div');
    card.className = 'pv-item-card';
    card.innerHTML =
      '<img class="pv-item__img" src="" alt="' + name + '">' +
      '<div class="pv-item__info">' +
        '<h3 class="pv-item__name">' + name + '</h3>' +
        descHTML +
        '<span class="pv-item__price">$' + price.toFixed(2) + '</span>' +
      '</div>' +
      '<div class="pv-item__ctrl">' +
        '<div class="pv-qty-control">' +
          '<button type="button" class="pv-qty-btn pv-qty-minus">\u2212</button>' +
          '<span class="pv-qty-display">0</span>' +
          '<button type="button" class="pv-qty-btn pv-qty-plus">+</button>' +
        '</div>' +
      '</div>';
    li.appendChild(card);

    var minusBtn = card.querySelector('.pv-qty-minus');
    var plusBtn  = card.querySelector('.pv-qty-plus');
    var display  = card.querySelector('.pv-qty-display');

    function setQty(n) {
      input.value = n > 0 ? n : '';
      display.textContent = n;
      li.classList.toggle('pv-selected', n > 0);
      if (window.$j) window.$j(input).trigger('change').trigger('keyup');
      ['input','change','keyup'].forEach(function(evt){ input.dispatchEvent(new Event(evt, { bubbles: true })); });
      updateOrderSummary();
    }
    plusBtn.addEventListener('click', function(){ setQty(parseInt(input.value || '0') + 1); });
    minusBtn.addEventListener('click', function(){
      var cur = parseInt(input.value || '0');
      if (cur > 0) setQty(cur - 1);
    });
  }

  // ============================================================
  // GROUP ITEMS INTO 2-COL GRIDS
  //   Walk the form-section; consecutive .pv-menu-item <li>s get
  //   wrapped in a .pv-item-grid div. A non-item breaks the run.
  // ============================================================
  function groupItemsIntoGrids() {
    var section = document.querySelector('.form-all .form-section');
    if (!section) return;
    var children = [].slice.call(section.children);
    var run = [];
    function flush() {
      if (run.length === 0) return;
      var grid = document.createElement('div');
      grid.className = 'pv-item-grid';
      run[0].parentNode.insertBefore(grid, run[0]);
      run.forEach(function(li){ grid.appendChild(li); });
      run = [];
    }
    children.forEach(function(li){
      if (li.classList && li.classList.contains('pv-menu-item')) {
        run.push(li);
      } else {
        flush();
      }
    });
    flush();
  }

  // ============================================================
  // BOX A SECTION (wraps a set of <li> ids in a styled container)
  //   Also re-grids items inside the box.
  // ============================================================
  function boxSection(anchorId, ids) {
    var anchor = document.getElementById(anchorId);
    if (!anchor) return;
    var box = document.createElement('div');
    box.className = 'pv-section-box';
    anchor.parentNode.insertBefore(box, anchor);
    ids.forEach(function(id){
      var el = document.getElementById(id);
      if (el) box.appendChild(el);
    });
    // re-grid items now inside the box
    var run = [];
    function flush() {
      if (run.length === 0) return;
      var grid = document.createElement('div');
      grid.className = 'pv-item-grid';
      run[0].parentNode.insertBefore(grid, run[0]);
      run.forEach(function(li){ grid.appendChild(li); });
      run = [];
    }
    [].slice.call(box.children).forEach(function(li){
      if (li.classList && li.classList.contains('pv-menu-item')) run.push(li);
      else flush();
    });
    flush();
  }

  // ============================================================
  // DONATION (#id_57 control_amount)
  // ============================================================
  function setupDonation() {
    document.querySelectorAll('#cid_57 .form-radio-item').forEach(function(item){
      item.addEventListener('click', function(e){
        if (e.target.closest('label') || e.target.type === 'radio' || e.target.tagName === 'INPUT') return;
        var r = item.querySelector('input[type="radio"]');
        if (r) r.click();
      });
    });
    document.querySelectorAll('#cid_57 input[type="radio"]').forEach(function(radio){
      radio.addEventListener('change', function(){
        document.querySelectorAll('#cid_57 .form-radio-item').forEach(function(item){
          var inp = item.querySelector('input[type="radio"]');
          item.classList.toggle('pv-checked', !!(inp && inp.checked));
        });
        updateOrderSummary();
      });
    });
    // "Other" custom donation input recalcs total
    var otherInput = document.getElementById('input_57');
    var otherRadio = document.getElementById('other_57');
    if (otherInput) {
      otherInput.addEventListener('input', updateOrderSummary);
      otherInput.addEventListener('focus', function(){ if (otherRadio) { otherRadio.checked = true; otherRadio.dispatchEvent(new Event('change', {bubbles:true})); } });
    }
    // JotForm keeps #input_57 disabled until Other is picked; keep it usable
    setInterval(function(){
      if (otherRadio && otherRadio.checked && otherInput && otherInput.hasAttribute('disabled')) otherInput.removeAttribute('disabled');
    }, 400);
  }

  // ============================================================
  // ORDER SUMMARY
  // ============================================================
  function setupOrderSummary() {
    // create the container that lives inside the order box
    var holder = document.createElement('div');
    holder.id = 'pv-order-items-holder';
    holder.innerHTML = '<div id="pv-order-items" class="pv-order-items"></div>';
    // will be moved into the order box by wrapOrderSection
    window.__pvOrderHolder = holder;
  }

  function wrapOrderSection() {
    // total is #id_67. Put an order box before it.
    var totalLi = document.getElementById('id_67');
    if (!totalLi) return;
    var box = document.createElement('div');
    box.id = 'pv-order-box-el';
    box.innerHTML = '<div class="pv-order-box-title">Your Order</div><div class="pv-order-divider"></div>';
    totalLi.parentNode.insertBefore(box, totalLi);
    if (window.__pvOrderHolder) box.appendChild(window.__pvOrderHolder.firstChild);
    box.appendChild(totalLi);
  }

  function updateOrderSummary() {
    var container = document.getElementById('pv-order-items');
    var orderBox  = document.getElementById('pv-order-box-el');
    var html = '', hasItems = false;

    document.querySelectorAll('input[data-type="input-number"]').forEach(function (input) {
      var qty = parseInt(input.value || '0');
      if (qty <= 0) return;
      hasItems = true;
      var li      = input.closest('li.form-line');
      var name    = li ? (li.getAttribute('data-pv-name') || 'Item') : 'Item';
      var priceEl = li ? li.querySelector('.pv-item__price') : null;
      var pNum    = priceEl ? parseFloat(priceEl.textContent.replace('$','')) : 0;

      // nested conditional side, if this item has one
      var subSel  = li ? li.querySelector('.pv-sub-field select') : null;
      var sideTxt = (subSel && subSel.value) ? subSel.value.trim() : '';
      var sideHTML = sideTxt
        ? '<span class="pv-order-side">' + sideTxt + '</span>'
        : (subSel ? '<span class="pv-order-side pv-order-side--empty">choose a side</span>' : '');

      html +=
        '<div class="pv-order-line">' +
          '<div class="pv-order-line__left">' +
            '<span class="pv-order-qty">' + qty + '\u00d7</span>' +
            '<span class="pv-order-name">' + name + sideHTML + '</span>' +
          '</div>' +
          '<span class="pv-order-price">$' + (qty * pNum).toFixed(2) + '</span>' +
        '</div>';
    });

    // donation
    var donChecked = document.querySelector('#cid_57 input[type="radio"]:checked');
    var donVal = 0, donIsOther = false;
    if (donChecked) {
      if (donChecked.id === 'other_57') { donIsOther = true; }
      else donVal = parseFloat(donChecked.value || '0');
    }
    var otherInput = document.getElementById('input_57');
    if (donIsOther && otherInput) donVal = parseFloat(otherInput.value || '0');
    if (donVal > 0) {
      hasItems = true;
      html +=
        '<div class="pv-order-line">' +
          '<div class="pv-order-line__left">' +
            '<span class="pv-order-qty">\u2764</span>' +
            '<span class="pv-order-name">Community Support Donation</span>' +
          '</div>' +
          '<span class="pv-order-price">$' + donVal.toFixed(2) + '</span>' +
        '</div>';
    }

    if (container) container.innerHTML = html;
    if (orderBox)  orderBox.style.display = hasItems ? 'block' : 'none';

    writeOrderSummaryField();
  }

 // ============================================================
  // WRITE PLAIN-TEXT SUMMARY INTO HIDDEN FIELD #input_72
  //   Feeds the CMS receipt/email via <<input_72>>
  // ============================================================
  function writeOrderSummaryField() {
    var field = document.getElementById('input_72');
    if (!field) return;

    var lines = [];
    var itemsTotal = 0;

    document.querySelectorAll('input[data-type="input-number"]').forEach(function (input) {
      var qty = parseInt(input.value || '0');
      if (qty <= 0) return;
      var li      = input.closest('li.form-line');
      var name    = li ? (li.getAttribute('data-pv-name') || 'Item') : 'Item';
      var priceEl = li ? li.querySelector('.pv-item__price') : null;
      var pNum    = priceEl ? parseFloat(priceEl.textContent.replace('$','')) : 0;
      var lineTot = qty * pNum;
      itemsTotal += lineTot;

      // include the chosen side (nested conditional dropdown) if present
      var sideTxt = '';
      var subSel = li ? li.querySelector('.pv-sub-field select') : null;
      if (subSel) sideTxt = subSel.value ? ' (Side: ' + subSel.value.trim() + ')' : ' (Side: not selected)';

      lines.push(qty + ' x ' + name + sideTxt + ' - $' + lineTot.toFixed(2));
    });

    // donation
    var donChecked = document.querySelector('#cid_57 input[type="radio"]:checked');
    var donVal = 0, donIsOther = false;
    if (donChecked) {
      if (donChecked.id === 'other_57') donIsOther = true;
      else donVal = parseFloat(donChecked.value || '0');
    }
    var otherInput = document.getElementById('input_57');
    if (donIsOther && otherInput) donVal = parseFloat(otherInput.value || '0');
    if (donVal > 0) {
      itemsTotal += donVal;
      lines.push('Community Support Donation - $' + donVal.toFixed(2));
    }

    if (lines.length) lines.push('Order Total: $' + itemsTotal.toFixed(2));

    field.value = lines.join('\n');

    if (window.$j) window.$j(field).trigger('change');
    ['input','change','keyup'].forEach(function (evt) {
      field.dispatchEvent(new Event(evt, { bubbles: true }));
    });
  }

  // ============================================================
  // CHECKOUT BOX (Delivery header #id_59 through payment #id_68)
  // ============================================================
  function wrapCheckoutSection() {
    var anchor = document.getElementById('cid_59'); // Delivery header
    if (!anchor) return;
    var box = document.createElement('div');
    box.id = 'pv-checkout-box-el';
    anchor.parentNode.insertBefore(box, anchor);
    ['id_73','cid_59','id_60','id_61','id_62','id_63','id_70','id_64','id_65','id_66','id_68','id_69','id_71','id_2'].forEach(function(id){
      var el = document.getElementById(id);
      if (el) box.appendChild(el);
    });
  }

  // ============================================================
  // FETCH IMAGES FROM GOOGLE SHEET
  //   CSV columns: Item Name, Image URL  (name WITHOUT price)
  // ============================================================
  function fetchImages() {
    var allImgs = document.querySelectorAll('.pv-item__img');
    fetch(SHEET_CSV)
      .then(function (r) { return r.text(); })
      .then(function (csv) {
        var map = {};
        csv.split('\n').slice(1).forEach(function (row) {
          var clean = row.replace(/^\uFEFF/, '').replace(/\r/g, '').trim();
          if (!clean) return;
          var commaIdx = clean.indexOf(',');
          if (commaIdx === -1) return;
          var rawName = clean.substring(0, commaIdx).replace(/^"|"$/g, '').trim();
          var rawUrl  = clean.substring(commaIdx + 1).replace(/^"|"$/g, '').trim();
          if (rawName && rawUrl) map[rawName.toLowerCase().normalize('NFC')] = rawUrl;
        });
        var matched = 0, missed = [];
        allImgs.forEach(function (img) {
          var card = img.closest('.pv-item-card');
          var nameEl = card ? card.querySelector('.pv-item__name') : null;
          if (!nameEl) return;
          var nm = nameEl.textContent.trim().toLowerCase().normalize('NFC');
          if (map[nm]) { img.src = map[nm]; matched++; }
          else missed.push(nameEl.textContent.trim());
        });
        console.log('[PV] Matched ' + matched + ' images, missed:', missed);
      })
      .catch(function (e) { console.error('[PV] Sheet fetch failed:', e); });
  }

})();
</script><script>
//<![CDATA[
/* =========================================================
   CHABAD PUERTO VALLARTA — SPONSORSHIP FORM SCRIPT
   One script for ALL four sponsorship forms.
   Paste into the Custom JS of each form page AND each
   thank-you (response) page — it routes itself by article ID.

   Arrives from the card as:
     ...Sponsorship.htm#id=2026-01-03|SHABBAT_LUNCH&date=2026-01-03
        &type=SHABBAT_LUNCH&event=Parashat%20Vayechi
        &label=Shabbat%20Kiddush%20Lunch&price=500&season=High

   What it does on the form page:
     - fills and locks Title (input_1) with the Parsha / event name
     - fills and locks the date (month_3 / day_3 / year_3)
     - hides the wrong season checkbox and ticks the right one
     - shows a small banner confirming what is being sponsored

   What it does on the response page:
     - scrapes the submitted name + dedication
     - POSTs to Apps Script, which marks that exact row Taken
   ========================================================= */

(function () {
    'use strict';

    /* ================= CONFIG ================= */

    var WEB_APP_URL = "https://script.google.com/macros/s/AKfycbzzfgRqHGsn8nO6hywMtOFJg_IBQ1m3iLVfXeH5dvUkJ2qdoEfIW8UKCEuZIVqGyZLZdA/exec";

    /* All four forms share the same field IDs, so only the tag differs.
       To add a form later: add its article ID here, and put the form's
       URL in the Settings tab against the matching Type. */
    var FORMS = {
        "7481233": { type: "FRIDAY_NIGHT"  },   // Friday Night Dinner
        "7481210": { type: "SHABBAT_LUNCH" },   // Shabbos Day Kiddush
        "7481235": { type: "ROSH_CHODESH"  },   // Women's Rosh Chodesh Luncheon
        "7481236": { type: "TEQUILA"       }    // Tefillin & Tequila Breakfast
    };

    /* Field IDs as they appear in the ChabadOne form markup. */
    var FIELDS = {
        title:      "input_1",                          // "Title" textbox — gets the Parsha / event name
        dateMonth:  "month_3",
        dateDay:    "day_3",
        dateYear:   "year_3",
        datePicker: "input_3_pick",                     // calendar icon, hidden once locked
        optionsBox: "cid_6",                            // wrapper holding the season checkboxes
        nameFirst:  "first_4",
        nameLast:   "last_4"
    };

    /* Response-page table labels. Extra spellings are tolerated below. */
    var SCRAPE = {
        first: ["Full Name - First Name", "Full Name First Name", "First Name"],
        last:  ["Full Name - Last Name", "Full Name Last Name", "Last Name"],
        notes: ["Dedications", "Dedication"],
        title: ["Title"]
    };

    var STORAGE_KEY = 'kd_sponsorship_context';
    var BRAND = { burgundy: '#69001f', gold: '#d6a851', teal: '#48a9b8' };

    /* ================= SHARED ================= */

    function currentAid() {
        var m = window.location.href.match(/\/aid\/(\d+)/);
        return m ? m[1] : '';
    }

    function isResponsePage() {
        return window.location.href.indexOf('ArticleCcoResponse_cdo') !== -1;
    }

    function readHashParams() {
        var raw = window.location.hash.replace(/^#/, '');
        if (!raw) return null;
        var p = new URLSearchParams(raw);
        if (!p.get('date') && !p.get('id')) return null;
        return {
            id:     p.get('id')     || '',
            date:   p.get('date')   || '',
            type:   p.get('type')   || '',
            event:  p.get('event')  || '',
            label:  p.get('label')  || '',
            price:  p.get('price')  || '',
            season: p.get('season') || ''
        };
    }

    function saveContext(ctx) {
        try { sessionStorage.setItem(STORAGE_KEY, JSON.stringify(ctx)); } catch (e) { }
    }

    function loadContext() {
        try {
            var raw = sessionStorage.getItem(STORAGE_KEY);
            return raw ? JSON.parse(raw) : null;
        } catch (e) { return null; }
    }

    function splitYmd(ymd) {
        var m = String(ymd || '').match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
        return m ? { y: Number(m[1]), m: Number(m[2]), d: Number(m[3]) } : null;
    }

    function pad2(n) { return ('0' + n).slice(-2); }

    /* ================= FORM PAGE ================= */

    function injectStyles() {
        var style = document.createElement('style');
        style.innerHTML = [
            "@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,700&display=swap');",
            ".userform-form, .userform-form *, .form-all, .form-all * { font-family:'Manrope',Arial,sans-serif !important; }",
            ".form-label,.form-sub-label,.form-radio-item label,.form-checkbox-item label,.form-payment-methods label,.form-address-table th { color:" + BRAND.burgundy + " !important; font-weight:600 !important; }",
            ".co_body .content .form-all .form-dropdown { height:40px !important; }",
            ".form-sub-label { font-weight:400 !important; color:#5a5158 !important; margin-top:4px !important; }",
            ".form-textbox,.form-dropdown,.form-textarea { font-family:'Manrope',Arial,sans-serif !important; border:1px solid #e6dcd8 !important; border-radius:6px !important; padding:10px 12px !important; color:" + BRAND.burgundy + " !important; background-color:#fff !important; transition:border-color .3s ease, box-shadow .3s ease !important; }",
            ".form-textbox:focus,.form-dropdown:focus,.form-textarea:focus { border-color:" + BRAND.gold + " !important; outline:none !important; box-shadow:0 0 0 2px rgba(214,168,81,.25) !important; }",
            ".form-submit-button { background-color:" + BRAND.burgundy + " !important; color:#fff !important; border:1px solid " + BRAND.burgundy + " !important; border-radius:6px !important; padding:14px 32px !important; font-weight:700 !important; font-size:16px !important; font-family:'Manrope',Arial,sans-serif !important; cursor:pointer !important; transition:background-color .4s ease, border-color .4s ease, transform .2s ease !important; width:100% !important; max-width:300px !important; margin:0 auto !important; display:block !important; }",
            ".form-submit-button:hover { background-color:" + BRAND.gold + " !important; border-color:" + BRAND.gold + " !important; transform:translateY(-2px) !important; }",
            ".form-checkbox-item, .form-radio-item { margin-bottom:12px !important; }",
            "#total_amount { font-family:'Newsreader',Georgia,serif !important; color:" + BRAND.burgundy + " !important; font-size:26px !important; font-weight:bold !important; }",
            ".kf-locked { background-color:#f2ecea !important; color:#5a5158 !important; pointer-events:none !important; opacity:.75 !important; font-weight:bold !important; }",
            ".kf-hidden-option { display:none !important; }",
            ".kf-banner { background:#faf7f4 !important; border:1px solid #e6dcd8 !important; border-left:4px solid " + BRAND.gold + " !important; border-radius:6px !important; padding:16px 20px !important; margin:0 0 22px 0 !important; font-family:'Manrope',Arial,sans-serif !important; color:" + BRAND.burgundy + " !important; font-size:15px !important; line-height:1.6 !important; }",
            ".kf-banner .kf-banner-label { display:block !important; font-size:11px !important; letter-spacing:.1em !important; text-transform:uppercase !important; color:#9c7629 !important; font-weight:700 !important; margin-bottom:6px !important; }",
            ".kf-banner .kf-banner-main { font-family:'Newsreader',Georgia,serif !important; font-size:20px !important; font-weight:700 !important; display:block !important; }",
            ".kf-banner .kf-banner-sub { font-size:14px !important; color:#5a5158 !important; display:block !important; margin-top:4px !important; }",
            ".kf-banner .kf-banner-price { color:" + BRAND.teal + " !important; font-weight:700 !important; }"
        ].join('\n');
        document.head.appendChild(style);
    }

    function lockField(el) {
        if (!el) return;
        el.classList.add('kf-locked');
        el.setAttribute('tabindex', '-1');
        if ('readOnly' in el) el.readOnly = true;
    }

    function money(n) {
        var v = Number(String(n).replace(/[^0-9.]/g, '')) || 0;
        return '$' + v.toLocaleString('en-US');
    }

    function prettyDate(ymd) {
        var p = splitYmd(ymd);
        if (!p) return ymd;
        var d = new Date(p.y, p.m - 1, p.d, 12, 0, 0);
        var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
        var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
        return days[d.getDay()] + ', ' + months[d.getMonth()] + ' ' + d.getDate() + ', ' + d.getFullYear();
    }

    function showBanner(ctx) {
        var host = document.querySelector('.form-all') || document.querySelector('.userform-form');
        if (!host) return;

        var sub = [];
        if (ctx.event) sub.push(ctx.event);
        if (ctx.date)  sub.push(prettyDate(ctx.date));

        var priceBit = '';
        if (ctx.price) {
            priceBit = ' · <span class="kf-banner-price">' + money(ctx.price) +
                       (ctx.season ? ' (' + ctx.season.toLowerCase() + ' season)' : '') + '</span>';
        }

        var div = document.createElement('div');
        div.className = 'kf-banner';
        div.innerHTML =
            '<span class="kf-banner-label">You are sponsoring</span>' +
            '<span class="kf-banner-main">' + (ctx.label || 'Sponsorship') + '</span>' +
            '<span class="kf-banner-sub">' + sub.join(' · ') + priceBit + '</span>';

        host.parentNode.insertBefore(div, host);
    }

    function fillTitle(ctx) {
        var el = document.getElementById(FIELDS.title);
        if (!el || !ctx.event) return;
        el.value = ctx.event;
        lockField(el);
    }

    function fillDate(ctx) {
        var p = splitYmd(ctx.date);
        if (!p) return;

        var m = document.getElementById(FIELDS.dateMonth);
        var d = document.getElementById(FIELDS.dateDay);
        var y = document.getElementById(FIELDS.dateYear);

        if (m) { m.value = pad2(p.m); m.dispatchEvent(new Event('change', { bubbles: true })); lockField(m); }
        if (d) { d.value = pad2(p.d); d.dispatchEvent(new Event('change', { bubbles: true })); lockField(d); }
        if (y) { y.value = String(p.y); y.dispatchEvent(new Event('change', { bubbles: true })); lockField(y); }

        var pick = document.getElementById(FIELDS.datePicker);
        if (pick) pick.style.display = 'none';
    }

    /* Text of the <label> that belongs to a checkbox. */
    function labelTextFor(box) {
        var lab = document.getElementById('label_' + box.id) ||
                  document.querySelector('label[for="' + box.id + '"]');
        return lab ? lab.textContent.trim() : '';
    }

    /* Pull the first dollar figure out of a string: "…( $1,800)" -> "1800" */
    function priceIn(text) {
        var m = String(text).match(/\$\s*([\d,]+)/);
        return m ? m[1].replace(/,/g, '') : '';
    }

    function hideOption(box) {
        var item = box.closest ? box.closest('.form-checkbox-item') : null;
        if (item) {
            var next = item.nextElementSibling;
            item.classList.add('kf-hidden-option');
            if (next && next.classList.contains('clearfix')) next.classList.add('kf-hidden-option');
        } else {
            box.style.display = 'none';
        }
        if (box.checked) box.checked = false;
    }

    /* Ticks a box for real so JotForm's own handler recalculates the total.
       Retried once because Userform.init binds its handlers on jQuery ready. */
    function tickOption(box, attempt) {
        attempt = attempt || 0;
        if (box.checked) return;
        try { box.click(); } catch (e) { }
        if (!box.checked && attempt < 3) {
            setTimeout(function () { tickOption(box, attempt + 1); }, 250);
        }
    }

    /* Hides the season the visitor is NOT in, and ticks the one they are.
       Matches on the dollar amount first (exact), falling back to the
       words "high season" / "low season". */
    function applySeason(ctx) {
        var wrap = document.getElementById(FIELDS.optionsBox);
        if (!wrap) return;

        var boxes = Array.prototype.slice.call(wrap.querySelectorAll('input[type="checkbox"]'));
        if (!boxes.length) return;

        // Flat-price form (Tequila, Rosh Chodesh) — just tick the single option
        if (boxes.length === 1) {
            setTimeout(function () { tickOption(boxes[0]); }, 300);
            return;
        }

        var wantPrice  = String(ctx.price || '').replace(/[^0-9]/g, '');
        var wantSeason = String(ctx.season || '').toLowerCase();
        var chosen = null;

        if (wantPrice) {
            boxes.forEach(function (b) {
                var text = (b.value || '') + ' ' + labelTextFor(b);
                if (priceIn(text) === wantPrice) chosen = b;
            });
        }

        if (!chosen && wantSeason) {
            boxes.forEach(function (b) {
                var text = ((b.value || '') + ' ' + labelTextFor(b)).toLowerCase();
                if (text.indexOf(wantSeason + ' season') !== -1) chosen = b;
            });
        }

        if (!chosen) {
            // Prices in Settings and in the JotForm have drifted apart.
            console.warn('Season option not matched — showing all options. ' +
                         'Check that the Settings prices match the form checkbox amounts.',
                         { price: ctx.price, season: ctx.season });
            return;
        }

        boxes.forEach(function (b) { if (b !== chosen) hideOption(b); });
        setTimeout(function () { tickOption(chosen); }, 300);
    }

    function handleFormPage(cfg) {
        var ctx = readHashParams();
        if (!ctx) return;    // someone opened the form directly — leave it untouched

        ctx.type = ctx.type || cfg.type;
        saveContext(ctx);

        injectStyles();
        showBanner(ctx);
        fillTitle(ctx);
        fillDate(ctx);
        applySeason(ctx);
    }

    /* ================= RESPONSE PAGE ================= */

    function scrapeTable() {
        var found = {};
        document.querySelectorAll('tr').forEach(function (row) {
            var labelCell = row.querySelector('.field_name');
            var valueCell = row.querySelector('.field_value');
            if (!labelCell || !valueCell) return;
            found[labelCell.innerText.trim()] = valueCell.innerText.trim();
        });
        return found;
    }

    /* Exact match first, then a loose contains match, so a renamed field
       label on one form doesn't silently drop the sponsor's name. */
    function pick(table, candidates) {
        for (var i = 0; i < candidates.length; i++) {
            if (table[candidates[i]]) return table[candidates[i]];
        }
        var keys = Object.keys(table);
        for (var j = 0; j < candidates.length; j++) {
            var want = candidates[j].toLowerCase();
            for (var k = 0; k < keys.length; k++) {
                if (keys[k].toLowerCase().indexOf(want) !== -1 && table[keys[k]]) return table[keys[k]];
            }
        }
        return '';
    }

    function handleResponsePage(cfg) {
        var ctx = readHashParams() || loadContext();
        if (!ctx || !ctx.date) {
            console.warn('Sponsorship context missing — nothing recorded to the sheet.');
            return;
        }

        var table = scrapeTable();
        var name  = (pick(table, SCRAPE.first) + ' ' + pick(table, SCRAPE.last)).trim() ||
                    pick(table, ['Name']) || 'Anonymous Sponsor';

        var payload = {
            id:     ctx.id || (ctx.date + '|' + (ctx.type || cfg.type)),
            date:   ctx.date,
            type:   ctx.type || cfg.type,
            event:  ctx.event || pick(table, SCRAPE.title),
            name:   name,
            notes:  pick(table, SCRAPE.notes),
            price:  ctx.price  || '',
            season: ctx.season || ''
        };

        fetch(WEB_APP_URL, {
            method: 'POST',
            mode: 'no-cors',
            headers: { 'Content-Type': 'text/plain;charset=utf-8' },
            body: JSON.stringify(payload)
        }).then(function () {
            console.log('Sponsorship recorded:', payload.id);
            try { sessionStorage.removeItem(STORAGE_KEY); } catch (e) { }
        }).catch(function (err) {
            console.error('Sponsorship sync failed:', err);
        });
    }

    /* ================= ROUTER ================= */

    document.addEventListener('DOMContentLoaded', function () {
        var cfg = FORMS[currentAid()];
        if (!cfg) return;   // not one of our sponsorship forms
        if (isResponsePage()) handleResponsePage(cfg);
        else handleFormPage(cfg);
    });

})();
//]]>
</script><script>
// --- HOMEPAGE UPCOMING EVENTS (Chabad Vallarta) ---
// Replaces the native ChabadOne "Upcoming Events" widget in the middle .g320
// column (between the sneak-peek column and the Facebook likebox).
//
// Layout: text only (no images, no calendar links). Two events shown at a time,
// swipe/arrow through up to 10, then a View All button.
if (window.location.pathname === '/' || window.location.pathname === '/default.aspx') {

  (function() {

    // ---------------------------------------------------------------------
    // TODO: swap this for the real "all upcoming events" page when it exists.
    // ---------------------------------------------------------------------
    const VIEW_ALL_URL = 'https://www.chabadvallarta.com/templates/articlecco_cdo/aid/7500580/jewish/Upcoming-Events.htm';

    const MAX_EVENTS = 10;      // hard cap on how many events to load
    const EVENTS_PER_PAGE = 2;  // how many show at once

    /**
     * Fetches and parses the events page HTML.
     */
    function getEventsPage() {
      const url = 'https://www.chabadvallarta.com/templates/events.htm?t=' + new Date().getTime();
      return fetch(url)
        .then(response => {
          if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
          }
          return response.text();
        })
        .then(htmlText => {
          const parser = new DOMParser();
          return parser.parseFromString(htmlText, 'text/html');
        })
        .catch(error => {
          console.error("Error fetching events page:", error);
          return null;
        });
    }

    /**
     * Splits an event name on the [L] marker.
     *   "Rosh Hashana Community Dinner [L] RSVP"
     *     -> title: "Rosh Hashana Community Dinner", actionText: "RSVP"
     * No marker => whole string is the title, action falls back to "Learn More".
     */
    function parseTitleAndAction(rawTitle) {
      const normalized = (rawTitle || '').replace(/\s+/g, ' ').trim();
      const markerIndex = normalized.indexOf('[L]');

      if (markerIndex === -1) {
        return { title: normalized || 'Event', actionText: 'Learn More' };
      }

      const title = normalized.slice(0, markerIndex).trim();
      const label = normalized.slice(markerIndex + 3).trim();

      return {
        title: title || 'Event',
        actionText: label || 'Learn More'
      };
    }

    /**
     * 5 digits or fewer is an event id; anything longer is an article id.
     */
    function buildEventUrl(id) {
      const base = 'https://www.chabadvallarta.com';
      if (id.length <= 5) {
        return `${base}/tools/events/register_cdo/eventid/${id}`;
      }
      return `${base}/templates/articlecco_cdo/aid/${id}`;
    }

    /**
     * Robustly parses date strings like "Month Day, Year".
     */
    function parseRobustDate(dateStr) {
      const months = {
        january: 0, february: 1, march: 2, april: 3, may: 4, june: 5,
        july: 6, august: 7, september: 8, october: 9, november: 10, december: 11
      };
      if (!dateStr) return null;

      const cleanedStr = dateStr.replace(/,/g, '').trim().replace(/\s+/g, ' ');
      const parts = cleanedStr.split(' ');
      if (parts.length < 3) return null;

      const monthName = parts[0].toLowerCase();
      const day = parseInt(parts[1], 10);
      const year = parseInt(parts[2], 10);

      if (months.hasOwnProperty(monthName) && !isNaN(day) && !isNaN(year)) {
        return new Date(year, months[monthName], day);
      }
      return null;
    }

    /**
     * Compact date for a narrow column: "FRI, SEP 11"
     */
    function formatEventDate(dateStr) {
      if (!dateStr) return '';
      // Incoming: "Friday, September 11, 2026"
      const parts = dateStr.split(',');
      if (parts.length < 2) return dateStr.toUpperCase();

      const dayName = parts[0].trim().slice(0, 3);
      const monthDay = parts[1].trim().split(' ');
      const monthShort = (monthDay[0] || '').slice(0, 3);
      const dayNum = monthDay[1] || '';

      return `${dayName}, ${monthShort} ${dayNum}`.trim().toUpperCase();
    }

    /**
     * Finds the native Upcoming Events widget's content area, which we take over.
     */
    function findHostWidget() {
      const widget = document.querySelector('.widget-4.upcoming_events');
      if (!widget) return null;

      const content = widget.querySelector('.widget_content');
      if (!content) return null;

      return { widget, content };
    }

    const runTransformation = () => {
      const host = findHostWidget();
      if (!host) {
        console.error("Native .upcoming_events widget not found — nothing to replace.");
        return;
      }

      getEventsPage().then(eventsDocument => {
        if (!eventsDocument) return;

        const today = new Date();
        today.setHours(0, 0, 0, 0);

        const upcomingEvents = [];
        const allDateGroups = Array.from(eventsDocument.querySelectorAll('#calendar .list_item'));

        for (const dateGroupEl of allDateGroups) {
          if (upcomingEvents.length >= MAX_EVENTS) break;

          const dateEl = dateGroupEl.querySelector('.date');
          if (!dateEl) continue;

          const dateText = dateEl.textContent.trim();
          const parsableDateText = dateText.split(',').slice(1).join(',').trim();
          const eventDate = parseRobustDate(parsableDateText);

          if (eventDate && eventDate >= today) {
            const individualEventsInGroup = dateGroupEl.querySelectorAll('.category_item');
            individualEventsInGroup.forEach(eventEl => {
              if (upcomingEvents.length < MAX_EVENTS) {
                upcomingEvents.push({ el: eventEl, date: eventDate, rawDate: dateText });
              }
            });
          }
        }

        if (upcomingEvents.length === 0) {
          console.log("No upcoming events found to display.");
          return;
        }

        // --- TAKE OVER THE NATIVE WIDGET ---
        // ChabadOne's fixWidgetBodyHeight() pins an inline height on .widget_content
        // and enscroll adds a scrollbar track as a sibling. Clear both out.
        host.widget.querySelectorAll('.enscroll-track').forEach(track => {
          if (track.parentElement) track.parentElement.remove();
        });
        host.content.classList.remove('make_scrollable', 'list_format');
        host.content.classList.add('injected-vp-events');
        host.content.innerHTML = '';

        // --- BUILD ONE ITEM PER EVENT ---
        const buildItem = ({ el: eventEl, rawDate }) => {
          const titleEl = eventEl.querySelector('.event_name');
          const rawTitle = titleEl ? titleEl.textContent : '';
          const { title, actionText } = parseTitleAndAction(rawTitle);

          const formattedDate = formatEventDate(rawDate);

          const timeEl = eventEl.querySelector('.event_options > div');
          let timeText = timeEl ? timeEl.textContent.trim().toUpperCase() : '';
          if (timeText) {
            timeText = timeText.replace(/(\d)([AP]M)$/, '$1 $2');
          }
          const metaLine = timeText ? `${formattedDate} · ${timeText}` : formattedDate;

          let eventUrl = '#';
          const facebookLinkEl = eventEl.querySelector('a[href*="//www.facebook.com/events/"]');
          if (facebookLinkEl) {
            const fbHref = facebookLinkEl.href;
            const match = fbHref.match(/events\/(\d+)/);
            if (match && match[1]) {
              eventUrl = buildEventUrl(match[1]);
            }
          }

          const item = document.createElement('a');
          item.className = 'vp-event-item';
          item.href = eventUrl;
          item.innerHTML = `
            <div class="vp-event-date">${metaLine}</div>
            <div class="vp-event-title">${title}</div>
            <div class="vp-event-action">${actionText} →</div>
          `;
          return item;
        };

        // --- GROUP INTO PAGES OF 2 ---
        const viewport = document.createElement('div');
        viewport.className = 'vp-events-viewport';
        const track = document.createElement('div');
        track.className = 'vp-events-track';

        const totalPages = Math.ceil(upcomingEvents.length / EVENTS_PER_PAGE);

        for (let p = 0; p < totalPages; p++) {
          const page = document.createElement('div');
          page.className = 'vp-events-page';

          upcomingEvents
            .slice(p * EVENTS_PER_PAGE, (p + 1) * EVENTS_PER_PAGE)
            .forEach(ev => page.appendChild(buildItem(ev)));

          track.appendChild(page);
        }

        viewport.appendChild(track);
        host.content.appendChild(viewport);

        // --- DESKTOP NAV: arrows + page counter ---
        const nav = document.createElement('div');
        nav.className = 'vp-events-nav';
        nav.innerHTML = `
          <button class="vp-nav-arrow prev" aria-label="Previous events">❮</button>
          <span class="vp-nav-counter"></span>
          <button class="vp-nav-arrow next" aria-label="Next events">❯</button>
        `;
        host.content.appendChild(nav);

        // --- MOBILE SWIPE HINT ---
        const swipeHint = document.createElement('div');
        swipeHint.className = 'vp-swipe-hint';
        swipeHint.innerHTML = '<span>Swipe for more events</span> <span class="vp-hint-arrow">→</span>';
        host.content.appendChild(swipeHint);

        // --- VIEW ALL BUTTON ---
        const viewAll = document.createElement('a');
        viewAll.className = 'vp-events-viewall';
        viewAll.href = VIEW_ALL_URL;
        viewAll.textContent = 'View All Events';
        host.content.appendChild(viewAll);

        // --- PAGING (desktop) ---
        const prevButton = nav.querySelector('.prev');
        const nextButton = nav.querySelector('.next');
        const counter = nav.querySelector('.vp-nav-counter');

        let currentPage = 0;

        const updateCarousel = () => {
          // One page per view: shift by exactly 100% per step, so there's no
          // pixel math to get wrong and the column width is never exceeded.
          track.style.transform = `translateX(-${currentPage * 100}%)`;
          counter.textContent = `${currentPage + 1} / ${totalPages}`;
          prevButton.disabled = currentPage === 0;
          nextButton.disabled = currentPage >= totalPages - 1;
        };

        prevButton.addEventListener('click', () => {
          if (currentPage > 0) {
            currentPage--;
            updateCarousel();
          }
        });

        nextButton.addEventListener('click', () => {
          if (currentPage < totalPages - 1) {
            currentPage++;
            updateCarousel();
          }
        });

        // Only one page? Hide the nav and hint entirely.
        if (totalPages <= 1) {
          nav.style.setProperty('display', 'none', 'important');
          swipeHint.style.setProperty('display', 'none', 'important');
        }

        updateCarousel();
      });
    };

    const injectCSS = () => {
      const style = document.createElement('style');
      style.textContent = `
        @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;700;900&display=swap');

        /* Take over the native widget body. ChabadOne's fixWidgetBodyHeight()
           pins an inline height here, so !important is required to release it. */
        .widget-4.upcoming_events .widget_content.injected-vp-events {
          height: auto !important;
          max-height: none !important;
          overflow: visible !important;
          box-sizing: border-box !important;
          padding: 0 !important;
          font-family: 'Raleway', sans-serif !important;
        }

        /* Viewport: strictly the column's width, never wider */
        .injected-vp-events .vp-events-viewport {
          position: relative !important;
          width: 100% !important;
          max-width: 100% !important;
          overflow: hidden !important;
          box-sizing: border-box !important;
        }

        .injected-vp-events .vp-events-track {
          display: flex !important;
          width: 100% !important;
          transition: transform 0.4s ease-in-out !important;
        }

        /* Each page is exactly one viewport wide and holds 2 stacked events */
        .injected-vp-events .vp-events-page {
          flex: 0 0 100% !important;
          width: 100% !important;
          max-width: 100% !important;
          min-width: 0 !important;
          box-sizing: border-box !important;
          display: flex !important;
          flex-direction: column !important;
          gap: 10px !important;
        }

        /* --- EVENT ITEM (text only) --- */
        .injected-vp-events .vp-event-item {
          display: block !important;
          box-sizing: border-box !important;
          background: #ffffff !important;
          border: 1px solid #eee !important;
          border-left: 4px solid #4db2b8 !important;
          border-radius: 6px !important;
          padding: 12px 14px !important;
          text-decoration: none !important;
          transition: background-color 0.2s, border-left-color 0.2s !important;
        }
        .injected-vp-events .vp-event-item:hover {
          background: #fdfaf0 !important;
          border-left-color: #690122 !important;
          text-decoration: none !important;
        }

        .injected-vp-events .vp-event-date {
          display: inline-block !important;
          background: #ffe799 !important;
          color: #690122 !important;
          font-size: 10px !important;
          font-weight: 700 !important;
          letter-spacing: 0.5px !important;
          padding: 3px 8px !important;
          border-radius: 10px !important;
          margin-bottom: 7px !important;
        }

        .injected-vp-events .vp-event-title {
          font-size: 14px !important;
          font-weight: 700 !important;
          color: #690122 !important;
          line-height: 1.35 !important;
          margin-bottom: 5px !important;
          display: -webkit-box !important;
          -webkit-line-clamp: 2 !important;
          -webkit-box-orient: vertical !important;
          overflow: hidden !important;
        }

        .injected-vp-events .vp-event-action {
          font-size: 11px !important;
          font-weight: 700 !important;
          color: #4db2b8 !important;
        }

        /* --- DESKTOP NAV --- */
        .injected-vp-events .vp-events-nav {
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          gap: 12px !important;
          margin-top: 12px !important;
        }
        .injected-vp-events .vp-nav-arrow {
          background: #ffffff !important;
          border: 1px solid #ddd !important;
          border-radius: 50% !important;
          width: 28px !important;
          height: 28px !important;
          line-height: 1 !important;
          padding: 0 !important;
          font-size: 12px !important;
          color: #690122 !important;
          cursor: pointer !important;
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          transition: all 0.2s !important;
        }
        .injected-vp-events .vp-nav-arrow:hover:not(:disabled) {
          background: #4db2b8 !important;
          border-color: #4db2b8 !important;
          color: #ffffff !important;
        }
        .injected-vp-events .vp-nav-arrow:disabled {
          opacity: 0.3 !important;
          cursor: not-allowed !important;
        }
        .injected-vp-events .vp-nav-counter {
          font-size: 11px !important;
          font-weight: 700 !important;
          color: #690122 !important;
          min-width: 44px !important;
          text-align: center !important;
        }

        /* Swipe hint: mobile only (arrows take over on desktop) */
        .injected-vp-events .vp-swipe-hint {
          display: none !important;
          text-align: center !important;
          margin-top: 10px !important;
          font-size: 11px !important;
          font-weight: 600 !important;
          color: #690122 !important;
          align-items: center !important;
          justify-content: center !important;
          gap: 6px !important;
        }
        .injected-vp-events .vp-hint-arrow {
          font-size: 14px !important;
          font-weight: bold !important;
          color: #4db2b8 !important;
        }

        /* --- VIEW ALL BUTTON --- */
        .injected-vp-events .vp-events-viewall {
          display: block !important;
          box-sizing: border-box !important;
          width: 100% !important;
          margin-top: 12px !important;
          background-color: #4db2b8 !important;
          color: #ffffff !important;
          text-align: center !important;
          padding: 11px 10px !important;
          border-radius: 6px !important;
          font-size: 12px !important;
          font-weight: 700 !important;
          letter-spacing: 0.5px !important;
          text-transform: uppercase !important;
          text-decoration: none !important;
          transition: background-color 0.2s !important;
        }
        .injected-vp-events .vp-events-viewall:hover {
          background-color: #690122 !important;
          color: #ffffff !important;
          text-decoration: none !important;
        }

        /* --- MOBILE: native swipe instead of transform paging --- */
        @media (max-width: 768px) {
          .injected-vp-events .vp-events-viewport {
            overflow-x: auto !important;
            scroll-snap-type: x mandatory !important;
            -webkit-overflow-scrolling: touch !important;
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
          }
          .injected-vp-events .vp-events-viewport::-webkit-scrollbar {
            display: none !important;
          }
          .injected-vp-events .vp-events-track {
            transform: none !important;
          }
          .injected-vp-events .vp-events-page {
            scroll-snap-align: start !important;
          }
          .injected-vp-events .vp-events-nav {
            display: none !important;
          }
          .injected-vp-events .vp-swipe-hint {
            display: flex !important;
          }
        }
      `;
      document.head.appendChild(style);
    };

    if (document.readyState === 'complete' || document.readyState === 'interactive') {
      runTransformation();
    } else {
      window.addEventListener('DOMContentLoaded', runTransformation);
    }
    injectCSS();

  })();

}
</script><script>
(function () {
  // GATE ON URL + FORM: only runs on the Challah Project order form
  if (!/7628904/.test(window.location.href)) return;

  // ------------------------------------------------------------
  // CONFIG
  // ------------------------------------------------------------
  var BANNER = 'https://www.chabadvallarta.com/media/images/1396/OoPg13966278.jpg';
  var KOSHER_URL = 'https://www.chabadvallarta.com/7418518';
  var PRICE = 5;                       // challah and each dip
  var WEEKS_AHEAD = 23;                // how many Thursdays to offer
  var CHALLAH = { id: 'input_9', name: 'Challah' };
  var DIPS = [
    { id: 'input_19', name: 'Chummus' },
    { id: 'input_18', name: 'Matbucha' },
    { id: 'input_17', name: 'Baba ganoush' },
    { id: 'input_16', name: 'Roasted eggplant' },
    { id: 'input_15', name: 'Egg salad' },
    { id: 'input_14', name: 'Olive dip' }
  ];
  // Delivery radio (id_20) option index -> zone number field + fee
  var ZONES = [
    { zone: 'Zone 1', area: 'Hotel Zone to Marina Vallarta', fee: 4, field: 'input_13' },
    { zone: 'Zone 1', area: 'Downtown (Centro)', fee: 4, field: 'input_13' },
    { zone: 'Zone 2', area: 'Nuevo Vallarta', fee: 8, field: 'input_12' },
    { zone: 'Zone 2', area: 'Zona Romántica and Conchas Chinas', fee: 8, field: 'input_12' },
    { zone: 'Zone 3', area: 'Bucerías and La Cruz de Huanacaxtle', fee: 11, field: 'input_11' },
    { zone: 'Zone 3', area: 'Mismaloya', fee: 11, field: 'input_11' },
    { zone: 'Pickup', area: 'Pick up at Chabad on Thursday (Av. Francisco Medina Ascencio 1951, Hotel Zone)', fee: 0, field: null }
  ];
  var ZONE_FIELDS = ['input_13', 'input_12', 'input_11'];
  var SUMMARY_FIELD = 'input_21';

  var MONTHS = ['January','February','March','April','May','June','July','August','September','October','November','December'];
  var MON = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];

  // state: { 'YYYY-MM-DD': { challah: n, dips: [n,...] } }
  var order = {};
  var openKey = null;

  function $(id) { return document.getElementById(id); }
  function money(n) { return '$' + (Math.round(n * 100) / 100).toString(); }
  function ready(fn) { if (document.readyState !== 'loading') fn(); else document.addEventListener('DOMContentLoaded', fn); }
  function el(tag, cls, html) { var e = document.createElement(tag); if (cls) e.className = cls; if (html != null) e.innerHTML = html; return e; }

  // Today in Puerto Vallarta (America/Mexico_City)
  function todayPV() {
    try {
      var s = new Date().toLocaleDateString('en-CA', { timeZone: 'America/Mexico_City' });
      var p = s.split('-');
      return new Date(+p[0], +p[1] - 1, +p[2]);
    } catch (e) { var d = new Date(); return new Date(d.getFullYear(), d.getMonth(), d.getDate()); }
  }
  function keyOf(d) { return d.getFullYear() + '-' + ('0' + (d.getMonth() + 1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2); }
  function labelOf(d) { return 'Thu, ' + MON[d.getMonth()] + ' ' + d.getDate(); }

  // Orders for a Thursday close the Wednesday before (end of day)
  function thursdays() {
    var t = todayPV();
    var d = new Date(t.getFullYear(), t.getMonth(), t.getDate() + 1); // first Thursday strictly after today
    while (d.getDay() !== 4) d.setDate(d.getDate() + 1);
    var out = [];
    for (var i = 0; i < WEEKS_AHEAD; i++) { out.push(new Date(d.getFullYear(), d.getMonth(), d.getDate() + 7 * i)); }
    return out;
  }

  function setNative(id, n) {
    var i = $(id); if (!i) return;
    var v = n > 0 ? String(n) : '';
    if (i.value === v) return;
    i.value = v;
    if (window.$j) { try { window.$j(i).trigger('change').trigger('keyup'); } catch (e) {} }
    ['input', 'change', 'keyup'].forEach(function (ev) { i.dispatchEvent(new Event(ev, { bubbles: true })); });
  }

  function zoneIndex() {
    for (var i = 0; i < ZONES.length; i++) { var r = $('input_20_' + i); if (r && r.checked) return i; }
    return -1;
  }

  function dayItems(o) { var n = o.challah; o.dips.forEach(function (x) { n += x; }); return n; }
  function dayText(o) {
    var parts = [];
    if (o.challah) parts.push(o.challah + ' challah' + (o.challah > 1 ? 's' : ''));
    o.dips.forEach(function (q, i) { if (q) parts.push(q + ' ' + DIPS[i].name); });
    return parts.length ? parts.join(', ') : 'nothing selected';
  }
  function keys() { return Object.keys(order).sort(); }

  // ------------------------------------------------------------
  // STYLES
  // ------------------------------------------------------------
  function injectCSS() {
    var f = document.createElement('link');
    f.rel = 'stylesheet';
    f.href = 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap';
    document.head.appendChild(f);
    var s = document.createElement('style');
    s.textContent = `
    :root {
      --cp-primary: #b48a80; --cp-primary-dark: #9a6f65; --cp-primary-bg: rgba(180,138,128,0.13);
      --cp-primary-faint: rgba(180,138,128,0.06); --cp-primary-border: rgba(180,138,128,0.35);
      --cp-text: #3b3b3b; --cp-text-med: #535353; --cp-text-light: #8b8b8b;
      --cp-border: #e0d6d3; --cp-border-light: #efe9e7; --cp-bg-light: #faf7f6; --cp-radius: 12px;
    }
    html body .cp-on #formContainer .form-all { font-family: 'Poppins', sans-serif !important; width: 100% !important; max-width: 760px !important; margin: 0 auto !important; padding: 10px 0 110px !important; background: transparent !important; box-shadow: none !important; }
    html body .cp-on #formContainer, html body .cp-on #formContainer * { box-sizing: border-box; }
    html body .cp-on #formContainer .form-section { padding: 0 !important; margin: 0 !important; list-style: none !important; }
    html body .cp-on #formContainer li.form-line { list-style: none !important; margin: 0 !important; padding: 8px 0 !important; border: 0 !important; background: none !important; width: 100% !important; }
    html body .cp-on #formContainer .form-label-left { float: none !important; display: block !important; width: auto !important; margin: 0 0 6px !important; padding: 0 !important; text-align: left !important; }
    html body .cp-on #formContainer .form-label-left label { font-family: 'Poppins', sans-serif !important; font-size: 14px !important; font-weight: 500 !important; color: var(--cp-text) !important; }
    html body .cp-on #formContainer .form-required { color: var(--cp-primary-dark) !important; }
    html body .cp-on #formContainer .form-input { float: none !important; display: block !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
    html body .cp-on #formContainer input[type=text], html body .cp-on #formContainer input[type=email], html body .cp-on #formContainer input[type=tel], html body .cp-on #formContainer textarea, html body .cp-on #formContainer select {
      font-family: 'Poppins', sans-serif !important; font-size: 14px !important; color: var(--cp-text) !important; border: 1px solid var(--cp-border) !important; border-radius: 10px !important; padding: 10px 12px !important; background: #fff !important; height: auto !important; box-shadow: none !important; max-width: 100% !important; }
    html body .cp-on #formContainer textarea { width: 100% !important; min-height: 80px !important; }
    html body .cp-on #formContainer input:focus, html body .cp-on #formContainer textarea:focus, html body .cp-on #formContainer select:focus { outline: none !important; border-color: var(--cp-primary) !important; box-shadow: 0 0 0 3px var(--cp-primary-bg) !important; }
    html body .cp-on #formContainer #id_4 input, html body .cp-on #formContainer #id_1 input { width: 100% !important; }
    html body .cp-on #formContainer #id_1 .form-sub-label-container, html body .cp-on #formContainer #id_3 .form-sub-label-container { width: 49% !important; display: inline-block !important; vertical-align: top; }
    html body .cp-on #formContainer #id_1 .form-sub-label-container input, html body .cp-on #formContainer #id_3 .form-sub-label-container input { width: 100% !important; }
    html body .cp-on #formContainer #id_3 .form-sub-label-container:first-child { width: 30% !important; }
    html body .cp-on #formContainer #id_3 .form-sub-label-container:nth-child(2) { width: 68% !important; }
    html body .cp-on #formContainer .form-sub-label { font-family: 'Poppins', sans-serif !important; font-size: 11px !important; color: var(--cp-text-light) !important; }
    /* hidden native fields */
    html body .cp-on #formContainer li.cp-hidden { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; padding: 0 !important; }
    /* hero */
    .cp-hero { text-align: center; margin: 0 0 18px; }
    .cp-hero img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 4px 18px rgba(0,0,0,0.08); margin: 0 0 22px; }
    html body .cp-hero h2.cp-title { font-family: 'Playfair Display', Georgia, serif !important; font-size: 32px !important; line-height: 1.2 !important; color: var(--cp-primary) !important; margin: 0 0 6px !important; font-weight: 700 !important; border: 0 !important; }
    html body .cp-hero p.cp-sub { font-family: 'Poppins', sans-serif !important; font-size: 14px !important; color: var(--cp-text-med) !important; margin: 0 !important; }
    .cp-notice { font-family: 'Poppins', sans-serif; font-size: 13px; line-height: 1.6; color: var(--cp-text-med); background: var(--cp-bg-light); border: 1px solid var(--cp-border); border-left: 4px solid var(--cp-primary); border-radius: var(--cp-radius); padding: 12px 16px; margin: 0 0 18px; text-align: left; }
    .cp-notice b { color: var(--cp-text); }
    html body .cp-notice a { color: var(--cp-primary-dark) !important; font-weight: 600; text-decoration: underline !important; }
    /* boxes */
    .cp-box { background: #fff; border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 22px 22px 14px; margin: 0 0 18px; }
    html body .cp-box h3.cp-h { font-family: 'Playfair Display', Georgia, serif !important; font-size: 22px !important; color: var(--cp-text) !important; margin: 0 0 4px !important; font-weight: 700 !important; border: 0 !important; padding: 0 !important; }
    html body .cp-box p.cp-hint { font-family: 'Poppins', sans-serif !important; font-size: 13px !important; color: var(--cp-text-light) !important; margin: 0 0 12px !important; line-height: 1.5 !important; }
    .cp-box ul.cp-list { list-style: none; margin: 0; padding: 0; }
    /* thursdays */
    .cp-month { font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--cp-text-light); margin: 14px 0 6px; }
    .cp-day { border: 1px solid var(--cp-border); border-radius: 10px; margin: 0 0 8px; background: #fff; font-family: 'Poppins', sans-serif; transition: border-color .15s, background .15s; }
    .cp-day.cp-sel { border-color: var(--cp-primary); }
    .cp-day-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; user-select: none; }
    .cp-day.cp-sel .cp-day-head { background: var(--cp-primary-faint); border-radius: 10px 10px 0 0; }
    .cp-check { width: 20px; height: 20px; border: 1.5px solid var(--cp-border); border-radius: 5px; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: #fff; }
    .cp-day.cp-sel .cp-check { background: var(--cp-primary); border-color: var(--cp-primary); }
    .cp-day-name { font-weight: 600; font-size: 14px; color: var(--cp-text); flex: 1; }
    .cp-day-meta { font-size: 12px; color: var(--cp-text-light); }
    .cp-day.cp-sel .cp-day-meta { color: var(--cp-primary-dark); font-weight: 500; }
    .cp-day-body { display: none; padding: 12px 14px 14px; border-top: 1px solid var(--cp-border-light); }
    .cp-day.cp-open .cp-day-body { display: block; }
    .cp-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--cp-bg-light); border-radius: 8px; padding: 8px 10px; }
    .cp-item.cp-main { background: var(--cp-primary-bg); margin: 0 0 12px; padding: 10px 12px; }
    .cp-item-name { font-size: 13px; color: var(--cp-text); line-height: 1.25; }
    .cp-item.cp-main .cp-item-name { font-size: 15px; font-weight: 600; }
    .cp-item-name small { font-size: 11px; color: var(--cp-text-light); font-weight: 400; margin-left: 4px; }
    .cp-dips-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--cp-text-light); margin: 0 0 6px; }
    .cp-dips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .cp-step { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
    html body .cp-step button { width: 28px !important; height: 28px !important; border-radius: 50% !important; border: 1px solid var(--cp-border) !important; background: #fff !important; color: var(--cp-text) !important; font-size: 16px !important; line-height: 1 !important; padding: 0 !important; cursor: pointer; font-family: 'Poppins', sans-serif !important; }
    html body .cp-step button:hover { border-color: var(--cp-primary) !important; color: var(--cp-primary-dark) !important; }
    .cp-step span { min-width: 20px; text-align: center; font-size: 14px; font-weight: 600; color: var(--cp-text); }
    .cp-day-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 0; flex-wrap: wrap; }
    html body .cp-btn { font-family: 'Poppins', sans-serif !important; background: var(--cp-primary) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; padding: 8px 16px !important; font-size: 12px !important; font-weight: 600 !important; cursor: pointer; }
    html body .cp-btn:hover { background: var(--cp-primary-dark) !important; }
    html body .cp-link { font-family: 'Poppins', sans-serif !important; background: none !important; border: 0 !important; color: var(--cp-primary-dark) !important; text-decoration: underline !important; font-size: 12px !important; cursor: pointer; padding: 0 !important; }
    .cp-count { display: flex; justify-content: space-between; font-family: 'Poppins', sans-serif; font-size: 13px; color: var(--cp-text-med); margin: 10px 0 4px; }
    /* delivery radio as cards */
    html body .cp-on #formContainer #id_20 .form-label-left { display: none !important; }
    html body .cp-on #formContainer #id_20 .form-radio-item { display: block !important; float: none !important; margin: 0 0 8px !important; width: 100% !important; }
    html body .cp-on #formContainer #id_20 .form-radio-item .clearfix, html body .cp-on #formContainer #id_20 span.clearfix { display: none !important; }
    html body .cp-on #formContainer #id_20 .form-radio-item input { position: absolute !important; opacity: 0 !important; }
    html body .cp-on #formContainer #id_20 .form-radio-item label { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--cp-border) !important; border-radius: 10px !important; padding: 11px 14px !important; cursor: pointer; font-family: 'Poppins', sans-serif !important; font-size: 13px !important; color: var(--cp-text-med) !important; background: #fff; width: 100% !important; margin: 0 !important; }
    html body .cp-on #formContainer #id_20 .form-radio-item input:checked + label { border-color: var(--cp-primary) !important; background: var(--cp-primary-faint) !important; box-shadow: 0 0 0 2px var(--cp-primary-bg); }
    .cp-zone b { color: var(--cp-text); font-weight: 600; margin-right: 6px; }
    .cp-fee { font-weight: 600; color: var(--cp-text); white-space: nowrap; }
    /* summary */
    .cp-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--cp-border); font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--cp-text); }
    .cp-sum-row small { display: block; font-size: 12px; color: var(--cp-text-light); }
    .cp-sum-total { display: flex; justify-content: space-between; padding: 12px 0 6px; font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--cp-text); }
    .cp-empty { font-family: 'Poppins', sans-serif; font-size: 13px; color: var(--cp-text-light); padding: 6px 0; }
    html body .cp-on #formContainer #id_8 { display: none !important; }
    html body .cp-on #formContainer #id_2 .form-input-wide, html body .cp-on #formContainer #id_2 .form-buttons-wrapper { width: 100% !important; margin: 0 !important; padding: 0 !important; text-align: center !important; }
    html body .cp-on #formContainer #id_2 button { margin: 8px 0 0 !important; width: 100% !important; background: var(--cp-primary) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important; padding: 15px !important; font-family: 'Poppins', sans-serif !important; font-size: 17px !important; font-weight: 700 !important; cursor: pointer; }
    html body .cp-on #formContainer #id_2 button:hover { background: var(--cp-primary-dark) !important; }
    html body .cp-on #formContainer #id_5 .form-checkbox-item { background: var(--cp-bg-light); border: 1px solid var(--cp-border); border-radius: 10px; padding: 10px 12px; }
    html body .cp-on #formContainer #id_5 label { font-family: 'Poppins', sans-serif !important; font-size: 13px !important; color: var(--cp-text-med) !important; }
    .cp-err { display: none; font-family: 'Poppins', sans-serif; font-size: 13px; color: #a33; background: #fdf1f1; border: 1px solid #f1caca; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
    html body p.cp-paynote { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; line-height: 1.5 !important; color: var(--cp-text-light) !important; text-align: center !important; margin: 8px 0 6px !important; }
    /* sticky bar */
    .cp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #fff; border-top: 1px solid var(--cp-border); box-shadow: 0 -4px 14px rgba(0,0,0,0.06); display: none; align-items: center; justify-content: space-between; padding: 10px 88px 10px 16px; font-family: 'Poppins', sans-serif; }
    .cp-bar.cp-show { display: flex; }
    .cp-bar-left small { display: block; font-size: 12px; color: var(--cp-text-light); }
    .cp-bar-left b { font-size: 16px; color: var(--cp-text); }
    @media (max-width: 600px) {
      .cp-box { padding: 16px 14px 10px; }
      .cp-dips { grid-template-columns: repeat(2, 1fr); }
      html body .cp-hero h2.cp-title { font-size: 25px !important; }
      html body .cp-on #formContainer #id_1 .form-sub-label-container { width: 100% !important; }
      html body .cp-on #formContainer #id_20 .form-radio-item label { font-size: 12px !important; }
    }
    `;
    document.head.appendChild(s);
  }

  // ------------------------------------------------------------
  // BUILD
  // ------------------------------------------------------------
  var dayList, countEl, summaryEl, barEl, barCount, barTotal, errEl;

  function box(title, hint, cls) {
    var b = el('div', 'cp-box' + (cls ? ' ' + cls : ''));
    b.appendChild(el('h3', 'cp-h', title));
    if (hint) b.appendChild(el('p', 'cp-hint', hint));
    var ul = el('ul', 'cp-list form-section');
    b.appendChild(ul);
    return { box: b, ul: ul };
  }
  function move(ul, ids) { ids.forEach(function (id) { var li = $(id); if (li) ul.appendChild(li); }); }

  function stepper(get, set) {
    var w = el('div', 'cp-step');
    var minus = el('button', '', '−'); minus.type = 'button'; minus.setAttribute('aria-label', 'Less');
    var val = el('span', '', String(get()));
    var plus = el('button', '', '+'); plus.type = 'button'; plus.setAttribute('aria-label', 'More');
    minus.addEventListener('click', function (e) { e.stopPropagation(); var n = get(); if (n > 0) { set(n - 1); } });
    plus.addEventListener('click', function (e) { e.stopPropagation(); set(get() + 1); });
    w.appendChild(minus); w.appendChild(val); w.appendChild(plus);
    return w;
  }

  function renderDays() {
    dayList.innerHTML = '';
    var lastMonth = -1;
    thursdays().forEach(function (d) {
      var k = keyOf(d);
      if (d.getMonth() !== lastMonth) { lastMonth = d.getMonth(); dayList.appendChild(el('div', 'cp-month', MONTHS[d.getMonth()] + ' ' + d.getFullYear())); }
      var o = order[k];
      var day = el('div', 'cp-day' + (o ? ' cp-sel' : '') + (openKey === k ? ' cp-open' : ''));
      var head = el('div', 'cp-day-head');
      head.setAttribute('role', 'button'); head.setAttribute('tabindex', '0');
      head.appendChild(el('span', 'cp-check', o ? '✓' : ''));
      head.appendChild(el('span', 'cp-day-name', labelOf(d)));
      var meta = o ? (o.challah + ' challah' + (o.challah === 1 ? '' : 's') + (dayItems(o) - o.challah ? ' + ' + (dayItems(o) - o.challah) + ' dip' + (dayItems(o) - o.challah === 1 ? '' : 's') : '') + ' · ' + money(dayItems(o) * PRICE)) : 'Tap to add';
      head.appendChild(el('span', 'cp-day-meta', meta + (o ? (openKey === k ? ' ▴' : ' ▾') : '')));
      function toggle() {
        if (!order[k]) { order[k] = { challah: 1, dips: DIPS.map(function () { return 0; }) }; openKey = k; }
        else { openKey = (openKey === k) ? null : k; }
        update();
      }
      head.addEventListener('click', toggle);
      head.addEventListener('keydown', function (e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); } });
      day.appendChild(head);

      if (o) {
        var body = el('div', 'cp-day-body');
        var main = el('div', 'cp-item cp-main');
        main.appendChild(el('div', 'cp-item-name', 'Challah<small>$' + PRICE + ' each</small>'));
        main.appendChild(stepper(function () { return o.challah; }, function (n) { o.challah = n; update(); }));
        body.appendChild(main);
        body.appendChild(el('div', 'cp-dips-label', 'Add dips · $' + PRICE + ' each'));
        var grid = el('div', 'cp-dips');
        DIPS.forEach(function (dip, i) {
          var it = el('div', 'cp-item');
          it.appendChild(el('div', 'cp-item-name', dip.name));
          it.appendChild(stepper(function () { return o.dips[i]; }, function (n) { o.dips[i] = n; update(); }));
          grid.appendChild(it);
        });
        body.appendChild(grid);
        var acts = el('div', 'cp-day-actions');
        var same = el('button', 'cp-btn', 'Same order every Thursday'); same.type = 'button';
        same.title = 'Copy this order to every Thursday listed';
        same.addEventListener('click', function () {
          thursdays().forEach(function (td) { order[keyOf(td)] = { challah: o.challah, dips: o.dips.slice() }; });
          update();
        });
        var rm = el('button', 'cp-link', 'Remove this Thursday'); rm.type = 'button';
        rm.addEventListener('click', function () { delete order[k]; if (openKey === k) openKey = null; update(); });
        acts.appendChild(same); acts.appendChild(rm);
        body.appendChild(acts);
        day.appendChild(body);
      }
      dayList.appendChild(day);
    });
  }

  function decorateZones() {
    ZONES.forEach(function (z, i) {
      var lab = $('label_input_20_' + i);
      if (!lab || lab.getAttribute('data-cp')) return;
      lab.setAttribute('data-cp', '1');
      lab.innerHTML = '<span class="cp-zone"><b>' + z.zone + '</b>' + z.area + '</span><span class="cp-fee">' + (z.fee ? '$' + z.fee : 'Free') + '</span>';
    });
    ZONES.forEach(function (z, i) { var r = $('input_20_' + i); if (r) r.addEventListener('change', update); });
  }

  function update() {
    var ks = keys();
    var weeks = 0, items = 0, challahTotal = 0, dipTotals = DIPS.map(function () { return 0; });
    ks.forEach(function (k) {
      var o = order[k];
      if (dayItems(o) > 0) weeks++;
      challahTotal += o.challah; items += dayItems(o);
      o.dips.forEach(function (q, i) { dipTotals[i] += q; });
    });
    var zi = zoneIndex();
    var z = zi >= 0 ? ZONES[zi] : null;
    var fee = z ? z.fee * weeks : 0;
    var total = items * PRICE + fee;

    // write native fields (they carry the real prices)
    setNative(CHALLAH.id, challahTotal);
    DIPS.forEach(function (d, i) { setNative(d.id, dipTotals[i]); });
    ZONE_FIELDS.forEach(function (f) { setNative(f, z && z.field === f ? weeks : 0); });

    // plain-text order details for the submission
    var lines = ks.filter(function (k) { return dayItems(order[k]) > 0; }).map(function (k) {
      var p = k.split('-'); return labelOf(new Date(+p[0], +p[1] - 1, +p[2])) + ' ' + p[0] + ': ' + dayText(order[k]);
    });
    if (z) lines.push((z.fee ? 'Delivery: ' + z.zone + ' – ' + z.area + ' ($' + z.fee + ' x ' + weeks + ')' : 'Pickup at Chabad (free)'));
    lines.push('Total: ' + money(total) + ' USD');
    var sf = $(SUMMARY_FIELD); if (sf) sf.value = lines.join('\n');

    renderDays();
    countEl.firstChild.textContent = weeks + ' Thursday' + (weeks === 1 ? '' : 's') + ' chosen';

    // summary box
    var h = '';
    if (!ks.length) h += '<div class="cp-empty">Choose at least one Thursday above.</div>';
    ks.forEach(function (k) {
      var o = order[k]; var p = k.split('-');
      h += '<div class="cp-sum-row"><div>' + labelOf(new Date(+p[0], +p[1] - 1, +p[2])) + '<small>' + dayText(o) + '</small></div><div>' + money(dayItems(o) * PRICE) + '</div></div>';
    });
    if (z) h += '<div class="cp-sum-row"><div>' + (z.fee ? 'Delivery · ' + z.zone + '<small>' + z.area + ' · $' + z.fee + ' × ' + weeks + ' Thursday' + (weeks === 1 ? '' : 's') + '</small>' : 'Pickup at Chabad') + '</div><div>' + (z.fee ? money(fee) : 'Free') + '</div></div>';
    else h += '<div class="cp-sum-row"><div>Delivery <small>choose delivery or pickup</small></div><div>–</div></div>';
    h += '<div class="cp-sum-total"><span>Total</span><span>' + money(total) + ' USD</span></div>';
    summaryEl.innerHTML = h;

    barCount.textContent = weeks + ' Thursday' + (weeks === 1 ? '' : 's');
    barTotal.textContent = 'Total ' + money(total) + ' USD';
    barEl.classList.toggle('cp-show', ks.length > 0);
    var a = $('id_6'); if (a) a.style.display = (z && !z.fee) ? 'none' : '';
  }

  function validate() {
    var msgs = [];
    var any = keys().some(function (k) { return dayItems(order[k]) > 0; });
    if (!any) msgs.push('Please choose at least one Thursday with challah or dips.');
    var zi = zoneIndex();
    if (zi < 0) msgs.push('Please choose delivery or pickup.');
    else if (ZONES[zi].fee && !($('input_6') && $('input_6').value.trim())) msgs.push('Please enter your delivery address.');
    if (msgs.length) { errEl.innerHTML = msgs.join('<br />'); errEl.style.display = 'block'; errEl.scrollIntoView({ behavior: 'smooth', block: 'center' }); return false; }
    errEl.style.display = 'none'; return true;
  }

  ready(function () {
    var form = document.getElementById('7628904');
    var first = $('id_1');
    if (!form || !first || !$('input_9')) return;   // not the order page (e.g. thank-you page)
    injectCSS();
    var container = $('formContainer') || form.parentNode;
    container.classList.add('cp-on');
    if (container.parentNode) container.parentNode.classList.add('cp-on');
    var all = form.querySelector('.form-all') || form;
    var section = first.parentNode;

    // hero
    var hero = el('div', 'cp-hero',
      '<img src="' + BANNER + '" alt="Chabad of Puerto Vallarta Challah Project: fresh challah and homemade dips" />' +
      '<h2 class="cp-title">Thursday Challah Delivery</h2>' +
      '<p class="cp-sub">Fresh challah and homemade dips, delivered to your door every Thursday you choose.</p>');
    var notice = el('div', 'cp-notice', '<b>For Chabad of Puerto Vallarta members.</b> This form is only for our full-time and part-time members. Visitors, please order through our regular <a href="' + KOSHER_URL + '">Kosher Vallarta delivery site</a>.');
    all.insertBefore(hero, all.firstChild);
    all.insertBefore(notice, hero.nextSibling);

    // details
    var d1 = box('Your details');
    move(d1.ul, ['id_1', 'id_3', 'id_4', 'id_6']);
    all.insertBefore(d1.box, notice.nextSibling);

    // thursdays
    var d2 = box('Choose your Thursdays', 'Tap a Thursday to add it, then choose your challahs and dips for that day. Challah is $' + PRICE + ' and each dip is $' + PRICE + '. Orders for a Thursday close the Wednesday before.');
    dayList = el('div', 'cp-days');
    d2.box.insertBefore(dayList, d2.ul);
    countEl = el('div', 'cp-count', '<span>0 Thursdays chosen</span>');
    var clr = el('button', 'cp-link', 'Clear all'); clr.type = 'button';
    clr.addEventListener('click', function () { order = {}; openKey = null; update(); });
    countEl.appendChild(clr);
    d2.box.insertBefore(countEl, d2.ul);
    move(d2.ul, ['id_22']);
    all.insertBefore(d2.box, d1.box.nextSibling);

    // delivery
    var d3 = box('Delivery or pickup', 'The delivery fee is charged once for each Thursday. Pickup at Chabad is free. Not sure of your zone? Pick the closest one and add a note.');
    move(d3.ul, ['id_20']);
    all.insertBefore(d3.box, d2.box.nextSibling);

    // summary + payment
    var d4 = box('Order summary');
    summaryEl = el('div', 'cp-summary');
    d4.box.insertBefore(summaryEl, d4.ul);
    errEl = el('div', 'cp-err');
    move(d4.ul, ['id_8', 'id_10', 'id_5', 'id_2']);
    d4.box.appendChild(errEl);
    d4.box.appendChild(el('p', 'cp-paynote', 'Payment is processed securely. If you do not get an email confirmation, your order did not go through and your card was not charged.'));
    all.insertBefore(d4.box, d3.box.nextSibling);

    // hide native item / helper fields (they still submit and price the order)
    ['id_9', 'id_19', 'id_18', 'id_17', 'id_16', 'id_15', 'id_14', 'id_13', 'id_12', 'id_11', 'id_21'].forEach(function (id) { var li = $(id); if (li) li.classList.add('cp-hidden'); });
    if (section && !section.querySelector('li.form-line:not(.cp-hidden)')) section.style.margin = '0';

    // sticky bar
    barEl = el('div', 'cp-bar');
    var left = el('div', 'cp-bar-left');
    barCount = el('small', '', ''); barTotal = el('b', '', '');
    left.appendChild(barCount); left.appendChild(barTotal);
    var go = el('button', 'cp-btn', 'Finish order ↓'); go.type = 'button';
    go.addEventListener('click', function () { d4.box.scrollIntoView({ behavior: 'smooth', block: 'start' }); });
    barEl.appendChild(left); barEl.appendChild(go);
    document.body.appendChild(barEl);

    decorateZones();
    update();

    // block submit until the order is complete
    var btn = $('input_2');
    if (btn) btn.addEventListener('click', function (e) { update(); if (!validate()) { e.preventDefault(); e.stopImmediatePropagation(); } }, true);
    form.addEventListener('submit', function (e) { update(); if (!validate()) { e.preventDefault(); e.stopImmediatePropagation(); } }, true);
  });
})();
</script><script type="text/plain" data-paused="home-design">/*<![CDATA[*/
(function(){
  if(!/(^|\s)home(\s|$)/.test(document.body.className)) return;
  var main=document.querySelector('#content .main'); if(!main||document.getElementById('cvhp-top')) return;
  function $(id){return document.getElementById(id);}
  function txt(el){return el?el.textContent.replace(/\s+/g,' ').trim():'';}
  function esc(s){return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/"/g,'"');}
  function events(){
    var box=$('cv-events'); if(!box) return;
    fetch('/templates/events.htm',{credentials:'same-origin'}).then(function(r){return r.text();}).then(function(t){
      var d=new DOMParser().parseFromString(t,'text/html'), days=d.querySelectorAll('.list_view .list .category_collection'), out=[], i, j;
      var MON={January:'Jan',February:'Feb',March:'Mar',April:'Apr',May:'May',June:'Jun',July:'Jul',August:'Aug',September:'Sep',October:'Oct',November:'Nov',December:'Dec'};
      for(i=0;i<days.length&&out.length<6;i++){
        var m=txt(days[i].querySelector('.date')).match(/^(\w+),\s*(\w+)\s+(\d+),\s*(\d+)/); if(!m) continue;
        var heb=txt(days[i].querySelector('.date_stamp .list_info > div:nth-child(2)')).replace(/,\s*\d+$/,'');
        var items=days[i].querySelectorAll('.category_item');
        for(j=0;j<items.length&&out.length<6;j++){
          var it=items[j], opts=it.querySelector('.event_options'), time='';
          if(opts){var dv=opts.querySelectorAll(':scope > div'); if(dv.length) time=txt(dv[dv.length-1]);}
          var name=txt(it.querySelector('.event_wrapper > .event_name')); if(!name) continue;
          var where='', wl=it.querySelectorAll('.event_wrapper .event_info a');
          if(wl.length){where=txt(wl[0]); where=/^Chabad of Puerto Vallarta/.test(where)?'At Chabad':where.split(/ Puerto Vallarta| Mexico/)[0];}
          var more=it.querySelector('.more_info a'), href=more?more.getAttribute('href'):'', rsvp=/friday night|shabbat dinner/i.test(name); if(!href||/\.(jpe?g|png|gif|webp|pdf)([?#]|$)/i.test(href)){href=rsvp?'/5322770':'/calendar/view/day.asp?tdate='+((['January','February','March','April','May','June','July','August','September','October','November','December'].indexOf(m[2]))+1)+'/'+m[3]+'/'+m[4];}
          out.push({wd:m[1]==='Shabbat'?'Shabbat':m[1].slice(0,3),mon:MON[m[2]]||m[2].slice(0,3),day:m[3],heb:heb,time:time,name:name,where:where,href:href,rsvp:(rsvp||/register\.asp/i.test(href))});
        }
      }
      if(!out.length) return;
      var h='';
      out.forEach(function(e,k){
        h+='<a class="cv-ev cv-ev-'+(k%3)+'" href="'+esc(e.href)+'"><span class="cv-ev-stub"><span class="cv-ev-wd">'+esc(e.wd)+'</span><span class="cv-ev-day">'+esc(e.day)+'</span><span class="cv-ev-mon">'+esc(e.mon)+'</span><span class="cv-ev-heb">'+esc(e.heb)+'</span></span>'
          +'<span class="cv-ev-body"><span class="cv-ev-name">'+esc(e.name)+'</span>'
          +(e.time?'<span class="cv-ev-meta cv-ev-time">'+esc(e.time)+'</span>':'')
          +(e.where?'<span class="cv-ev-meta cv-ev-where">'+esc(e.where)+'</span>':'')
          +'<span class="cv-ev-go">'+(e.rsvp?'RSVP':'Details')+' →</span></span></a>';
      });
      box.innerHTML=h; document.body.className+=' cv-ev-on';
    }).catch(function(){});
  }
  function shabbat(){
    fetch('https://www.hebcal.com/shabbat?cfg=json&latitude=20.6534&longitude=-105.2253&tzid=America/Mexico_City&M=on&b=18').then(function(r){return r.json();}).then(function(j){
      var done=false; (j.items||[]).forEach(function(it){var v=String(it.title).replace(/^.*?:\s*/,'');
        if(it.category==='candles'&&!done&&$('cv-candles')){$('cv-candles').textContent=v;done=true;}
        if(it.category==='havdalah'&&$('cv-havdalah')){$('cv-havdalah').textContent=v;}
        if(it.category==='parashat'&&$('cv-parasha')){$('cv-parasha').textContent=it.title;}});
    }).catch(function(){});
  }
  fetch('/7640929',{credentials:'same-origin'}).then(function(r){return r.text();}).then(function(t){
    var d=new DOMParser().parseFromString(t,'text/html'), st=null, ss=d.querySelectorAll('style'), i;
    for(i=0;i<ss.length;i++){if(ss[i].textContent.indexOf('cvhp')>-1){st=ss[i];break;}}
    var top=d.getElementById('cvhp-top'), bot=d.getElementById('cvhp-bot'); if(!top||!st) return;
    var s=document.createElement('style'); s.textContent=st.textContent; document.head.appendChild(s);
    main.insertBefore(document.importNode(top,true), main.firstChild);
    if(bot) main.appendChild(document.importNode(bot,true));
    events(); shabbat(); try{var now=new Date(), hs=document.querySelectorAll('#cv-holidays [data-end]'), k; for(k=0;k<hs.length;k++){var de=new Date(hs[k].getAttribute('data-end')+'T23:59:59'); if(!isNaN(de)&&de<now) hs[k].parentNode.removeChild(hs[k]);} var hb=$('cv-holidays'); if(hb&&!hb.querySelector('.cv-hol,.cv-hol-mini')) hb.style.display='none';}catch(e){}
  }).catch(function(){});
})();
/*]]>*/</script>
</body>
</html>