<script type="text/javascript">
jQuery(document).ready(function($){

    function updatePickupCalendar() {

        var city = $('#input_5_4_3').val().trim().toLowerCase();

        $('#input_5_22').datepicker('option', 'beforeShowDay', function(date) {

            var today = new Date();
            today.setHours(0,0,0,0);

            if (date < today) {
                return [false, "", "Past dates not allowed"];
            }

            if (date.getDay() !== 6) {
                return [false, "", "Pick-ups only occur on Saturdays"];
            }

            var firstSaturday = new Date(date.getFullYear(), date.getMonth(), 1);
            while (firstSaturday.getDay() !== 6) {
                firstSaturday.setDate(firstSaturday.getDate() + 1);
            }
            var thirdSaturday = new Date(firstSaturday);
            thirdSaturday.setDate(firstSaturday.getDate() + 14);

            var isFirst = date.getDate() === firstSaturday.getDate();
            var isThird = date.getDate() === thirdSaturday.getDate();

            if (isFirst) {
                if (city === 'brawley' || city === 'imperial') {
                    return [true, "available-pickup", "Pick-up day for Brawley & Imperial"];
                }
                return [false, "", "Only available for Brawley or Imperial"];
            }

            if (isThird) {
                if (city === 'el centro') {
                    return [true, "available-pickup", "Pick-up day for El Centro"];
                }
                return [false, "", "Only available for El Centro"];
            }

            return [false, "", "Pick-ups only happen on 1st & 3rd Saturdays"];
        });
    }

    $('<style>.available-pickup a { background: #2E8B57 !important; color: #fff !important; border-radius: 50% !important; }</style>')
        .appendTo('head');

    updatePickupCalendar();
    $(document).on('keyup change', '#input_5_4_3', updatePickupCalendar);

});
</script>

<script type="text/javascript">
jQuery(document).ready(function($){

    function validateCityZip() {
        var cityField = $('#input_5_4_3');
        var zipField  = $('#input_5_4_5');

        var city = cityField.val().trim().toLowerCase();
        var zip  = zipField.val().trim();

        var allowedCities = ['brawley', 'imperial', 'el centro'];
        var allowedZips   = ['92227', '92243', '92244', '92232', '92251'];

        cityField.next('.validation-error').remove();
        zipField.next('.validation-error').remove();

        var cityValid = allowedCities.includes(city);
        var zipValid  = allowedZips.includes(zip);

        if (!cityValid) {
            cityField.after('<div class="validation-error" style="color:#d00; margin-top:4px;">Pick-up is only available in Brawley, Imperial, or El Centro.</div>');
        }

        if (!zipValid) {
            zipField.after('<div class="validation-error" style="color:#d00; margin-top:4px;">Pick-up is only available in 92227, 92243, 92244, 92232, or 92251.</div>');
        }
    }

    $(document).on('blur keyup change', '#input_5_4_3, #input_5_4_5', validateCityZip);

});
</script>

    <script>
    jQuery(function($){
        const $date = $('#input_5_22');
        const $time = $('#input_5_27');
        const ajaxUrl = 'https://ivgoodwill.org/wp-admin/admin-ajax.php';

        function refreshTimes(dateVal){
            if(!dateVal){
                $time.find('option').prop('disabled', false).css('color', '#000');
                return;
            }

            $.post(ajaxUrl, {action:'gf_get_timeslots', selected_date:dateVal}, function(resp){
                if(resp.success){
                    const full=resp.data.full_slots||[];
                    let allFull=true;
                    let availableOptions='';

                    $time.find('option').each(function(){
                        const val=$(this).val();
                        const text=$(this).text();
                        if(!full.includes(val)){
                            availableOptions+=`<option value="${val}">${text}</option>`;
                            allFull=false;
                        }
                    });

                    // Rebuild dropdown
                    $time.html(availableOptions);

                    if(allFull && full.length>0){
                        if(!$('#no-times-msg').length){
                            $time.after('<div id="no-times-msg" style="color:#d00;margin-top:4px;">All time slots are full for this date. Please select another date.</div>');
                        }
                    } else {
                        $('#no-times-msg').remove();
                    }
                }
            }, 'json');
        }

        refreshTimes('');
        $date.on('change blur', function(){
            $('#no-times-msg').remove();
            refreshTimes($(this).val());
            $time.val('');
        });
    });
    </script>
    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//ivgoodwill.org/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<url>
		<loc>https://ivgoodwill.org/donate/donation-receipt/</loc>
		<lastmod>2024-01-18T21:10:01+00:00</lastmod>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2023/12/dell-reconnect-logo.png</image:loc>
		</image:image>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/faqs/</loc>
		<lastmod>2024-01-22T03:47:15+00:00</lastmod>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/where-to-donate/</loc>
		<lastmod>2024-08-01T22:59:42+00:00</lastmod>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/donate-money/</loc>
		<lastmod>2025-12-24T00:48:16+00:00</lastmod>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/12/icon-dollar.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/12/icon-check.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/12/icon-round-up.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/12/icon-other-donations.png</image:loc>
		</image:image>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/donate-electronics/</loc>
		<lastmod>2026-05-14T21:05:22+00:00</lastmod>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/recycle-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/facet-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/lightbulb-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/printer-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/earth-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/trees-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/90-percent-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/bright-lightbulb-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Electric-Truck-icon.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Dell-Reconnect-logo.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Evergreen-Banner-300x350-1.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/01/computer-donation-1100.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/01/DSC05445-scaled.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Ameer-Alnashi.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Andrew-Cable.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Maria-Gonzalez-Cesaretti.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2026/05/darlene_cossio-1.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/11/ruth_davis.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Jesse-De-Angelis.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/11/marvin_desouza.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2026/05/jack_forsythe.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Madeline-Lascola-Hutcherson.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/01/andres.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/11/George-Sanchez.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/Lotte-Phoummavong.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/crra-logo-200x75-1.png</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2024/12/city-of-la-mesa-200x75-2.jpg</image:loc>
		</image:image>
		<image:image>
			<image:loc>https://ivgoodwill.org/wp-content/uploads/2025/11/SANDAG-1.png</image:loc>
		</image:image>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/donation-pickup/</loc>
		<lastmod>2026-06-08T23:39:15+00:00</lastmod>
	</url>
	<url>
		<loc>https://ivgoodwill.org/donate/goods-we-accept/</loc>
		<lastmod>2026-06-09T19:42:16+00:00</lastmod>
	</url>
</urlset>
<!-- XML Sitemap generated by Yoast SEO -->