{wc:templates "index","header"}
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/GoodsDetail.css"/>
<script type="text/javascript">
$.fn.CloudZoom.defaults = {
	zoomWidth: '400',
	zoomHeight: '310',
	position: 'right',
	tint: false,
	tintOpacity: 0.5,
	lensOpacity: 0.5,
	softFocus: false,
	smoothMove: 7,
	showTitle: false,
	titleOpacity: 0.5,
	adjustX: 0,
	adjustY: 0
};
</script>
<style type="text/css">
.zoom-section{clear:both;margin-top:20px;}
.zoom-small-image{ float:left;margin-bottom:20px; width:383px; height:383px;}
.zoom-small-image img{ width:383px; height:383px;}
.zoom-desc{float:left;width:404px; height:52px;margin-bottom:20px; overflow:hidden;}
.zoom-desc p{ width:10000px; height:52px; float:left; display:block; position:absolute; top:0; z-index:3; overflow:hidden;}
.zoom-desc label{ width:50px; height:52px; margin:0 5px 0 0; _margin-right:4px; display:block; float:left; overflow:hidden;}
.zoom-tiny-image{border:1px solid #CCC;margin:0px; width:48px; height:50px;}
.zoom-tiny-image:hover{border:1px solid #C00;}
</style>
<div class="Current_nav w1200">
	<a href="{WEB_PATH}">首页</a> <span>&gt;</span> 
	<a href="{WEB_PATH}/goods_list/{wc:$item['cateid']}.html">
	{wc:$category['name']}
	</a><span>&gt;</span> 
	<a href="{WEB_PATH}/goods_list/{wc:$item['cateid']}e{wc:$item['brandid']}.html">
	{wc:$brand['name']}
	</a> <span>&gt;</span>商品详情
</div>
<div class="show_content">

            <!--商品信息 begin-->
<div id="divMainInfo" class="ng-main clearfix">
                <!--图片展示-->
                <div class="Pro_Detleft">
			<div class="zoom-small-image">
				<span href="{G_UPLOAD_PATH}/{wc:$item['thumb']}" class = 'cloud-zoom' id='zoom1' rel="adjustX:10, adjustY:-2">
                <img width="80px" height="80px" src="{G_UPLOAD_PATH}/{wc:$item['thumb']}" /></span>
			</div>

			<div class="zoom-desc"> 
				<div class="jcarousel-prev jcarousel-prev-disabled"></div>
				<div class="jcarousel-clip" style="height:55px;width:384px;">
				<p>
					{wc:loop $item['picarr'] $imgtu}                  
					<label href="{G_UPLOAD_PATH}/{wc:$imgtu}" class='cloud-zoom-gallery'  rel="useZoom: 'zoom1', smallImage: '{G_UPLOAD_PATH}/{wc:$imgtu}'">
					<img class="zoom-tiny-image" src="{G_UPLOAD_PATH}/{wc:$imgtu}" /></label>			
					{wc:loop:end} 
				</p>
				</div>
				<div class="jcarousel-next jcarousel-next-disabled"></div>
			</div>
			<script>
				var si=$(".jcarousel-clip label").size();
				var label=si*55;
				$(".jcarousel-clip p").css({width:label,left:"0"});
				if(label>395){
					$(".jcarousel-prev,.jcarousel-next").show();
				}else{
					$(".jcarousel-prev,.jcarousel-next").hide();
				}
				$(".jcarousel-prev").click(function(){
					var le=$(".jcarousel-clip p").css("left");
					var le2=le.replace(/px/,"");
					if(le!='0px'){
						$(".jcarousel-clip p").css({left:le2*1+55});
					}						
				})
				$(".jcarousel-next").click(function(){
					var le=$(".jcarousel-clip p").css("left");
					var le2=le.replace(/px/,"");
					var max_next=-(si-7)*55+"px";
					if(le!=max_next){						
						$(".jcarousel-clip p").css({left:le2*1-55});
					}
				})
			</script>			
			
			
		</div>

                <!--正在进行中-->
                
                    <div style="margin-left: -117px;" class="ng-goods-detail ng-goods-detail-height">
                        
                            <h2 class="o-title"><span class="num" title="(第{wc:$item['qishu']}期) {wc:$item['title']}">
                                (第{wc:$item['qishu']}期)</span>{wc:fun:_strcut($item['title2'],55)}<span class="o-info" title="{wc:$item['title2']}">{wc:fun:_strcut($item['title2'],35)}</span>
                            </h2>
			<p class="Det_money">价值：<span class="rmbgray">{wc:$item['money']}</span></p>
			<!--显示揭晓动画 start-->
			{wc:if ($q_showtime=='Y')}
				{wc:templates "index","item_animation"}
			{wc:else}
				{wc:templates "index","item_contents"}
			{wc:if:end}	
			<!--显示揭晓动画 end-->	




			<div class="Pro_Record" style="height: 165px;border: 1px solid #E3E3E3; float: left;overflow:hidden;">
				<ul id="ulRecordTab" class="Record_tit">
					<li class="NewestRec Record_titCur">最新云购记录</li>
					<li class="MytRec">我的云购记录</li>
					<li class="Explain orange">什么是{wc:fun:_cfg("web_name_two")}？</li>
				</ul>
				<div class="Newest_Con hide">
					<ul style="height:105px;overflow:hidden;">
						{wc:loop $us $user}
						<li style="text-align:left;">
						<a href="{WEB_PATH}/uname/{wc:fun:idjia($user['uid'])}" target="_blank">
						{wc:if !empty($user['uphoto'])}
							<img src="{G_UPLOAD_PATH}/{wc:$user['uphoto']}" border="0" alt="" width="20" height="20">
						{wc:else}
							<img src="{G_UPLOAD_PATH}/photo/member.jpg" border="0" alt="" width="20" height="20">
						{wc:if:end}
						</a>					
						<a href="{WEB_PATH}/uname/{wc:fun:idjia($user['uid'])}" target="_blank" class="blue" style="font-size:12px;">{wc:$user['username']}</a>
						{wc:if $user['ip']}
						({wc:fun:get_ip($user['id'],'ipcity')}) 
						{wc:if:end}				
						{wc:fun:_put_time($user['time'])} 云购了
						<em class="Fb gray01">{wc:$user['gonumber']}</em>人次</li>
						{wc:loop:end}
					</ul>
					<p style=""><a id="btnUserBuyMore" href="javascript:;" class="gray01">查看更多</a></p>					
				</div>
				<div class="My_Record hide" style="display:none;">
					{wc:if uidcookie('uid')}					
					<ul>
						{wc:loop $us2 $user}
						{wc:if $user['uid']==uidcookie('uid')}
						<li>{wc:fun:_put_time($user['time'])}  云购了  {wc:$user['gonumber']}  个云购码</li>
						{wc:if:end}
						{wc:loop:end}
					</ul>
					{wc:else}
					<div class="My_RecordReg">
						<b class="gray01">看不到？是不是没登录或是没注册？ 登录后看看</b>
						<a href="{WEB_PATH}/member/user/login" class="My_Signbut">登录</a><a href="{WEB_PATH}/member/user/register" class="My_Regbut">注册</a>
					</div>
					{wc:if:end}
				</div>
				<div class="Newest_Con hide" style="display:none;">
					<p class="MsgIntro">{wc:fun:_cfg("web_name_two")}购是指只需1元就有机会买到想要的商品。即每件商品被平分成若干“等份”出售，每份1元，当一件商品所有“等份”售出后，根据云购规则产生一名幸运者，该幸运者即可获得此商品。</p>
					<p class="MsgIntro1">{wc:fun:_cfg("web_name_two")}以“快乐云购，惊喜无限”为宗旨，力求打造一个100%公平公正、100%正品保障、寄娱乐与购物一体化的新型购物网站。<a href="{WEB_PATH}/help/1" class="blue" target="_blank">查看详情&gt;&gt;</a></p>
				</div>
			</div>	




























                    </div>
                

                <!--揭晓倒计时-->
                
	<!--揭晓前-->
	
	
{wc:if $sid_code}
{wc:php:start}
$sid_code['q_user'] = unserialize($sid_code['q_user']);
{wc:php:end}
	{wc:if $zongji>1}
	<div class="w_details_right" style="position:relative;">
<h3>揭晓信息</h3>
<div class="w_time_info">
<div class="w_addss_img" style="display: none;">
<span class="w_spans_bg"></span>
<img width="200;" style="margin-top:0px;position:relative;z-index:2;" src="/static/img/front/module_loading.gif">
</div>
<div id="onePublishWait" class="w_time_backward" style="display: none">
<h6>谁会是本期幸运儿</h6>
<p class="w_backward">揭晓倒计时</p>
<div class="w_addBg">
<p id="publishWaitBlackTime" class="">
<b>0</b>
<b>0</b>
<span>:</span>
<b>0</b>
<b>0</b>
<span>:</span>
<b>0</b>
<b>0</b>
</p>
<div class="w_clear"></div>
</div>
<div class="w_boy">
<a id="lookPublishWaitDetail" href="">查看详情</a>
</div>
</div>
<div id="publishLog" class="w_information" style="">
{wc:if $sid_code['q_showtime']=='N'}
<div class="w_information_img">


<a id="WinmemberId" href="{WEB_PATH}/uname/{wc:fun:idjia($sid_code['q_uid'])}">
<img id="WinmemberIcon" class="lazy54" data-original="{G_UPLOAD_PATH}/{wc:$sid_code['q_user']['img']}" src="{G_UPLOAD_PATH}/{wc:$sid_code['q_user']['img']}" style="display: inline;">
</a>

</div>
{wc:else}
<div class="w_time_backward w_time_backward_other" style="display: block">
<h6>谁会是上期幸运儿</h6>

<div class="w_boy_other"></div>
</div>
{wc:if:end}
<p>
{wc:if $sid_code['q_showtime']=='N'}
恭喜
<a href="{WEB_PATH}/uname/{wc:fun:idjia($sid_code['q_uid'])}" target="_blank" class="blue">{wc:fun:get_user_name($sid_code['q_uid'])}</a>
<span id="WinmemberAddress">({wc:if $sid_go_record['ip']}
							{wc:fun:get_ip($sid_go_record['id'],'ipcity')}
							{wc:if:end})</span>
获得该期奖品
</p>
<dl class="w_winner_wen">
<dd>
幸运{wc:fun:_cfg('web_name_two')}码：
<label id="WinmemberCode">{wc:$sid_code['q_user_code']}</label>
</dd>

<dd id="WinmemberPTime">揭晓时间：{wc:fun:microt($sid_code['q_end_time'])}</dd>
<dd id="WinmemberBuyTime">{wc:fun:_cfg('web_name_two')}时间：{wc:fun:microt($sid_go_record['time'])}</dd>
<dd>
<a id="lookPublishDetail" href="{WEB_PATH}/uname/{wc:$sid_code['id']}.html">查看详情</a>
</dd>
</dl>



			{wc:if:end}
	{wc:if:end}
</div>
<div class="w_time_backward w_time_backward_other" style="display: none">
<h6>谁会是本期幸运儿</h6>
<p class="w_backward_other"></p>
<div class="w_boy_other"></div>
</div>
<p class="w_deng" style="display: none">敬请期待...</p>
</div>
<ul class="w_period" style="overflow:hidden;height:137px;">
 {wc:$loopqishu}
</ul>
<div class="w_clear"></div>
<div class="w_page_on">
{wc:php:start}
if(isset($_GET['p'])){$pagenum=$_GET['p'];}else{$pagenum=1;}	
//var_dump($xx);
{wc:php:end}
{wc:if $pagenum>1}
<a class="pageUp"  href="{WEB_PATH}/goods/{wc:$item['id']}.html?p={wc:$pagenum-1}">上一页</a>
{wc:else}
<a class="pageUp w_page_in" >上一页</a>
{wc:if:end}
{wc:if $pagenum<$xx}
<a class="pageDown"  href="{WEB_PATH}/goods/{wc:$item['id']}.html?p={wc:$pagenum+1}">下一页</a>
{wc:else}
<a class="pageDown w_page_in"">下一页</a>
{wc:if:end}
</div>
</div>
<div class="w_clear"></div>
{wc:else}
	<!--揭晓前-->
	<div class="w_details_right"><h3>揭晓信息</h3><div class="w_time_backward w_time_backward_other"><h6>谁会是本期幸运儿</h6><p class="w_backward_other"></p><div class="w_boy_other"></div></div><p class="w_deng">敬请期待...<br>商品二维码带佣金</p><br>	
		
		  {wc:if get_user_uid()}<img src={WEB_PATH}/member/home/sperweima/{wc:$item['id']} width=115 height=115> {wc:else}<div class="w_deng">请登陆后获取</div> {wc:if:end}</div>  
	
	
	
	{wc:if:end}
	
	<div class="w_clear"></div>

<!--揭晓后结束-->
</div>
</div>
<!-- 商品信息导航 --> 
<div class="ProductTabNav">
	<div id="divProductNav" class="DetailsT_Tit">
            <div class="DetailsT_TitP">
                <ul>
				<li class="Product_DetT DetailsTCur"><span class="DetailsTCur">商品详情</span></li>
				<li id="liUserBuyAll" class="All_RecordT"><span class="">所有参与记录</span></li>
                    <li class="Single_ConT"><span class="">晒单</span></li>
                </ul>
            </div>
        </div>
    </div>


<!--补丁3.1.6_b.0.1-->
<div id="divContent" class="Product_Content">
	<!-- 商品内容 -->
	<div class="Product_Con hide" style="display:block;">{wc:$item['content']}</div>
    <!-- 商品内容 -->
    
        <!-- 购买记录20条 -->
		<script type="text/javascript" language="javascript">   

function iFrameHeight() {   

var ifm= document.getElementById("iframepage");   

var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;   

if(ifm != null && subWeb != null) {

   ifm.height = subWeb.body.scrollHeight;

   ifm.width = subWeb.body.scrollWidth;

}   

}   

</script>
	<div name="bitem" class="AllRecordCon hide" style="display:none;">
		<iframe src="{WEB_PATH}/go/goods/go_record_ifram/{wc:$itemid}/20" id="iframepage" frameborder="0" scrolling="no" height="350" marginwidth="0" onLoad="iFrameHeight()"></iframe>	
	</div>
	<!-- 晒单 start-->
	<div name="div_tab" id="divPost"   class="Single_Content" style="display: none;">
<iframe id="iframea" src="{WEB_PATH}/go/shaidan/itemiframstory/{wc:$itemid}" style="width:1200px; border:none;height:0px;" frameborder="0" scrolling="no"></iframe>
	</div>

	</div>
<script>  
 $(function(){
	 $("#num_dig").mousemove(function(){
	  $(this).css("border","1px solid #C40000");		 
	});
	 $("#num_dig").mouseout(function(){
	  $(this).css("border","1px solid #CFCFCF");		 
	});		
});
</script> 
<script>
function set_iframe_height(fid,did,height){
	$("#"+fid).css("height",height);
}

$(function(){
var fouli=$(".DetailsT_TitP ul li");
var divCalResult =  $("div[name='div_tab']");
	fouli.click(function(){		   
		var index=fouli.index(this);
		fouli.removeClass("DetailsTCur").eq(index).addClass("DetailsTCur");
		var iframe = divCalResult.hide().eq(index).find("iframe");
			if (typeof(iframe.attr("g_src")) != "undefined") {
			  	 iframe.attr("src",iframe.attr("g_src"));
				 iframe.removeAttr("g_src");
			}
			
		divCalResult.hide().eq(index).show();
	});   
	

	$(".Announced_But").click(function(){
		var next_li = $(".DetailsT_TitP ul>li");
		var index = $(this).index()
		next_li.eq(index).click();
        $("html,body").animate({scrollTop:800},1500);
	});

	
	$(window).scroll(function(){
		if($(window).scrollTop()>=941){
			$("#divMidNav").addClass("nav-fixed");
		}else if($(window).scrollTop()<941){
			$("#divMidNav").removeClass("nav-fixed");
		}
	});
});
function divOpen(){
var height=$("#userRnoId").css("height");
	if(height=="90px"){
		$("#userRnoId").css("height","auto");
	}else{
		$("#userRnoId").css("height",90);
	};
}
$(function(){	
	$("#divOpen").click(divOpen);
});

$(".yu_ff").mouseover(function(){
  $(".h_1yyg_eject").show();
})
$(".yu_ff").mouseout(function(){
  $(".h_1yyg_eject").hide();
})

	     $("#m_all_sort").hide();
     $(".m_menu_all").mouseenter(function(){
		    $(".m_all_sort").show();
     })
	 $(".m_menu_all").mouseleave(function(){
		    $(".m_all_sort").hide();
     })
	 $(".m_all_sort").mouseenter(function(){
		    $(this).show();
     })
	 $(".m_all_sort").mouseleave(function(){
		    $(this).hide();
     })
</script>	
<script>
$("#btnOpenPeriod").click(function(){
		var ui_obj = $("#divPeriodList > ul");
		if($(this).attr("click")=='off'){
			$("#divPeriodList").css("max-height",ui_obj.length*50+"px");	
			$(this).attr("click","on");
			$(this).html("收起<s></s>");
			
		}else{
			$("#divPeriodList").css("max-height","99px");	
			$(this).attr("click","off");
			$(this).html("展开<i></i>");
		}			
});

//添加购买
$(function(){

var syrs="{wc:$syrs}";
var shopnum = $("#num_dig");

function baifenshua(aa,n){
	n = n || 2;
	return ( Math.round( aa * Math.pow( 10, n + 2 ) ) / Math.pow( 10, n ) ).toFixed( n ) + '%';
}

shopnum.ready(function(){
	if(shopnum.val()>syrs){
		shopnum.val(syrs);
	}   
});


shopnum.keyup(function(){
	if(isNaN(shopnum.val())){					
	 shopnum.val(1);
	}else{
		if(shopnum.val()<=0){					
		 shopnum.val(1);	
		} 
		if(shopnum.val()>syrs){
			shopnum.val(syrs);
		}
			var numshop=shopnum.val();
			if(numshop==69){
				var baifenbi='100%';
			}else{
				var showbaifen=numshop/69;
				var baifenbi=baifenshua(showbaifen,2);
			}
			$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");   		
	}	
  
});	

$("#shopadd").click(function(){
				var shopnum = $("#num_dig");
				var resshopnump='';				
				var num = parseInt(shopnum.val());
				if(num+1 >syrs){				
					shopnum.val(syrs);
					resshopnump = syrs;
				}else{
					resshopnump=parseInt(shopnum.val())+1;
					// shopnum.val(resshopnump);	
					// if(shopnum.val()>=syrs){
					// 	resshopnump=shopinfo['shenyu'];
					// 	shopnum.val(resshopnump);
					// }
				}
			if(resshopnump==69){
				var baifenbi='100%';
			}else{
				var showbaifen=resshopnump/69;
				var baifenbi=baifenshua(showbaifen,2);
			}
			$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");                			
		});
		
$("#shopsub").click(function(){
		var shopnum = $("#num_dig");
		var num = parseInt(shopnum.val());
		if(num<2){
			shopnum.val(1);			
		}else{
			var shopnums = shopnum.val(parseInt(shopnum.val()));
		}
 		// var shopnums=parseInt(shopnum.val());
		if(shopnums==69){
				var baifenbi='100%';
			}else{
				var showbaifen=shopnums/69;
				var baifenbi=baifenshua(showbaifen,2);
			}
			$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");       
	});		
});

$(function(){
$(".Det_Cart").click(function(){ 
	Cartcookie(false);
});
	$(".Det_Shopbut").click(function(){	
		Cartcookie(true);
	});	
});


function Cartcookie(cook){
	var info = {};
	var shopid=shopinfo['shopid'];
	var cookie_pre="wc_";//cookie配置前缀
	var Cartlist = $.cookie(cookie_pre+'Cartlist');
	if(!Cartlist){
		var info = {};
	}else{
		var info = $.evalJSON(Cartlist);
		if((typeof info) !== 'object'){
			var info = {};
		}
	}		
	if(!info[shopid]){
		var CartTotal=$("#sCartTotal").text();
			$("#sCartTotal").text(parseInt(CartTotal)+1);
			$("#btnMyCart em").text(parseInt(CartTotal)+1);
	}	
	var number=parseInt($("#num_dig").val());	
	info[shopid]={};
	info[shopid]['num']=number;
	info[shopid]['shenyu']=shopinfo['shenyu'];
	info[shopid]['money']=shopinfo['money'];
	info['MoenyCount']='0.00';
	$.cookie(cookie_pre+'Cartlist',$.toJSON(info),{expires:7,path:'/'});	
	if(cook){
		window.location.href="{WEB_PATH}/member/cart/cartlist/"+new Date().getTime();//+new Date().getTime()
	}
}


</script>			
<script type="text/javascript">
function set_iframe_height(height){
//	alert(height);
	$("#iframea").css("height",height);
	if(this.divPost!='yes'){
		$("#divPost").hide();this.divPost='yes';
	}
}

$(function(){
	$("#ulRecordTab li").click(function(){
		var add=$("#ulRecordTab li").index(this);
		$("#ulRecordTab li").removeClass("Record_titCur").eq(add).addClass("Record_titCur");
		$(".Pro_Record .hide").hide().eq(add).show();
	});
var fouli=$(".DetailsT_TitP ul li");
	fouli.click(function(){
		var add=fouli.index(this);	
		if(add ==2){
			$("#divPost").show();
		}
		if(add ==0 || add==1){
			$("#divPost").hide();
		}
		
		fouli.removeClass("DetailsTCur").eq(add).addClass("DetailsTCur");
		$("#divContent .hide").hide().eq(add).show();
	});
	$("#btnUserBuyMore").click(function(){
		fouli.removeClass("DetailsTCur").eq(1).addClass("DetailsTCur");
		$("#divContent .hide").hide().eq(1).show();
		$("html,body").animate({scrollTop:941},1500);
		$("#divProductNav").addClass("nav-fixed");
	});
	$(window).scroll(function(){
		if($(window).scrollTop()>=941){
			$("#divProductNav").addClass("nav-fixed");
			var wh = $(document.body).outerWidth(true);
			var w = (wh-1200)/2;
			$("#divProductNav").css("left",w + "px");
			
		}else if($(window).scrollTop()<941){
			$("#divProductNav").removeClass("nav-fixed");
		}
	});
})
var shopinfo={'shopid':{wc:$item['id']},'money':{wc:$item['yunjiage']},'shenyu':{wc:$syrs}};

	
$(function(){
	function baifenshua(aa,n){
	n = n || 2;
	return ( Math.round( aa * Math.pow( 10, n + 2 ) ) / Math.pow( 10, n ) ).toFixed( n ) + '%';
}
	var shopnum = $("#num_dig");
	shopnum.keyup(function(){
		if(shopnum.val()>{wc:$syrs}){
			shopnum.val({wc:$syrs});
		}
		var numshop=shopnum.val();
		if(numshop=={wc:$item['zongrenshu']}){
			var baifenbi='100%';
		}else{
			var showbaifen=numshop/{wc:$item['zongrenshu']};
			var baifenbi=baifenshua(showbaifen,2);
		}
		$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");
	});	
	
	$("#shopadd").click(function(){
		var shopnum = $("#num_dig");
			var resshopnump='';
			var num = parseInt(shopnum.val());				
			if(num+1 > 450){				
				shopnum.val({wc:$syrs});
				resshopnump = {wc:$syrs};
			}else{
				resshopnump=parseInt(shopnum.val())+1;
				shopnum.val(resshopnump);	
				if(shopnum.val()>={wc:$syrs}){
					resshopnump=shopinfo['shenyu'];
					shopnum.val(resshopnump);
				}
			}
			if(resshopnump=={wc:$item['zongrenshu']}){
				var baifenbi='100%';
			}else{
				var showbaifen=resshopnump/{wc:$item['zongrenshu']};
				var baifenbi=baifenshua(showbaifen,2);
			}
			$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");
	});
	
	
	$("#shopsub").click(function(){
		var shopnum = $("#num_dig");
		var num = parseInt(shopnum.val());
		if(num<2){
			shopnum.val(1);			
		}else{
			shopnum.val(parseInt(shopnum.val())-1);
		}
		var shopnums=parseInt(shopnum.val());
		if(shopnums=={wc:$item['zongrenshu']}){
				var baifenbi='100%';
			}else{
				var showbaifen=shopnums/{wc:$item['zongrenshu']};
				var baifenbi=baifenshua(showbaifen,2);
			}
			$("#chance").html("<span style='color:red'>获得机率"+baifenbi+"</span>");
	});
});

$(function(){
$(".Det_Cart").click(function(){ 
	//添加到购物车动画
	var src=$("#zoom1 img").attr('src');  
	var $shadow = $('<img id="cart_dh" style="display: none; border:1px solid #aaa; z-index: 99999;" width="400" height="400" src="'+src+'" />').prependTo("body"); 
	var $img = $(".mousetrap").first("img");
	$shadow.css({ 
	   'width' : $img.css('width'), 
	   'height': $img.css('height'),
	   'position' : 'absolute',      
	   'top' : $img.offset().top,
	   'left' : $img.offset().left, 
	   'opacity' :1    
	}).show();
	var $cart =$("#btnMyCart");
	var numdig=$(".num_dig").val();
	$shadow.animate({   
		width: 1, 
		height: 1, 
		top: $cart.offset().top, 
		left: $cart.offset().left,
		opacity: 0
	},500,function(){
		Cartcookie(false);
	});		
});
	$(".Det_Shopbut").click(function(){	
		Cartcookie(true);
	});	
});
function Cartcookie(cook){
	var shopid=shopinfo['shopid'];
	var number=parseInt($("#num_dig").val());
	if(number<=1){number=1;}
	var Cartlist = $.cookie('Cartlist');
	if(!Cartlist){
		var info = {};
	}else{
		var info = $.evalJSON(Cartlist);
		if((typeof info) !== 'object'){
			var info = {};
		}
	}		
	if(!info[shopid]){
		var CartTotal=$("#sCartTotal").text();
			$("#sCartTotal").text(parseInt(CartTotal)+1);
			$("#btnMyCart em").text(parseInt(CartTotal)+1);
	}	
	info[shopid]={};
	info[shopid]['num']=number;
	info[shopid]['shenyu']=shopinfo['shenyu'];
	info[shopid]['money']=shopinfo['money'];
	info['MoenyCount']='0.00';	
	$.cookie('Cartlist',$.toJSON(info),{expires:7,path:'/'});
	if(cook){
		window.location.href="{WEB_PATH}/member/cart/cartlist/"+new Date().getTime();//+new Date().getTime()
	}
}  
</script> 

{wc:templates "index","footer"}
