$(function(){var a="http://"+document.domain;var b=$("input[name='date']");$("input[name='date']").DatePicker({format:"Y-m-d",date:new Date,starts:0,onChange:function(a,c){b.val(a);b.DatePickerHide()}});$("#datepicker_icon").toggle(function(){b.DatePickerShow()},function(){b.DatePickerHide()});$volunteerForm=$("#volunteer_form");if($volunteerForm.length>0){$volunteerForm.hide();jQuery.post(a+"/app-services.php",{service:"get_postback_key"},function(a){if(a.status=="success"){$volunteerForm.append('<input type="hidden" name="form_key" value="'+a.response+'" />');$volunteerForm.append('<input type="hidden" name="service" value="put_volunteer_hours" />');$volunteerForm.show()}},"json");$volunteerForm.ajaxForm({url:a+"/app-services.php",dataType:"json",success:function(b){if(b.status=="success"){window.location=a+"/volunteer-thanks.html"}else{alert(b.message)}}})}$("#latest_news").ecNews({type:"news",maxItems:2});$("#latest_news_page").ecNews({type:"news",dateFormat:"m/d/yyyy",maxItems:0,template:'<li><strong>{item.date}</strong><br /><a href="{item.url}" target="_blank">{item.title}</a><br />{item.desc}</li>'});$("#upcoming_events").ecNews({type:"events",maxItems:2,wordLimit:4,template:'<li><span class="date">{item.date}</span><span class="text"><strong>{item.title}:</strong> {item.desc} <a href="/events.html" class="action purple_arrow_bg">more</a></span></li>'});$("#upcoming_events_page").ecNews({type:"events",dateFormat:"dddd, mmmm d, yyyy",maxItems:0,template:'<li><strong>{item.date}</strong><br /><a href="{item.url}">{item.title}</a><br />{item.desc}</li>'});$(".join_us_form").ecMail({recipient:"jcannon@episcopalcharities.org",subject:"Action Network Inquiry",required:"first_name,last_name,address,city,state,zip,phone_num,email,network,source",redirect:a+"/pcn-thankyou.html",template:"tpl_join_us_email"});$("#donate_car").ecMail({recipient:"sgonzales@episcopalcharities.org,info@cardonationservices.com",subject:"Episcopal Charities - Vehicle Donations",required:"title,first_name,last_name,address,city,state,zip,daytime_phone,email,year,make,model",redirect:a+"/donate-vehicle-thankyou.html",template:"tpl_donate_vehicle_email"})})
