<!--


//详情页图片预览
$(document).ready(function(){
	//var showspool=$("#spool")[0].value;
	//$("#tempdetailpic")[0].src=PDV_RP+"webmall/temppic/"+showspool+".jpg";
	
});


//切换介绍和参数
$(document).ready(function(){
	$("#switch_body").click(function(){
		$("#switch_body")[0].className="TasADSOn";
		$("#switch_canshu")[0].className="";
		$("#switch_comment")[0].className="";
		$("#bodyzone").show();
		$("#servicezone").hide();
		$("#commentzone").hide();
		$().setBg();
	});
	$("#switch_canshu").click(function(){
		$("#switch_body")[0].className="";
		$("#switch_canshu")[0].className="TasADSOn";
		$("#switch_comment")[0].className="";
		$("#bodyzone").hide();
		$("#servicezone").show();
		$("#commentzone").hide();
		$().setBg();
	});
	$("#switch_comment").click(function(){
		$("#switch_body")[0].className="";
		$("#switch_canshu")[0].className="";
		$("#switch_comment")[0].className="TasADSOn";
		$("#bodyzone").hide();
		$("#servicezone").hide();
		$("#commentall").appendTo("#commentzone").show();
		$("#commentzone").show();
		

		$().setBg();
	});
});



//支持反对投票
$(document).ready(function(){

		$("span#zhichi").click(function(){
		
		var spoolid=$("input#spoolid")[0].value;

		$.ajax({
			type: "POST",
			url:PDV_RP+"webmall/post.php",
			data: "act=zhichi&spoolid="+spoolid,
			success: function(msg){	
				if(msg=="L0"){
					$().popLogin(0);
				}else if(msg=="L2"){
					$().alertwindow("对不起，您已经投过票了","");
				}else{
					$("span#zhichinum").html(msg);
				}
			}
		});
	});


	$("span#fandui").click(function(){
		
		var spoolid=$("input#spoolid")[0].value;

		$.ajax({
			type: "POST",
			url:PDV_RP+"webmall/post.php",
			data: "act=fandui&spoolid="+spoolid,
			success: function(msg){
				if(msg=="L0"){
					$().popLogin(0);
				}else if(msg=="L2"){
					$().alertwindow("对不起，您已经投过票了","");
				}else{
					$("span#fanduinum").html(msg);
				}
			}
		});
	});
		
});


//加入收藏
$(document).ready(function(){

	$("span#addfav").click(function(){
		
		var spoolid=$("input#spoolid")[0].value;

		$.ajax({
			type: "POST",
			url:PDV_RP+"webmall/post.php",
			data: "act=addfav&spoolid="+spoolid+"&url="+window.location.href,
			success: function(msg){
				if(msg=="L0"){
					$().popLogin(0);
				}else if(msg=="L2"){
					$().alertwindow("您已经收藏了当前网址","");
				}else if(msg=="OK"){
					$().alertwindow("已经加入到收藏夹",PDV_RP+"member/member_fav.php");
				}else{
					$().popLogin(0);
				}
			}
		});
	});
		
});


//演示计数
$(document).ready(function(){
	$(".democount").click(function(){
		var spoolid=$("input#spoolid")[0].value;
		$.ajax({
			type: "POST",
			url:PDV_RP+"webmall/post.php",
			data: "act=democount&spoolid="+spoolid,
			success: function(msg){
			}
		});
	});
});

//评分星级
$(document).ready(function(){
	$("img.pstar").mouseover(function(){
		var obj=this.id;
		var num=obj.substr(4);
		for(var i=1;i<=num; i++) {
			$("img#star"+i)[0].src=PDV_RP+"webmall/templates/images/icon_star_2.gif";
		}
	});	
});

-->
