var zipsearch_widget=function(e){var t=function(e){var t=document.getElementById(e);return t||{value:"",style:{}}},o=function(e){return document.querySelectorAll?document.querySelectorAll("."+e):s("."+e)},s=function(e){var t=document,o=t.documentElement.firstChild,s=t.createElement("STYLE");return o.appendChild(s),t.__qsaels=[],s.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}",window.scrollBy(0,0),t.__qsaels},a=function(e){el=t(e);var o=el.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,a=window.innerWidth||document.documentElement.clientWidth,n=o.top<=s&&o.top+o.height>=0,i=o.left<=a&&o.left+o.width>=0;return n&&i},n={};return n.log=function(e){},n.ready=function(e){document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&e()})},n.getAttribute=function(e,t){return e.getAttribute?e.getAttribute(t):(e.attributes&&e.attributes[t].nodeValue,null)},n.get=function(t){var o="jsonp"+Math.round(1000001*Math.random());t.data.api_key=e.api_key,t.data.callback=o,window[o]=function(e){t.success(e)};var s=new Array;for(var a in t.data)s.push(a+"="+encodeURIComponent(t.data[a]));t.url+="?"+s.join("&");var n=document.createElement("script");n.setAttribute("src",t.url),document.getElementsByTagName("head")[0].appendChild(n)},n.log_event=function(t,o){n.get({url:e.log_event_url,success:function(){},data:{event_type:t,properties:JSON.stringify({user_action:o,widget_type:e.widget_type,widget_event_log_id:e.widget_event_log_id})}})},n.on=function(e,t,o){for(i in e){var s=e[i];s.addEventListener?s.addEventListener(t,o):s.attachEvent&&s.attachEvent("on"+t,function(e){o.call(e.srcElement,e)})}},n.cookie=function(e,t,o){if(t){var s="";if(o){var a=new Date;s="expires="+new Date(a.getTime()+24*o*60*60*1e3).toUTCString()+"; "}document.cookie=e+"="+encodeURIComponent(t)+"; "+s+"path=/"}else if(document.cookie.length>0){var n=document.cookie.indexOf(e+"=");if(-1!=n)return n=n+e.length+1,end=document.cookie.indexOf(";",n),-1==end&&(end=document.cookie.length),decodeURIComponent(document.cookie.substring(n,end))}},n.search_keyup=function(e){e&&13===e.keyCode&&(e.preventDefault?e.preventDefault():e.returnValue=!1,n.search())},n.search_box_keyup=function(e){e&&13===e.keyCode&&(e.preventDefault?e.preventDefault():e.returnValue=!1,n.search_box())},n.modal_keyup=function(e){e&&27===e.keyCode&&"none"!=t("zs_modal").style.display&&(t("zs_modal").style.display="none",n.log_event("zipsearch_widget_alert","escape"))},n.urlParam=function(e){var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href);return!!t&&decodeURIComponent(t[1])},n.search=function(o){n.log("Start search..."),n.resetOptions();var s=1;o&&(o.preventDefault?o.preventDefault():o.returnValue=!1,s=0),n.options.save_state&&(n.log("Saving state"),n.cookie("zs_search",n.options.search),n.cookie("zs_location",n.options.location),n.cookie("zs_radius_miles",n.options.radius_miles),n.cookie("zs_days_ago",n.options.days_ago||" "));var i=n.getAttribute(this,"data-page");i||(i=1),t("zs_results").style.display="none",t("zr_attributed").style.display="none",t("zs_modal").style.display="none",t("ajax_loader").style.display="",n.get({url:e.api_url,data:{search:n.options.search||"",location:n.options.location||"",radius_miles:n.options.radius_miles||"",days_ago:"anytime"==n.options.days_ago?"":n.options.days_ago||"",jobs_per_page:n.options.jobs_per_page||"",page:i,format:e.widget_type,widget_version:e.widget_version||"",widget_event_log_id:e.widget_event_log_id||"",non_interaction:s,alerts_api_key:n.options.alerts_api_key},success:function(e){n.log("zr jobs widget - ajax req success"),n.display(e),i>1&&!a("zs_results")&&t("zs_results").scrollIntoView()},error:function(e,t){"object"==typeof t&&(t="error message: "+t.message),n.log("zr jobs widget error: "+e+", "+t)}})},n.search_box=function(e){if(n.log("Start search..."),n.resetOptions(),e&&(e.preventDefault?e.preventDefault():e.returnValue=!1),n.log_event("zipsearch_widget_click","search_box"),n.options.save_state){var t=n.options.save_state.constructor!==Array;n.log("Saving state"),n.options.days_ago=n.options.days_ago||" ";for(var o=0;o-1)&&n.cookie("zs_"+n.search_param_names[o],n.options[n.search_param_names[o]])}n.goto_search_url()},n.goto_search_url=function(){var t="";if(n.options.search_url){if(t=n.options.search_url,n.options.use_url_params){for(var o="",s=n.options.use_url_params.constructor!==Array,a=0;a-1)&&void 0!==n.options[n.search_param_names[a]]&&(o+=n.search_param_names[a]+"="+encodeURIComponent(n.options[n.search_param_names[a]])+"&");(o=o.slice(0,-1))&&(t+=(t.indexOf("?")>-1?"&":"?")+o)}}else t="https://www.ziprecruiter.com/candidate/search",t+="?mid="+e.mid,t+="&search="+encodeURIComponent(n.options.search),t+="&location="+encodeURIComponent(n.options.location);window.location.href=t},n.see_more=function(e){e&&(e.preventDefault?e.preventDefault():e.returnValue=!1),n.goto_search_url()},n.display=function(s){t("zs_no_jobs").style.display="none",t("zs_results").innerHTML=s.html,0==s.total_jobs&&(t("zs_no_jobs").style.display=""),n.applyCustomStyles(),t("zr_mini").style.display="",t("ajax_loader").style.display="none",t("zs_results").style.display="",t("zr_attributed").style.display="",n.on(o("_zr_pager"),"click",n.search),n.options.alerts_api_key.length&&"mini"!=e.widget_type.substr(0,4)&&n.on(o("zr_job_link"),"click",n.showAlertModal)},n.resetOptions=function(){n.options={};for(var o in n.options_original)n.options[o]=n.options_original[o];var s={search:n.options.search_id?n.options.search_id:"zs_search",location:n.options.location_id?n.options.location_id:"zs_location",radius_miles:n.options.radius_id?n.options.radius_id:"zs_radius",days_ago:"zs_days"};for(var o in s){var a=t(s[o]).value;""!==a&&(n.options[o]=a||n.options_original[o]||"")}var i=void 0===n.options.save_state||n.options.save_state,r={container:"zipsearch_container",jobs_per_page:5,alerts_api_key:"",search:i?e.global_search||"":"",location:i?e.global_location||e.default_location:e.default_location,search_id:"zs_search",location_id:"zs_location",radius_id:"zs_radius",submit_id:"zs_submit",alert_skip_clicks:2,save_state:1};for(var o in r)void 0===n.options[o]&&(n.options[o]=n.options_original[o]),void 0===n.options[o]&&(n.options[o]=r[o])},n.applyCustomStyles=function(){var e={width:{class:"zr_widget",prop:"width"},font_family:{id:"zr_widget",prop:"fontFamily"},font_size_title:{class:"zr_job_link",prop:"fontSize"},font_size_description:{class:"zr_job_desc",prop:"fontSize"},color_title:{class:"zr_job_link",prop:"color"},color_description:{class:"zr_job_desc",prop:"color"},color_background:{id:"zr_widget_container",prop:"backgroundColor"}};for(var s in e)if(n.options[s])for(var a=e[s],i=a.id?[t(a.id)]:o(a.class),r=0;r0||parseInt(o)>=n.options.alert_skip_clicks||(e&&(e.preventDefault?e.preventDefault():e.returnValue=!1),t("zs_job_type").innerHTML=n.options.search,t("zs_location_type").innerHTML=n.options.location,t("zs_continue_link").href=this.href,t("zs_create_alert").href=this.href,t("zs_modal").style.display="",n.log_event("zipsearch_widget_alert","show"))},n.continueAlertModal=function(e){var o=n.cookie("shown_modal")||0;n.cookie("shown_modal",parseInt(o)+1,1),t("zs_modal").style.display="none",n.log_event("zipsearch_widget_alert","skip")},n.createAlert=function(o){if(n.log("Start alertCreate..."),n.resetOptions(),!t("zs_email_address").value.length)return alert("Please enter a valid email address"),o.preventDefault?o.preventDefault():o.returnValue=!1,!1;n.get({url:e.create_alert_url,data:{email_address:t("zs_email_address").value,search:n.options.search,location:n.options.location,radius_miles:n.options.radius_miles,alerts_api_key:n.options.alerts_api_key,widget_event_log_id:e.widget_event_log_id},success:function(e){n.log("zr alert create - ajax req success"),t("zs_modal").style.display="none",n.cookie("shown_modal_"+n.options.search,1,1)}})},n.setSelect=function(e,t){var o=e.options;if(o)for(var s=0;s-1)&&(r[n.search_param_names[_]]=n.cookie("zs_"+n.search_param_names[_]));n.options.search=n.urlParam("search")||r.search||n.options.search,n.options.location=n.urlParam("location")||r.location||n.options.location,n.options.radius_miles=n.urlParam("radius_miles")||r.radius_miles||s.radius_miles||n.options.radius_miles,n.options.days_ago=n.urlParam("days_ago")||r.days_ago||s.days_ago||n.options.days_ago,t(n.options.search_id).value=n.options.search,t(n.options.location_id).value=n.options.location,"search-box"==e.widget_type?(n.on([t("zs_submit_box")],"click",n.search_box),n.on([t("zs_search")],"keyup",n.search_box_keyup),n.on([t("zs_location")],"keyup",n.search_box_keyup)):"reseller-candidate"==e.widget_type?(n.on([t("zs_submit_box")],"click",n.search_box),n.on([t("zs_search")],"keyup",n.search_box_keyup),n.on([t("zs_location")],"keyup",n.search_box_keyup),n.on([t("zs_post_and_print_button")],"click",function(){n.log_event("zipsearch_widget_click","reseller_print"),window.location.href=n.options.reseller_print_url}),n.on([t("zs_post_only_button")],"click",function(){n.log_event("zipsearch_widget_click","reseller_post"),window.location.href=n.options.reseller_post_url})):(n.options.alerts_api_key.length&&"mini"!=e.widget_type.substr(0,4)&&(n.on([window],"keyup",n.modal_keyup),n.on([t("zs_modal_backdrop")],"click",function(){t("zs_modal").style.display="none",n.log_event("zipsearch_widget_alert","clickback")})),n.setSelect(t(n.options.radius_id),n.options.radius_miles),n.setSelect(t("zs_days"),n.options.days_ago),n.on([t(n.options.submit_id)],"click",n.search),n.on([t("zs_radius")],"change",n.search),n.on([t("zs_days")],"change",n.search),n.on([t(n.options.search_id)],"keypress",n.search_keyup),n.on([t(n.options.location_id)],"keypress",n.search_keyup),n.on([t("zs_create_alert")],"click",n.createAlert),n.on([t("zs_continue_link")],"click",n.continueAlertModal),n.on(o("zs_search_alt"),"click",function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,t(n.options.search_id).value=n.getAttribute(this,"data-title")||"Sales",n.search()}),n.on([t("zs_more_button")],"click",n.see_more),n.search()),n.options.header_text&&(t("zs_header").textContent=n.options.header_text)}else n.log("You must specify 'container' in the options",s.container)},{init:n.init_params}}; zipsearch = zipsearch_widget({"log_event_url":"https://api.ziprecruiter.com/jobs/v1/event","widget_version":"v1","widget_html":"","api_key":"vdrp58zwedffwfa9gf87sr3sedykdkfx","widget_style":"","init_url":"https://api.ziprecruiter.com/jobs/v1/widget_init","widget_type":"mini","api_url":"https://api.ziprecruiter.com/jobs/v1","mid":"c1852d89","create_alert_url":"https://api.ziprecruiter.com/jobs/v1/alert"});