$(".newtools_cdkulbtn").live('click',function(e) {
	var data1 = $(this).attr("data");
	var dataurl=$(this).attr("dataurl");
	var title = $(this).parent().find(".newtools_cdkultitle_t").html();
    $.post("https://www.daohangtx.com/tools/detail/cdk/js/get.php","id="+data1, function(data) {	
		if(data.indexOf('card_number')!=-1){
			var json=eval("("+data+")");
			$(".newtoolsts_true h3").html(title+'，领取成功！');
			if(json['cardInfo']['card_number']!=''&&json['cardInfo']['card_pwd']!==''){
				rightkai(
					'卡号：'+json['cardInfo']['card_number']+'<br >'+
					'卡密：'+json['cardInfo']['card_pwd']+'<br >'+
					'兑换地址：<a class="duihuandizhi" href="'+dataurl+'" target="_blank">请点击此处打开兑换地址！</a>'
				);
			}else if(json['cardInfo']['card_number']!=''&&json['cardInfo']['card_pwd']==''){
				rightkai(
					'卡号：'+json['cardInfo']['card_number']+'<br >'+
					'卡密：无需卡密即可兑换<br >'+
					'兑换地址：<a class="duihuandizhi" href="'+dataurl+'" target="_blank">请点击此处打开兑换地址！</a>'
				);
			}else if(json['cardInfo']['card_number']==''&&json['cardInfo']['card_pwd']!=''){
				rightkai(
					'卡号：无需卡号即可兑换<br >'+
					'卡密：'+json['cardInfo']['card_pwd']+'<br >'+
					'兑换地址：<a class="duihuandizhi" href="'+dataurl+'" target="_blank">请点击此处打开兑换地址！</a>'
				);
			}
	　　}else{
			if(data.indexOf('{')!=-1){
				var json=eval("("+data+")");
				errorkai(json['errorMsg']+'请稍后尝试，或者联系QQ技术导航客服检查修复！');
			}else{
				errorkai('领取失败,'+data+'请稍后尝试，或者联系邮箱guojiwangluo@qq.com进行检查修复！');	
			}
		}
	});
});




//错误方法开启与关闭newtoolsts_false
function errorkai(e){
	$(".newzuiwaiceng").css("display","block");
	$(".newtoolsts_false").addClass("add_animation").css("display","block");
	$(".newtoolsts_false p").html(e);
}
$(".newtoolsts_false a").live('click',function(e) {
    $(".newzuiwaiceng").css("display","none");
	$(".newtoolsts_false").removeClass("add_animation").css("display","none");
	$(".newtoolsts_false p").html('');
});

//正确方法开启与关闭newtoolsts_true
function rightkai(e){
	$(".newzuiwaiceng").css("display","block");
	$(".newtoolsts_true").addClass("add_animation").css("display","block");
	$(".newtoolsts_true p").html(e);
}
$(".newtoolsts_true .close").live('click',function(e) {
    $(".newzuiwaiceng").css("display","none");
	$(".newtoolsts_true").removeClass("add_animation").css("display","none");
	$(".newtoolsts_true p").html('');
});


