
jQuery(function(){jQuery("#BCKeyword").focus(function(){jQuery("#BCsearchKeywordTipsText").hide();});jQuery("#BCKeyword").blur(function(){if(jQuery(this).val()==""){jQuery("#BCsearchKeywordTipsText").show();}});if(jQuery("#BCKeyword").val()==""){jQuery("#BCsearchKeywordTipsText").show();}else{jQuery("#BCsearchKeywordTipsText").hide();}
jQuery(".searchspan").click(function(){jQuery(this).children("span").hide().end().children("input").focus();});var hrefURL=$("#hrefURL").val();var BCAreaTips=$("#BCAreaTips").val();$("#BCsearchType li").click(function(){$(this).addClass("cur").siblings().removeClass("cur");var BCsearchTypeID=$(this).attr("id");if(BCsearchTypeID=="BCjob"){jQuery("#BCsearchKeywordTipsText").show();jQuery("#BCsearchSubmit").attr("value","搜索工作");jQuery("#BCsearchAreaTipsText").show();jQuery("#BCKeyword").attr("name","BCKeyword");jQuery("#BCArea").attr("name","BCArea");jQuery("#BCsearchForm").attr("action",hrefURL+"search/jobs");jQuery("#BCSearchHelp").attr("href","http://about.baicai.com/help/job-search.php");}else if(BCsearchTypeID=="BCperson"){jQuery("#BCsearchKeywordTipsText").hide();jQuery("#BCKeyword").attr("name","BCKeyword");jQuery("#BCArea").attr("name","BCArea");jQuery("#BCsearchSubmit").attr("value","搜索人才");jQuery("#BCsearchAreaTipsText").hide();jQuery("#BCArea").val(BCAreaTips);jQuery("#BCsearchForm").attr("action",hrefURL+"search/resume");jQuery("#BCSearchHelp").attr("href","http://about.baicai.com/help/resume-search.php");}else{jQuery("#BCsearchKeywordTipsText").hide();var jobKw1=jQuery("#BCKeyword").val();var cityKw1=jQuery("#BCArea").val();jQuery("#BCKeyword").attr("name","jobKw1");jQuery("#BCArea").attr("name","cityKw1");jQuery("#BCsearchAreaTipsText").hide();jQuery("#BCArea").val(BCAreaTips);jQuery("#BCsearchSubmit").attr("value","查询工资");jQuery("#BCsearchForm").attr("action",hrefURL+"salary/?jobKw1="+jobKw1+"&cityKw1="+cityKw1);}});var NavigationPathname=window.location.pathname;switch(NavigationPathname){case"/job/":$("#BCsearchType li").removeClass("cur");$("#BCjob").addClass("cur");$("#BCsearchSubmit").attr("value","搜索工作");;$("#BCsearchForm").attr("action",hrefURL+"search/jobs");$("#BCSearchHelp").attr("href","http://about.baicai.com/help/job-search.php");break;case"/search/resume":$("#BCsearchType li").removeClass("cur");$("#BCperson").addClass("cur");$("#BCsearchSubmit").attr("value","搜索人才");;$("#BCsearchForm").attr("action",hrefURL+"search/resume");$("#BCSearchHelp").attr("href","http://about.baicai.com/help/resume-search.php");break;case"/salary/":var jobKw1=jQuery("#BCKeyword").val();var cityKw1=jQuery("#BCArea").val();jQuery("#BCsearchKeywordTipsText").hide();$("#BCsearchType li").removeClass("cur");$("#BCsalary").addClass("cur");$("#BCKeyword").attr("name","jobKw1");$("#BCArea").attr("name","cityKw1");$("#BCsearchSubmit").attr("value","查询工资");$("#BCsearchForm").attr("action",hrefURL+"salary/?jobKw1="+jobKw1+"&cityKw1="+cityKw1);break;};});function BCSearchPositionFormSubmit(form){var hrefURL=$("#hrefURL").val();var BCKeyword=jQuery("#BCKeyword").val();var BCArea=jQuery("#BCArea").val();if(form.BCKeyword.value=='请输入职位或公司名称'){BCKeyword='';}
if(form.BCKeyword.value!=""){BCKeyword=encodeURI(BCKeyword);};if(form.BCArea.value!=''){BCArea=encodeURI(BCArea)}
if(jQuery("#BCsearchSubmit").attr("value")=="搜索工作"){var url=hrefURL+"search/jobs?BCKeyword="+BCKeyword+"&BCArea="+BCArea;}else if(jQuery("#BCsearchSubmit").attr("value")=="搜索人才"){var url=hrefURL+"search/resume?BCKeyword="+BCKeyword+"&BCArea="+BCArea;}else{var url=hrefURL+"salary/?jobKw1="+BCKeyword+"&cityKw1="+BCArea;}
document.location.href=url;return false;};

