<?xml version="1.0"?>
<labeltemplate>
   <label>
    <![CDATA[
	
<form name="bundleform" id="bundleform" action="{$GetInstallDir}index.aspx?app=orderinfo" method="post">
	<div class="othercp clearfix">
	  <div class="title">产品套餐</div>
	  <div class="othercpbox">
	  <div class="dqcp">
	    <ul>
		  <li><a href="{KS:LinkUrl}"><img src="{KS:DefaultPic}" alt="image01" /></a>
		  <div class="info">{KS:Title}<span class="bindattr"></span></div>
		     <div class="price"> <label><input type="checkbox" name="checkbox" class="checkbox" value="checkbox"  checked="checked" disabled="disabled"/> 
				价格：<span class="showDynamicPrice">{$GetCurrencySymbol}{KS:Field:Price_Member}</span></label>
			 </div>
		  </li>
		</ul>
	  </div>
	  
	  
     <!--上下滚动效果-->
		<div id="tj_container" class="tj_container">
			<!--<div class="tj_nav">
				<span id="tj_prev" class="tj_prev">Previous</span>
				<span id="tj_next" class="tj_next">Next</span>
			</div>
			-->
			<div class="tj_wrapper">
				<ul class="tj_gallery"  id="BundleSale">
				    [recordloop]
					<div class="and"> + </div>
					<li><a href="{KS:LinkUrl}" title="{KS:Title}" target="_blank"><img src="{KS:DefaultPic}" alt="{KS:Title}" /></a>
					<div class="info" title="{KS:Title}">{KS:Title}</div>
					<div class="price">
						<label>
						  <input type="checkbox" class="checkbox" name="BandleSaleID" data-market="{KS:Price}" data-pricekb="{KS:KBPrice}" data-score="{KS:Score}" onclick="return(checkBundleSale())" value="{KS:ID}" {KS:Checked}/>价格：<span>{$GetCurrencySymbol}{KS:KBPrice}</span>
						</label> 
					</div>
				    </li>
					
					[/recordloop]
					
				</ul>
			</div>
				
		</div>

<!--上下滚动效果-->

	  </div>
	  <div class="and"> = </div>
	  <div class="price_r">
	        <input type="hidden" name="attrid" value="0" id="attrid_b"/>
			 <input type="hidden" name="ID" value="{KS:InfoID}" />
			<input type="hidden" name="BundleIDs" id="BundleIDs" value="{KS:CheckBundleID}"/>
			<input type="hidden" name="IsBundleSale" id="IsBundleSale" value="1"/>
	      <div class="tcj">套餐价：{$GetCurrencySymbol}<span id="BundPromotPrice">{KS:PromotPrice}</span></div>
	      <div class="jsj">省{$GetCurrencySymbol}<span id="BundSaleSave">0</span>{$GetCurrencyUnit}</div>
	      <div class="orij">价格：<del><span id="BundOriginPrice">{KS:OriginPrice}</span>{$GetCurrencyUnit}</del></div>
	      <div class="buynow"><input onclick="return(checkbindbuy())" type="image" src="/images/shop/bunnow.png" style="width:167px;height:35px"/></div>
	      <!--
		  <div class="carbuy"><a href="#"><img src="/images/shop/carbuy.png" /></a></div>
		  -->
		  
		  <div style="display:none">
		   <div>{KS:Title}</div>
		   <div id="bundleProList">+{KS:CheckedTitle}</div>
		   <div>赠　送：<span style="color:green"><span id="BundTotalScore">{KS:TotalScore}</span></span>个积分</div>
          </div>
		  
	  </div>
	</div>
	
</form>
	
	
	
<script type="text/javascript">
 $(window).load(function(){
    checkBundleSale();
 });
 function checkBundleSale(){
   var promotPrice1=promotPrice;
   var rprice=$('.showDynamicPrice').eq(0).html().replace(priceunit,'').replace(priceunitsymbol,'');
   if (!isNaN(rprice)){
			promotPrice1=parseFloat(rprice);
   }
 
   var obj=jQuery("#tj_container").find("input[type=checkbox]");
   var ced=false;
   var totalMarket=parseFloat({KS:Price});
   var totalScore=parseInt({KS:Score});
   var titleList='';
   var bundleId='';
   
   obj.each(function(){
   
     if ($(this).prop("checked")==true) {
	  titleList+='<br/>+'+$(this).next().text();
	 ced=true;
	 totalMarket+=parseFloat($(this).attr("data-market"));
	 promotPrice1+=parseFloat($(this).attr("data-pricekb"));
	 totalScore+=parseInt($(this).attr("data-score"));
	 if (bundleId=='')
	 bundleId=$(this).val();
	 else
	 bundleId+=","+$(this).val();
	 }
   });
   if (ced==false){
    KesionJS.Alert('请至少搭配一件商品才能享受优惠!');
	return false;
   }else{
   
     $("#BundOriginPrice").html(totalMarket.toFixed(2));
	 $("#BundPromotPrice").html(promotPrice1.toFixed(2));
	 $("#BundTotalScore").html(totalScore);
	 $("#bundleProList").html(titleList);
	 $("#BundleIDs").val(bundleId);
	 $("#BundSaleSave").html((totalMarket-promotPrice1).toFixed(2));
//alert(totalMarket+'=='+promotPrice1);
	 return true;
   }
 }
 function checkbindbuy(){
  $("#attrid_b").val($("#attrid").val());
  return shop.check(alen);
 }
</script>
	]]>
   </label>
</labeltemplate>