function add_favorite(id,type,is_on){
     $.get(APP+"Home/Integral/favorite", { id: id,type:type,is_on:is_on}, function(data){
         if(data.status==0) {
                $.openUrl(data.url, data.msg, 'ID', '800', function () {
                    return false;
                }, function () {
                    return false;
                });
            }else if(data.status == 2){
             $("#words").text('加入收藏');
             if(!data.is_on){
                $("#collect").removeClass("on");
             }
             $.showSuccess(data.msg,0,'hc');
         }else if(data.status == 3){
             $.showErr(data.msg,0,'hc');
         }else{
             $("#words").text('取消收藏');
             if(data.is_on==1){
                $("#collect").addClass("on");
            }
             $.showSuccess(data.msg,0,'hc');
         }
    }); 
}
function collect_shop(id){
     $.get(APP+"Home/Shop/collect", { id: id}, function(data){
         if(data.status==0) {
			$.openUrl(data.url, data.msg, 'ID', '800', function () {
				return false;
			}, function () {
				return false;
			});
		 }else if(data.status == 2){
             $("#shop_collect_words").text('加入收藏');
             $.showSuccess(data.msg,0,'hc');
         }else if(data.status == 3){
             $.showErr(data.msg,0,'hc');
         }else{
             $("#shop_collect_words").text('取消收藏');
             $.showSuccess(data.msg,0,'hc');
         }
    }); 
}