function personal_hunter_check()
{
	var key=$('#key').val();
	if (key)
	{
		key_arr=key.split(" ");
		for (x in key_arr)
		{
		if (key_arr[x]) $('.striking').highlight(key_arr[x]);
		}
	}
	$(".list:odd").css("background-color","#F4F5FB");
	$(".titsub").hover(	function()	{$(this).addClass("titsub_h");},function(){$(this).removeClass("titsub_h");});
	function setlistbg()
	{
			$(".li_left_check input[type='checkbox']").each(function(i){
				if ($(this).attr("checked"))
				{
					$(this).parent().parent().addClass("seclect");
				}
				else
				{
					$(this).parent().parent().removeClass("seclect");
				}
			}); 
	 }
	//提醒
	$(function(){
	var _wrap=$('#jobs_list_tip ul');
	var _interval=3000;
	var _moving;
	_wrap.hover(function(){
	clearInterval(_moving);
	},function(){
	_moving=setInterval(function(){
	var _field=_wrap.find('li:first');
	var _h=_field.height();
	_field.animate({marginTop:-_h+'px'},300,function(){
	_field.css('marginTop',0).appendTo(_wrap);
	})
	},_interval)
	}).trigger('mouseleave');
	});
	
	// 全选反选
	var che_tbody = $('#hunter_result_list :checkbox');
	if(che_tbody.length < 1){
		return false;
	}
	$('.hunter_bottom_but_group :checkbox').CheckboxRelated(che_tbody);
	setTimeout(function(){$('.table :checkbox').CheckboxUI("refresh");},400);
} 
 //个人投递猎头
function personal_hunter(ajaxurl)
{
	$(".entrust_all").click(function()
	{ 
			var sltlength=$("#hunter_result_list input:checked").length;
			if (sltlength==0)
			{
			$.dialog.alert("请选择猎头！");
			}
			else
			{
				var jidArr=new Array();
				 $("#hunter_result_list :checkbox[checked]").each(function(index){jidArr[index]=$(this).val();});
				dialog("委托猎头","url:"+ajaxurl+"user/user_entrust_hunter.php?id="+jidArr.join("-")+"&act=app","500px","auto","");
			}
	});
	//单个投递猎头
	$(".add_entrust").unbind().click(function(){
		dialog("委托猎头","url:"+ajaxurl+"user/user_entrust_hunter.php?id="+$(this).attr("id")+"&act=app","500px","auto","");
	});
	// 全选反选
	var che_tbody = $('#hunter_result_list :checkbox');
	if(che_tbody.length < 1){
		return false;
	}
	$('.bottom_item_left :checkbox').CheckboxRelated(che_tbody);
	setTimeout(function(){$('.table :checkbox').CheckboxUI("refresh");},400);
}
//个人取消委托
function personal_hunter_cancel(ajaxurl)
{
	$(".entrust_all").click(function()
	{ 
			var sltlength=$("#hunter_result_list input:checked").length;
			if (sltlength==0)
			{
				$.dialog.alert("请选择猎头！");
			}
			else
			{
				var jidArr=new Array();
				 $("#hunter_result_list :checkbox[checked]").each(function(index){jidArr[index]=$(this).val();});
				dialog("委托猎头","url:"+ajaxurl+"user/user_entrust_hunter.php?id="+jidArr.join("-")+"&act=app_del","500px","auto","");
			}
	});
}


 //企业投递猎头
function company_hunter(ajaxurl)
{
	$(".entrust_all").click(function()
	{ 
			var sltlength=$("#hunter_result_list input:checked").length;
			if (sltlength==0)
			{ 
			$.dialog.alert("请选择猎头！");
			}
			else
			{ 
				var jidArr=new Array();
				 $("#hunter_result_list :checkbox[checked]").each(function(index){jidArr[index]=$(this).val();});
				dialog("委托猎头","url:"+ajaxurl+"user/user_entrust_hunter.php?id="+jidArr.join("-")+"&act=app","500px","auto","");
			}
	});
	 
	//单个投递猎头
	$(".add_entrust").unbind().click(function(){
		dialog("委托猎头","url:"+ajaxurl+"user/user_entrust_hunter.php?id="+$(this).attr("id")+"&act=app","500px","auto","");
	});
	
	// 全选反选
	var che_tbody = $('#hunter_result_list :checkbox');
	if(che_tbody.length < 1){
		return false;
	}
	$('.bottom_item_left :checkbox').CheckboxRelated(che_tbody);
	setTimeout(function(){$('.table :checkbox').CheckboxUI("refresh");},400);
}
