/**
 * 分享
 */
function btmPopupshare(){
    $('#popup-mian-share').next().fadeIn();
    $('#popup-mian-share').animate({"bottom": 0});		
}
/**
* 收藏团购
*/
function collect_goods(type,goods_id,location_id){
    var query = new Object;
    query.type=type;
    query.goods_id=goods_id;
    query.location_id=location_id;
    //return false;
    $.ajax({
    type:"get",
    url:APP+"Mobile/Groupbuying/collect",
    data:query,
    success:function(data){
        if(data.status==0) {
            $.showErr(data.msg,1,'hc');
            window.location.href=APP+"Mobile/Login/index";
        }else if(data.status == 1){
            $("#favorite").html('&#xe6c9;');
        }else if(data.status == 2){
            $("#favorite").html('&#xe606;');
        }else if(data.status == 3){
            $.showErr(data.msg,0,'hc');
        }
    }
    });
}
/**
 * 收藏门店
 */
function collect_shop(id,type){
	var query = new Object;
	query.id=id;
	query.type=type;
	$.ajax({
		type:"get",
		url:APP+"Mobile/Shop/collect",
		data:query,
		success:function(data){
			if(data.status==0) {
				$.showErr(data.msg,1,'hc');
				window.location.href=APP+"Mobile/Login/index";
			}else if(data.status == 1){
				$("#favorite").html('&#xe6c9;');
				$.showSuccess(data.msg,1,'hc');
			}else if(data.status == 2){
				$("#favorite").html('&#xe606;');
				$.showSuccess(data.msg,1,'hc');
			}else if(data.status == 3){
				$.showErr(data.msg,0,'hc');
			}
		}
	}); 
}
//评论
$(function(){
	$(".wm-shop-pl-title a").each(function(){
		$(this).bind('click',function(){
			$(this).addClass('on').siblings().removeClass('on');
			$("#guessList").html('');
			querydata['point']=$(this).index();
			querydata['page']=1;
			get_goods_list();
		});
	});
});