jQuery(document).ready((function(){""==jQuery.datepicker._defaults.dateFormat&&(jQuery.datepicker._defaults.dateFormat="MM d, yy");var e={altFormat:"yy-mm-dd",minDate:new Date};"undefined"!=typeof job_manager_datepicker&&(e.dateFormat=job_manager_datepicker.date_format);var a=function(a){var t=jQuery(a),r=jQuery("",{type:"hidden",name:t.attr("name")}).insertAfter(t);if(t.attr("name",t.attr("name")+"-datepicker"),t.on("keyup",(function(){""===t.val()&&r.val("")})),t.datepicker(jQuery.extend({},e,{altField:r})),t.val()){var n=t.val().split("-");if(3===n.length){var d=new Date(parseInt(n[0],10),parseInt(n[1],10)-1,parseInt(n[2],10));t.datepicker("setDate",d)}}};jQuery("input.job-manager-datepicker, input#_job_expires").each((function(){a(this)})),jQuery(document).on("wpJobManagerFieldAdded",(function(e){a(e.target)}))}));