/** PTNovelSearch-v4.1.2 LPPL License By http://www.ptcms.com/ */
 ;var loading=null;$(".btn-mark").on("click",function(){var a,e=this;a="加入收藏"==$(e).text()?__ADD_MARK:__DEL_MARK,$.ajax(a,{type:"post",dataType:"json",data:{novelid:$(e).data("novel-id")},beforeSend:function(){null==loading&&(loading=layer.load(1,{shade:[.1,"#000"]}))},complete:function(){null!=loading&&(layer.close(loading),loading=null)},success:function(a){a.code?layer.alert(a.msg,{icon:2},function(e){a.data.redirect?window.location.href=a.data.redirect:layer.close(e)}):(layer.msg("操作成功!"),"加入收藏"==$(e).text()?$(e).text("取消收藏"):$(e).text("加入收藏"))},error:function(){layer.alert("收藏失败，请刷新页面后重试！",{icon:2})}})});