$(document).ready(function(){}),function(a){function s(){this.prefix=a.location.protocol,$("").attr({rel:"stylesheet",type:"text/css",href:a.location.protocol+"//csdnimg.cn/jobreco/job_reco.css"}).appendTo("head"),this.blogTpl='
',this.bbsItem='
',this.askTpl='
',this.askItem='
',this.perSpaceHomeTpl='
',this.perSpaceHomeItem='
',this.perSpaceMyTpl='
',this.perSpaceMyItem='
',this.heroHomeTpl='
',this.heroHomeItem='
',this.heroExpertTpl='
',this.heroExpertItem='
- {2}
- {7}
- {5}
我要跳槽
',this.heroFightDetailTpl='
',this.heroFightDetailItem='
',this.heroMyTpl='
',this.heroMyItem='
',this.heroFightDetailTpl=this.heroMyTpl,this.heroFightDetailItem=this.heroMyItem,this.eduDetailTpl='
',this.eduDetailItem='
',this.eduListTpl=this.eduDetailTpl,this.eduListItem=this.eduDetailItem,this.search_reco_edu='
',this.search_reco_edu_item='
',this.blog_reco_edu="
{0}
",this.blog_reco_edu_item='
{2}',this.down_reco_edu='
',this.down_reco_edu_item='
',this.edu_detail_url_base="http://edu.csdn.net/course/detail/",this.searchTpl='
',this.searchItem='
',this.downMyTpl='
',this.downMyItem='
',this.downDetailTpl='
',this.downDetailItem='
',this.cstoCaseListTpl='
',this.cstoCaseListItem='
',this.cstoCaseDetailTpl='
',this.cstoCaseDetailItem='
',this.cstoMyTpl='',this.cstoMyItem='
',this.cstoProjectListTpl="",this.cstoProjectListItem="",this.cstoProjectDetailTpl='
',this.cstoProjectDetailItem='
',this.getCount=300}var e=a.csdn||{};s.prototype={show:function(a){var s=a,e=this;e.show_inner(s)},showEdu:function(a){var s=a,e=this;e.show_edu_mlgb(s)},show_edu_mlgb:function(s){this.sourceType=s.sourceType,this.searchType=s.searchType,this.searchKey=s.searchKey,this.username=s.username?s.username:"",this.recordcount=s.recordcount,this.containerId=s.containerId,this.$container=$("#"+this.containerId),this.prefix=a.location.protocol,this.load_edu_reco()},load_edu_reco:function(){var s="",e="",t="";_data={};var l=this.searchKey.replace(/%/g,"%25").replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B"),i="http://internalapi.csdn.net/psearch/psearch/query?x-acl-token=kUOm7x6dCaKGFa8RxxLQ5Hm75ioK&index_name=pro_course_v2";if("so"==this.sourceType?(s=this.search_reco_edu,e=this.search_reco_edu_item,t=i+"&search_str="+l,_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",user_id:this.username,size:this.recordcount},""==this.username&&(_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",size:this.recordcount})):"blog"==this.sourceType?(s=this.blog_reco_edu,e=this.blog_reco_edu_item,t=i+"&pro_id="+l,_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",pro_type:"blog",user_id:this.username,size:this.recordcount},""==this.username&&(_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",pro_type:"blog",size:this.recordcount})):"down"==this.sourceType&&(s=this.down_reco_edu,e=this.down_reco_edu_item,t=i+"&pro_id="+l,_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",pro_type:"download",user_id:this.username,size:this.recordcount},""==this.username&&(_data={_client_:"rcommend_course",fields:"id,title,pic,stu_count,good_ratio,rc_flag,source_type",pro_type:"download",size:this.recordcount})),""!=s){var _=this;$.ajax({type:"get",url:t,data:_data,dataType:"jsonp",jsonp:"callback",async:!1,success:function(t){if(t.hits&&t.hits.length>0){for(var l="",i=0;i<_.recordcount;i++){var o=t.hits[i].object,p="";if("so"==_.sourceType){var r=o.stu_count?o.stu_count:0,n=_.edu_detail_url_base+o.id+"?ref=srch&loc=0";p=e.replace(/\{0\}/,n).replace(/\{1\}/,o.pic).replace(/\{2\}/,n).replace(/\{3\}/,o.title).replace(/\{4\}/,o.title).replace(/\{5\}/,0==o.good_ratio?100:o.good_ratio).replace(/\{6\}/,r).replace(/\{7\}/,o.rc_flag).replace(/\{8\}/,o.rc_flag).replace(/\{9\}/,n).replace(/\{10\}/,n)}else"blog"!=_.sourceType&&"down"!=_.sourceType||(p=e.replace(/\{0\}/,_.edu_detail_url_base+o.id).replace(/\{1\}/,o.title).replace(/\{2\}/,o.title).replace(/\{3\}/,o.rc_flag));l+=p}var c=s.replace(/\{0\}/,l),d=$(c).appendTo(_.$container),b=[];b.push(d[0]);try{a.trackingAd($(b))}catch(h){}}},error:function(a){}}),$(function(){var a=0,s=setInterval(function(){a++,a>_.getCount&&clearInterval(s),$("#res").hide();var e=$("#res").children();if(e.length>5){for(var t=0;t
4&&$(l).remove()}$("#res").show()}},200)})}},show_inner:function(s){this.sourceType=s.sourceType,this.tplType=s.tplType,this.searchType=s.searchType,this.searchKey=s.searchKey,this.username=s.username,this.containerId=s.containerId,this.$container=$("#"+this.containerId),this.prefix=a.location.protocol,this.load()},goInPage:function(s,e,t,l){var i=l+"//job.csdn.net",_=s.replace(/\{0\}/,"popu_72").replace(/\{1\}/,i).replace(/\{2\}/,totalHtmlItems);t.html("");var o=$(_).appendTo(t),p=[];p.push(o[0]);try{a.trackingAd($(p))}catch(r){}return!0},totalHtmlItems:"",load:function(){var a=this;if("NO"!==a.searchKey||""!==a.username){var s=a.get_url(a.username,a.searchType,a.searchKey,a.sourceType,a.tplType),e=a.get_strategy(a.username,a.searchType),t=a.get_containerTpl(a.tplType),l=a.get_itemTpl(a.tplType);$.ajax({type:"get",url:s,dataType:"jsonp",jsonp:"callback",async:!1,success:function(s){totalHtmlItems="";var i="",_=s.hits.length;if(s.hits&&s.hits.length>0&&(totalHtmlItems=a.getData(a.$container,s.hits,t,l,a.prefix,e,!0)),_<4&&a.username&&"detail"==a.searchType){var o=a.get_strategy("","detail");a.loadByDetail(t,l,o,_,a.$container,a.prefix)}else if(_<4){var p=a.get_strategy("","latest");i=a.loadByLatest(t,l,p,_,a.$container,a.prefix)}_>=4&&a.goInPage(t,l,a.$container,a.prefix)},error:function(a){}})}},loadByDetail:function(a,s,e,t,l,i){var _=this,o=_.get_url("",_.searchType,_.searchKey,_.sourceType,_.tplType,4-t);$.ajax({type:"get",url:o,dataType:"jsonp",jsonp:"callback",async:!1,success:function(o){var p=o.hits.length;if(o.hits&&o.hits.length>0&&(totalHtmlItems+=_.getData(l,o.hits,a,s,i,e,!1)),p+t<4){_.get_strategy("","latest");_.loadByLatest(a,s,e,p+t,l,i)}p+t>=4&&_.goInPage(a,s,l,i)},error:function(a){}})},loadByLatest:function(a,s,e,t,l,i){var _=this,o="http://job.csdn.net/api/lastJobList",p=i+"//job.csdn.net/Job/Index?jobID=",r=i+"//pr.csdn.net/enterprise/ent_home?orgid=";$.ajax({type:"get",url:o,dataType:"jsonp",jsonp:"callback",async:!1,success:function(o){if(o.Data&&o.Data.paperList&&o.Data.paperList.length>0&&o.Data.paperList.length>=4-t){for(var n="",c=0;c<4-t;c++){var d=o.Data.paperList[c];if(d.JobID&&d.JobName&&d.OrgID&&d.OrgName&&d.SalaryMax&&d.SalaryMin){var b="";if(0==d.SalaryMax&&0==d.SalaryMin)b="面议";else{var h=d.SalaryMin/1e3,v=d.SalaryMax/1e3;b=h+"-"+v+"K/月"}var m=s.replace(/\{0\}/,p+d.JobID).replace(/\{1\}/,d.JobName).replace(/\{2\}/,d.JobName).replace(/\{3\}/,r+d.OrgID).replace(/\{4\}/,d.OrgName).replace(/\{5\}/,d.OrgName).replace(/\{6\}/,p+d.JobID).replace(/\{7\}/,b).replace(/\{8\}/,e).replace(/\{9\}/,p+d.JobID);n+=m}}totalHtmlItems+=n}return _.goInPage(a,s,l,i),""},error:function(a){}})},getData:function(a,s,e,t,l,i,_){for(var o=l+"//job.csdn.net/Job/Index?jobID=",p=l+"//pr.csdn.net/enterprise/ent_home?orgid=",r="",n=0;n").attr({rel:"stylesheet",type:"text/css",href:e.position.prefix+"//c.csdnimg.cn/jobreco/job_reco.css"}).appendTo("head")},getUserName:function(){return this.getCookie("UserName")},getCookie:function(a){for(var s=document.cookie.split("; "),e=0;e