

"); //濉厖闀滃ご
var objCamera = $(".camera", obj);
objCamera.css(cameraCSs); //娣誨姞鏍峰紡
var zoom = objZoomImg.width() / objOriImgW; //鏀懼ぇ鍊嶆暟
objZoomDiv.width(opt.cameraW * zoom).height(opt.cameraH * zoom).css({ position: "absolute", left: (objOriDivW + opt.zoomPos) + "px", top: "0px", overflow: "hidden", "z-index": opt.zoomIndex, display: "none" }); //璁劇疆鏀懼ぇ鐨刣iv妗?
var nowLeft = 0, nowTop = 0;
objOriDiv.on("mouseover", function () {
objCamera.show(); //鏄劇ず闀滃ご,
objZoomDiv.show(); //鏄劇ず鏀懼ぇ妗?
$(document).on("mousemove", function (e) {
nowLeft = e.clientX - objOriDivLeft - opt.cameraW / 2+ $(document).scrollLeft();
nowTop = e.clientY-objOriDivTop - opt.cameraH / 2 + $(document).scrollTop();
if (nowLeft <= 0) nowLeft = 0;
else if (nowLeft >= cameraMaxLeft) nowLeft = cameraMaxLeft;
if (nowTop <= 0) nowTop = 0;
else if (nowTop >= cameraMaxTop) nowTop = cameraMaxTop;
objCamera.css({ left: nowLeft + "px", top: nowTop + "px" }); //闀滃ご鐨勭Щ鍔?
nowLeft = nowLeft * zoom;
nowTop = nowTop * zoom;
objZoomImg.css({ "margin-left": -nowLeft + "px", "margin-top": -nowTop + "px" });
});
});
objCamera.on("mouseout", function (e) {
$(this).hide();
$(document).off("mousemove");
$(opt.zoom, obj).hide();
});
}
})(jQuery);
/************鏀懼ぇ闀滄彃浠?浜?:浣跨敤浜屽紶鍥劇墖鐨勬€濊礬*end****************/
/***************************鍓嶅彴鐨勪細鍛?璐墿*********************************/
/**********浼氬憳****************/
function loadContentAjax(obj){
var html="
鏁版嵁姝e湪鑾峰彇涓?.....
";
obj.html(html);
}
function closeContentAjax(obj){
obj.html("");
}
//浼氬憳鐧誨綍鐣岄潰
$("#passWord,#msgCheckcode").on("keyup",function(e){
var code=e.which;
if(code==13){
if($(".systemDialog ").length>=2)
return;
else
memLog();
}
});
function openMen(id,type){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"",userLabelId:id,type:type},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
//console.log(data);
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: [],
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
//棰嗗彇浼樻儬鍒鎬細鍛樼櫥褰曠晫闈?
function openMen1(id,type){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"",couponID:id,type:type},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
//console.log(data);
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: [],
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
//璐拱鏃朵細鍛樼櫥褰曠晫闈?
function buyOpenMen(id,type){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"",proId:id,type:type},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
//console.log(data);
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: [],
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
//涓漢涓績鐣岄潰
function openMen2(){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/index.asp",
data:{},
type:"POST",
dataType:"html",
cache:"false",
error:function(){
fwajaxClose();
console.log("error");
},
success:function(data){
fwajaxClose();
layer.open({
type: 1,
title: '涓漢涓績',
area: ['1100px', '600px'],
closeBtn: 1,
skin: 'layui-layer-molv',
shadeClose: false,
scrollbar: false,
content:data
});
}
});
}
function openMen3(cid){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"success",couponID:cid},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
//console.log(data);
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: ['紜畾'],
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
//浼氬憳鐨勯獙璇佺爜
function msgCheckcodeFocus(){
var src='/inc/checkcode.asp?t='+(new Date().getTime());
$("#imgcheckcode").attr("src",src).show();;
}
//浼氬憳鐧誨綍鏂規硶
function memLog(isCode){
var memberName = $.trim($("#memberName").val());
var couponID = $.trim($("#couponID").val());
var passWord = $.trim($("#passWord").val());
var RadCode = $.trim($(".RadCode").val());
if(memberName==""){
layer.alert('璇鋒紜~鍐欑櫥闄嗚處鍙?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if(passWord==""){
layer.alert('瀵嗙爜涓虹┖鏃犳硶鐧婚檰', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if(RadCode=="" && isCode==1){
layer.alert('楠岃瘉鐮佷負絀?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"memLog",memberName:memberName,passWord:passWord,RadCode:RadCode,couponID:couponID},
type:"POST",
dataType:"json",
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ュけ璐?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
},
success:function(data){
if(data.status=="failed")
layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
else if(data.status=="success") {
$("#timeSessionMashine").val("guoyansi");
controlTimeMashine();
//openMen2();
openMen1(couponID);
}
else
layer.alert(transKeyWords(globelVary.languageId,13), {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true]});
}
})
}
//浼氬憳鐧誨綍鏂規硶浜?
function MemLog2(isCode){
var memberName = $.trim($("#memberName").val());
var passWord = $.trim($("#passWord").val());
var RadCode = $.trim($(".RadCode").val());
if(memberName==""){
layer.alert('璇鋒紜~鍐欑櫥闄嗚處鍙?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if(passWord==""){
layer.alert('瀵嗙爜涓虹┖鏃犳硶鐧婚檰', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if(RadCode=="" && isCode==1){
layer.alert('楠岃瘉鐮佷負絀?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"memLog",memberName:memberName,passWord:passWord,RadCode:RadCode},
type:"POST",
dataType:"json",
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ュけ璐?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
},
success:function(data){
if(data.status=="failed"){
layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
else if(data.status=="success") {
$("#timeSessionMashine").val("guoyansi");
controlTimeMashine();
layer.alert(data.msg, {icon:1,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
location.reload();
}
else {
layer.alert(transKeyWords(globelVary.languageId,13), {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
}
})
}
//浼氬憳棰嗗彇浼樻儬鍒?
function checkLevel(cid){
var data = {sType:"checkLevel",couponId:cid};
$.ajax({
url:"/apply/member/new_member/login1.asp",
type:"POST",
data:data,
dataType:"json",
cache:false,
error:function(data) {
layer.alert('鏈嶅姟鍣ㄨ繛鎺ュけ璐?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){if(data.status=="success"){
openMen3(cid);
//layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}else if(data.status=="failed"){
layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}else {
//console.log("1"+data.msg);
layer.alert('鍙傛暟寮傚父!', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
}
});
}
//浼氬憳娉ㄥ唽,浼氬憳淇℃伅鎻愪氦
function memberInfo_submit(className,type){
var data=getRegData(className);
if(data==0)
return;
var url;
if(type=="add"){
url="/apply/member/new_member/memberReg.asp";
data.sType="add";
}
else if(type=="save"){
url="/apply/member/new_member/memberInfo.asp";
data.sType="save";
}
fwajaxStar();
$.ajax({
url:url,
data:data,
dataType:"json",
type:"POST",
cache:false,
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title:['鎻愮ず',true],btn: ['紜畾']});
},
success: function(data){
fwajaxClose();
if(data.status=="success")
layer.alert(data.msg, {icon:1,zIndex : 2147483641,title : ['鎻愮ず',true],btn: ['紜畾']});
else if(data.status=="failed")
layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず',true],btn: ['紜畾']});
else
layer.alert('鍙傛暟寮傚父', {icon:2,zIndex : 2147483641,title : ['鎻愮ず',true],btn: ['紜畾']});
}
});
}
function getRegData(className){
var data={};//={sType:"add"};
var getStr=function(name,con){
con=$.trim(con);
if(!data[name])
data[name]=con;
else{
data[name]+=","+con;
}
}
var n=0;var titles="";
$("."+className).each(function() {
var name=$(this).attr("name");
var type=$(this).attr("type");
titles=$(this).attr("titles");
if(type=="text"||type=="textarea"||type=="password"){
var con=$.trim($(this).val());
if(con=="system_null"){n=1;return false;}//鍏抽敭瀛?
if($(this).attr("submit")=="no"){n=3;return false;}//楠岃瘉閿欒
if($(this).attr("regischeck")==1&&con==""){n=4;return false;}//蹇呭~欏?
getStr(name,con);
}
else if(type=="radio"||type=="checkbox"){
if(this.checked == true)
getStr(name,$(this).val());
}
else if(type=="select"){
getStr(name,$("option:selected", $(this)).val());
}
else{
n=2;
return false;
}
});
if(!memberNotice(n,titles))
return 0;
for(var i=1;i<=10;i++){
if(!data["regMem"+i])
data["regMem"+i]="system_null";
}
return data;
}
function memberNotice(n,titles){
var con="";var bool=true;
if(n==1) {con='system_null鏄叧閿瓧,鏃犳硶鎻愪氦';bool=false;}
else if(n==2){con='鏈夋湭鐭ョ被鍨嬫帶浠?;bool=false;}
else if(n==3) {con=titles+'濉啓閿欒';bool=false;}
else if(n==4){con=titles+'涓哄繀濉」';bool=false;}
if(!bool){layer.alert(con, {icon:2,zIndex : 2147483641,title : ['鎻愮ず',true],btn: ['紜畾']});return false;}
return true;
}
//浼氬憳璧勬枡楠岃瘉
function memberRegValidata(className){
$("."+className,$(".user_login_form")).each(function() {
var type=$(this).attr("type");
if(typeof type=="undefined")
type=$(this).get(0).tagName;
if(type=="text"||type=="TEXTAREA"){
var regtype=$(this).attr("regtype");
var data={};
var regischeck=$(this).attr("regischeck");
if(regischeck==0)//闈炲繀濉?
data.empty='涓嶆槸蹇呭~欏?;
else if(regischeck==1)//蹇呭~
{
//data.empty="涓哄繀濉」";
}
//綰暟瀛楁牸寮?
if(regtype==5){data.type="number";data.error='涓嶆槸鏁板瓧';data.right='濉啓姝g‘';data.width=200;$(this).fwValidateText(data);}
//綰瓧姣嶆牸寮?
else if(regtype==6){data.type="english";data.error='涓嶆槸瀛楁瘝';data.right='濉啓姝g‘';data.width=200;$(this).fwValidateText(data);}
//鐢佃瘽鏍煎紡
else if(regtype==7){data.type="tel";data.error='鐢佃瘽鏍煎紡鏈夎';data.right='濉啓姝g‘';data.width=200;$(this).fwValidateText(data);}
//鎵嬫満鏍煎紡
else if(regtype==8){data.type="phone";data.error='鎵嬫満鏍煎紡鏈夎';data.right='濉啓姝g‘';data.width=200;$(this).fwValidateText(data);}
//閭鏍煎紡
else if(regtype==9){data.type="email";data.error='璇鋒紜~鍐欓偖綆辨牸寮?;data.right='濉啓姝g‘';data.width=200;$(this).fwValidateText(data);}
}
});
}
//鍏嶈垂娉ㄥ唽
function freeReg(){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/memberReg.asp",
data:{sType:""},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.open({
title: '',
offset :'auto',
zIndex : 1001,
btn: [],
btn1 : function(index, layero){
memberInfo_submit('regType','add','');
},
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
function freeReg1(){
layer.alert('璇峰崌綰х増鏈?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
//浼氬憳瀵嗙爜鎵懼洖
function forget_pw(){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/forgetPW.asp",
data:{sType:""},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.alert(data, {icon:1,zIndex : 2147483641});
}
});
}
function forget_pw1(){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/forgetPW.asp",
data:{sType:""},
type:"POST",
dataType:'html',
cache:"false",
error: function(data){
console.log(data.responseText);
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: [],
//skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
//layer.alert(data, {icon:1,zIndex : 2147483641});
}
});
}
/**********浼氬憳**end**************/
/**********璐墿杞?***************/
//璐墿杞︽棤鐧婚檰鐘舵€?
function openMenuShoppingCart(){
fwajaxStar();
$.ajax({
url:"/apply/member/new_member/login1.asp",
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.open({
title: '',
area :'auto',
offset :'auto',
zIndex : 1001,
btn: [],
skin: 'layui-layer-molv', //鍔犱笂杈規
content:data
});
}
});
}
//閫夋嫨閰嶉€佹柟寮?
function changeSendPrice(obj){
if(obj.prop("checked")==true){
var price=obj.attr("price");
if(isNaN(price)){
layer.alert(price+'鏃犳硶瀹屾垚璁$畻', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$(".sendPriceTotal").html(price);
//$(".ft_c01").html(parseFloat($(".totalPrice").html())+parseFloat(price));
var totalPrice = $(".totalPrice").html();
var couponPrice = $(".sendCouponPrice").html();
totalPrice=totalPrice.replace(",","")
total=parseFloat(totalPrice)+parseFloat(price)-parseFloat(couponPrice);
$(".ft_c01").html(total.toFixed(2));
}
}
//閫夋嫨浼樻儬鍒?
function changeCoupon(){
var selectOne = $("#select option:selected").val();//0
$(".sendCouponPrice").html(selectOne);
var totalPrice = $(".totalPrice").html();
var sendPrice = $(".sendPriceTotal").html();
var couponPrice = $(".sendCouponPrice").html();
totalPrice=totalPrice.replace(",","")
var total=parseFloat(totalPrice)+parseFloat(sendPrice)-parseFloat(couponPrice);
$(".ft_c01").html(total.toFixed(2));
}
//閫夋嫨浠樻鏂瑰紡
function changePayType(obj){
var currency=obj.attr("currency");
$(".moneyCoin").html(currency);
}
//榪斿洖璐墿杞﹂〉闈?
function returnCart(){
fwajaxStar();
$.ajax({
url:"/apply/shopping/shoppingCar.asp",
data:{sType:""},
type:"POST",
dataType:"html",
cache:"false",
error:function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 199311160693});
},
success:function(data){
fwajaxClose();
layer.closeAll();
layer.open({type: 1,title: "",closeBtn: 1,content: data,zIndex :199211160693})
}
})
}
//鑾峰彇璐墿鐨勬暟閲忔垨娣誨姞鍒拌喘鐗╄濺鐨勬暟閲?
function getShoppingCount(){
var proNum=$(".text_shoping",$(".product_summary")).val();
if(isNaN(proNum)){layer.alert('璇鋒紜~鍐欒喘鐗╂暟閲?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});return "stop";}
proNum=parseInt(proNum);
if(proNum==0) return "stop";
return proNum;
}
//璐墿杞﹁喘涔?
function payCart(){
var name=$(".deliveryAddr_name").val();
var address=$(".deliveryAddr_addr").val();
var post=$(".deliveryAddr_post").val();
var phone=$(".deliveryAddr_phone").val();
var userinfo=$(".userinfo").val();
var couponID = $("#select option:selected").attr("cId");
var finalPrice = $(".ft_c01").html();
var data={sType:"pay",name:name,address:address,post:post,phone:phone,userinfo:userinfo,shoppingStr:window["shoppingCountAndIdStr"],couponID:couponID,finalPrice:finalPrice};
$("input[name=sendSelect]").each(function() {
if(this.checked == true){
data.sendType=$(this).val();
return false;
}
});
if($(".deliveryAddr_name").val()==""){
layer.alert('鏀惰揣浜轟笉鑳戒負絀?, {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if($(".deliveryAddr_addr").val()==""){
layer.alert('鏀惰揣鍦板潃涓嶈兘涓虹┖', {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if($(".deliveryAddr_phone").val()==""){
layer.alert('鑱旂郴鏂瑰紡涓嶈兘涓虹┖', {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if(!data.sendType){
layer.alert('璇烽€夋嫨閰嶉€佹柟寮?, {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$("input[name=payType]").each(function() {
if(this.checked == true){
data.payType=$(this).val();
return false;
}
});
if(!data.payType){
layer.alert('璇烽€夋嫨浠樻鏂瑰紡', {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
fwajaxStar();
$.ajax({
url:"/apply/shopping/shopFinish.asp",
data:data,
cache:false,
dataType:"html",
type:"POST",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']})
},
success:function(data){
fwajaxClose();
try{
data=eval("("+data+")");
if (data.status=="error"){
layer.alert(data.msg, {icon:2,zIndex : 199311160693,title : ['鎻愮ず' , true],btn: ['紜畾']})
}
}
catch(e){
$(".systemDialog").remove();
layer.closeAll();
layer.open({type: 1,title: "",closeBtn: 0,content: data,zIndex :199211160693})
window["shoppingCountAndIdStr"]=null;
}
}
});
}
//浜у搧灞曠ず鐨勭珛鍗寵喘涔?
function nowShopping(proId){
var reg=/[\d*,*]{0,}\d{1,}\.*\d*/gi;
var buyObj=$(".buy",$(".admin_tool"));
var proNum = $('.text_shoping').prop('value');
var proPrice = $('.price_Detail').html();
proPrice=proPrice.match(reg)[0];
var pro_S_Value='';
var inventory=$('.ck').html();
$('.cpgg').each(function(){
if($(this).hasClass('cpgg-selected')){
pro_S_Value+=$(this).html();
pro_S_Value+=',';
}
})
if(proNum=="stop")
return;
var data={sType:"buyNow",proNum:proNum,proId:proId,proPrice:proPrice,pro_S_Value:pro_S_Value,inventory:inventory};
fwajaxStar();
$.ajax({
url:"/apply/shopping/buyNow.asp",
//dataType:"html",
cache:false,
type:"POST",
data:data,
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']})
},
success:function(data){
fwajaxClose();
if(data=="login"){buyOpenMen(proId,"buyShopping");}
else layer.open({type: 1,title: "",closeBtn: 1, skin: 'demo-class',content: data,zIndex :10000})
}
});
}
//璐墿鍑轟箣鍚庣殑绔嬪嵆璐拱紜?
function payNow(){
var name=$(".deliveryAddr_name").val();
var address=$(".deliveryAddr_addr").val();
var post=$(".deliveryAddr_post").val();
var phone=$(".deliveryAddr_phone").val();
var userinfo=$(".userinfo").val();
var proId=$(".buyNowshoppingTr").attr("proId");
var orderPrice = $(".buyNowshoppingTr .shoppingName:eq(1)").html();
var proNum=$(".buyNowshoppingTr .shoppingName:eq(2)").html();
var pro_S_Value=$(".buyNowshoppingTr .shoppingName:eq(3)").html();
var couponID = $("#select option:selected").attr("cId");
var finalPrice = $(".ft_c01").html();
var data={sType:"payNow",name:name,address:address,post:post,phone:phone,userinfo:userinfo,proId:proId,proNum:proNum,orderPrice:orderPrice,pro_S_Value:pro_S_Value,couponID:couponID,finalPrice:finalPrice};
if($(".deliveryAddr_name").val()==""){
layer.alert('鏀惰揣浜轟笉鑳戒負絀?, {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if($(".deliveryAddr_addr").val()==""){
layer.alert('鏀惰揣鍦板潃涓嶈兘涓虹┖', {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
if($(".deliveryAddr_phone").val()==""){
layer.alert('鑱旂郴鏂瑰紡涓嶈兘涓虹┖', {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$("input[name=sendSelect]").each(function() {
if(this.checked == true){
data.sendType=$(this).val();
return false;
}
});
if(!data.sendType){
layer.alert('璇烽€夋嫨閭€掓柟寮?, {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
$("input[name=payType]").each(function() {
if(this.checked == true){
data.payType=$(this).val();
return false;
}
});
if(!data.payType){
layer.alert('璇烽€夋嫨浠樻鏂瑰紡', {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});return;
}
fwajaxStar();
$.ajax({
url:"/apply/shopping/shopFinish.asp",
data:data,
cache:false,
dataType:"html",
type:"POST",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
try{
data=eval("("+data+")");
if (data.status=="error"){
layer.alert(data.msg, {icon:2,zIndex : 199511160693,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
}
catch(e){
$(".systemDialog").remove();
layer.open({ type: 1,title: "",closeBtn: 0,content: data});
}
}
});
}
//鏀瑰彉璐墿杞︾殑浠鋒牸
function changeTotalPrice(commonTr,count){
var shoppPrice=parseFloat(commonTr.find(".shoppPrice").html());
var shoppingOneTotalPrice=(count*shoppPrice).toFixed(2);
commonTr.find(".shopingOneTotalPrice").html(shoppingOneTotalPrice);
}
//鏀瑰彉璐墿杞︾殑浠鋒牸
function changeShopPrice(proNum,shoppTotalPrice){
shoppPrice = $(".product_summary .price").attr('rel');
realTotalPrice = $("#shoppingCart").find("b").eq(1).attr('rel');
proNumcount = proNumcount+proNum;
shoppTotalPrice = (parseInt(proNumcount)*parseFloat(shoppPrice)+ parseFloat(realTotalPrice)).toFixed(2);
$("#shoppingCart").find("b").eq(1).html(shoppTotalPrice);
}
//浜у搧灞曠ず鐨勮喘鐗╄濺
var proNumcount = 0;
function addShoppingToCart(obj,proId){
var reg=/[\d*,*]{0,}\d{1,}\.*\d*/gi;
var buyObj=$(".buy",$(".admin_tool"));
var proNum = $('.text_shoping').prop('value');
var proPrice = $('.price_Detail').html();
proPrice=proPrice.match(reg)[0];
var pro_S_Value='';
$('.cpgg').each(function(){
if($(this).hasClass('cpgg-selected')){
pro_S_Value+=$(this).html();
pro_S_Value+=',';
}
})
if(document.getElementById('shoppingCart')) {
if (document.getElementById('shoppingCart_notlogin'))
{
layer.alert('璇風櫥褰?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return;
}else{
if(proNum=="stop")
return;
var data={proNum:proNum,proId:proId,pro_S_Value:pro_S_Value,proPrice:proPrice};
$.ajax({
url:"/apply/shopping/addCart.asp",
dataType:"json",
cache:false,
type:"POST",
data:data,
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
if(data.status=="success"){
$("body").append("
");
changeShopPrice(proNum);
var originOffset=obj.offset();
$(".addShoppingToCartCount").css({"top":originOffset.top+"px",left:originOffset.left+"px"});
var offset=buyObj.offset();
var targetTop = $("#shoppingCart").offset().top;
var targetLeft = $("#shoppingCart").offset().left + 15;
var time=1000;
$(".addShoppingToCartCount").animate({left:targetLeft,top:targetTop},time,'swing');
setTimeout(function(){$(".addShoppingToCartCount").remove();},time);
}
else if(data.status=="failed")
layer.alert('娣誨姞鍟嗗搧鍒拌喘鐗╄濺澶辮觸!', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
else
layer.alert(transKeyWords(globelVary.languageId,13), {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
});
}
} else {
if (document.getElementById('shoppingCart_notlogin'))
{
layer.alert('璇風櫥褰?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return;
}else{
layer.alert('璇鋒坊鍔犺喘鐗╄濺鏍囩鍒伴〉闈?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return;
}
}
}
/**********璐墿杞?*end**************/
function memberCenterShow(url) {
loadContentAjax($(".user_center_sub2"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($(".user_center_sub2"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($(".user_center_sub2"));
$(".user_center_sub2").html(data);
}
});
}
function memberCenterShow1(url) {
loadContentAjax($("#Umian"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($("#Umian"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($("#Umian"));
$("#Umian").html(data);
}
});
}
//璁㈠崟鍒楄〃錛堟湭鏀粯錛?
function memberCenterShow3(url) {
loadContentAjax($(".cupBox"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($(".cupBox"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($(".cupBox"));
$(".cupBox").html(data);
}
});
}
//璁㈠崟鍒楄〃錛堟湭鏀惰揣錛?
function memberCenterShow5(url) {
loadContentAjax($(".cupBox1"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($(".cupBox1"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($(".cupBox1"));
$(".cupBox1").html(data);
}
});
}
//璐墿杞?
function memberCenterShow4(url) {
loadContentAjax($(".shoppingCar"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($(".shoppingCar"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($(".shoppingCar"));
$(".shoppingCar").html(data);
}
});
}
function memberCenterShow2(url) {
loadContentAjax($("#LoginBox"));
$.ajax({
url:url,
dataType:"html",
cache:false,
error: function(){
closeContentAjax($("#LoginBox"));
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});},
success:function(data){
closeContentAjax($("#LoginBox"));
$("#LoginBox").html(data +"
12341564
");
}
});
}
function memberLogout(){
$.ajax({
url:"/apply/member/new_member/login1.asp",
data:{sType:"loginOut"},
type:"POST",
dataType:"json",
cache:"false",
error: function(){},
success:function(data){
if(data.status=="success"){
closeDialog("all");
window.location.reload();
}
else if(data.status=="falied"){
layer.alert(data.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
else {
layer.alert('鍙傛暟寮傚父!', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
}
});
}
//璐墿杞?
function openShoppingCar(){
fwajaxStar()
$.ajax({
url:"/apply/shopping/shoppingCar.asp",
data:{sType:""},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose()
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.open({type: 1,title: "",closeBtn: 1,content: data,zIndex: 2147483641})
}
});
}
//瓚呮椂澶勭悊
function controlTimeMashine(){//鐧誨綍鍚庤皟鐢?寮€濮嬭鏃?
clearTimeout(globelVary.timeMashine);
globelVary.timeMashine=setTimeout(function(){globelVary.sessionTimeBool=1;$("#timeSessionMashine").val("");},1000*60*20-20);//瓚呮椂
}
function getSessionTimeBool(){//姣忔ajax璇鋒眰鏃惰皟鐢?榪斿洖false鍚庨潰鐨刟jax涓嶅湪璋冪敤,榪斿洖true琛ㄧず鏈秴鏃?鍙互緇х畫鎵ц鍚庨潰鐨勪唬鐮?
if(globelVary.sessionTimeBool==1){
//bool=false;
window["destroySessionAjax"]=1;
$.ajax({
url:"/apply/member/logout.asp",
type:"GET",
cache:false,
error: function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(){
if(confirm('鐧誨綍瓚呮椂,璇烽噸鏂扮櫥闄?'))
window.top.location.reload();
else
window.top.location.reload();
}
});
}
}
/**
鏀懼ぇ闀?
**/
(function($){
$.fn.imagezoom=function(options){
var settings={xzoom:310,yzoom:310,offset:10,position:"BTR",preload:1};
if(options){$.extend(settings,options);}
/*var noalt='';*/
var self=this;
$(this).bind("mouseenter",function(ev){
var imageLeft=$(this).offset().left;
var imageTop=$(this).offset().top;
var imageWidth=$(this).get(0).offsetWidth;
var imageHeight=$(this).get(0).offsetHeight;
var boxLeft=$(this).parent().offset().left;
var boxTop=$(this).parent().offset().top;
var boxWidth=$(this).parent().width();
var boxHeight=$(this).parent().height();
/*noalt=$(this).attr("alt");*/
var bigimage=$(this).attr("rel");
$(this).attr("alt",'');
if($("div.zoomDiv").get().length==0){
$(document.body).append("

");
}
if(settings.position=="BTR"){
if(boxLeft+boxWidth+settings.offset+settings.xzoom>screen.width){
leftpos=boxLeft-settings.offset-settings.xzoom;
}else{
leftpos=boxLeft+boxWidth+settings.offset;
}
}else{
leftpos=imageLeft-settings.xzoom-settings.offset;
if(leftpos<0){leftpos=imageLeft+imageWidth+settings.offset;}
}
$("div.zoomDiv").css({top:boxTop,left:leftpos});
$("div.zoomDiv").width(settings.xzoom);
$("div.zoomDiv").height(settings.yzoom);
$("div.zoomDiv").show();
$(this).css('cursor','crosshair');
$(document.body).mousemove(function(e){
mouse=new MouseEvent(e);
if(mouse.x
imageLeft+imageWidth||mouse.yimageTop+imageHeight){
mouseOutImage();
return;
}
var bigwidth=$(".bigimg").get(0).offsetWidth;
var bigheight=$(".bigimg").get(0).offsetHeight;
var scaley='x';
var scalex='y';
if(isNaN(scalex)|isNaN(scaley)){
var scalex=(bigwidth/imageWidth);
var scaley=(bigheight/imageHeight);
var zoomMaskWidth=((settings.xzoom)/scalex>$(".jqzoom").width())?$(".jqzoom").width():(settings.xzoom)/scalex
var zoomMaskHeight=((settings.yzoom)/scaley>$(".jqzoom").height())?$(".jqzoom").height():(settings.yzoom)/scaley;
$("div.zoomMask").width(zoomMaskWidth);
$("div.zoomMask").height(zoomMaskHeight);
$("div.zoomMask").css('visibility','visible');
}
xpos=mouse.x-$("div.zoomMask").width()/2;
ypos=mouse.y-$("div.zoomMask").height()/2;
xposs=mouse.x-$("div.zoomMask").width()/2-imageLeft;
yposs=mouse.y-$("div.zoomMask").height()/2-imageTop;
xpos=(mouse.x-$("div.zoomMask").width()/2imageWidth+imageLeft)?(imageWidth+imageLeft-$("div.zoomMask").width()):xpos;
ypos=(mouse.y-$("div.zoomMask").height()/2imageHeight+imageTop)?(imageHeight+imageTop-$("div.zoomMask").height()):ypos;
$("div.zoomMask").css({top:ypos,left:xpos});
$("div.zoomDiv").get(0).scrollLeft=xposs*scalex;
$("div.zoomDiv").get(0).scrollTop=yposs*scaley;
});
});
function mouseOutImage(){
$(document.body).unbind("mousemove");
$("div.zoomMask").remove();
$("div.zoomDiv").remove();
}
count=0;
if(settings.preload){
$('body').append("");
$(this).each(function(){
var imagetopreload=$(this).attr("rel");
var content=jQuery('div.jqPreload'+count+'').html();
jQuery('div.jqPreload'+count+'').html(content+'
');
});
}
}
})(jQuery);
function MouseEvent(e){this.x=e.pageX;this.y=e.pageY;}
/**
鍙戦€侀偖綆遍獙璇佺爜
**/
function getCode(){
var memberMail = $("input[name='regMem5']").val();
if(memberMail=="" ||!(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(memberMail)){
layer.alert('璇鋒紜~鍐欓偖綆辨牸寮?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return;
}
fwajaxStar();
$.ajax({
url:"/apply/member/mailVerification.asp",
data:{"memberMail":memberMail},
type:"POST",
dataType:"html",
cache:"false",
error: function(){
fwajaxClose();
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
fwajaxClose();
layer.alert('楠岃瘉鐮佸凡鍙戦€佸埌閭!', {icon:1,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
});
}
/**
楠岃瘉閭
**/
function checkCode(){
var mailCode = $("#mailCode").val();
$.ajax({
type:"post",
url:"/apply/member/memberReg.asp",
data:{"sType":"maicheck","mailCode":mailCode},
dataType:"json",
cache:"false",
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
})
}
/**
鎶曠エ
**/
function vote(userLabelId){
var voteNameChecked="";
$('input[name="voteName'+userLabelId+'"]:checked').each(function(){
voteNameChecked+=$(this).val()+",";
})
if (voteNameChecked === "")
{
layer.alert('濉啓閿欒!', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return false;
}else{
$.ajax({
type: "POST",
url: "/apply/vote/vote_add.asp",
data:{"userLabelId":userLabelId,"voteNameChecked":voteNameChecked},
cache:false,
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?', {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return false;
},
success: function(data){
var dataMsg=eval("("+data+")");
if(dataMsg.status=="failed"){
layer.alert(dataMsg.msg, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return false;
}else if(dataMsg.status=="success"){
layer.alert(dataMsg.msg, {icon:1,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
}
});
}
}
/**
鏌ョ湅鎶曠エ緇撴灉
**/
function voteResult(userLabelId){
$.ajax({
type: "POST",
url: "/apply/vote/vote_result.asp",
data:{"userLabelId":userLabelId},
cache:false,
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
return false;
},
success: function(data){
layer.alert(data, {icon:1,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
}
});
}
/**
鍒嗛〉(layPage)
**/
function lay_page(userLabelId,totalpageno,className,listShowPageNum,curr){
laypage({
cont: document.getElementById("pager" + userLabelId),
pages: totalpageno, //鎬婚〉鏁?
//skin: '#CCC', //鍔犺澆鍐呯疆鐨偆錛屼篃鍙互鐩存帴璧嬪€?6榪涘埗棰滆壊鍊鹼紝濡?#c00
first: '<<', //棣栭〉 濡?1,
last:'>>', //鏈〉 濡?totalpageno,
prev: '<', //涓婁竴欏?濡?<',
next: '>', //涓嬩竴欏?濡?>',
curr: curr, //褰撳墠欏?
groups: listShowPageNum, //榪炵畫鏄劇ず鍒嗛〉鏁?
jump: function(obj,first){
if(!first){
document.cookie="beforeCUU="+obj.curr;
document.cookie="userLabelId="+userLabelId;
//console.log(document.cookie);
var data={"pageno":obj.curr,"userLabelId": userLabelId,"className":className };
$.ajax({
url:"/inc/pageContent.asp",
data:data,
type:"POST",
dataType:"html",
cache:false,
error:function(){
layer.alert('鏈嶅姟鍣ㄨ繛鎺ラ敊璇?, {icon:2,zIndex : 2147483641,title : ['鎻愮ず' , true],btn: ['紜畾']});
},
success:function(data){
{$("#" + userLabelId).replaceWith(data);}
}
});
}
}
});
}
/****************************************鏈夌炕璇?End**************************************************************/
/****************浜ゆ槗綾誨瀷浜у搧鍥劇墖灞曠ず**************************/
function tradeproImg(){
function G(s){
return document.getElementById(s);
}
function getStyle(obj, attr){
if(obj.currentStyle){
return obj.currentStyle[attr];
}else{
return getComputedStyle(obj, false)[attr];
}
}
function Animate(obj, json){
if(obj.timer){
clearInterval(obj.timer);
}
obj.timer = setInterval(function(){
for(var attr in json){
var iCur = parseInt(getStyle(obj, attr));
iCur = iCur ? iCur : 0;
var iSpeed = (json[attr] - iCur) / 5;
iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
obj.style[attr] = iCur + iSpeed + 'px';
if(iCur == json[attr]){
clearInterval(obj.timer);
}
}
}, 30);
}
var oPic = G("picBox");
var oList = G("listBox");
var oPrev = G("prev");
var oNext = G("next");
var oPicLi = oPic.getElementsByTagName("li");
var oListLi = oList.getElementsByTagName("li");
var len1 = oPicLi.length;
var len2 = oListLi.length;
var oPicUl = oPic.getElementsByTagName("ul")[0];
var oListUl = oList.getElementsByTagName("ul")[0];
var w1 = oPicLi[0].offsetWidth;
var w2 = oListLi[0].offsetWidth;
oPicUl.style.width = w1 * len1 + "px";
oListUl.style.width = w2 * len2 + "px";
var index = 0;
var num = 9;
var num2 = Math.ceil(num /2);
function Change(){
Animate(oPicUl, {left: - index * w1});
if(index < num2){
Animate(oListUl, {left: 0});
}else if(index + num2 <= len2){
Animate(oListUl, {left: - (index - num2 + 1) * w2});
}else{
Animate(oListUl, {left: - (len2 - num2) * w2});
}
for (var i = 0; i < len2; i++) {
oListLi[i].className = "";
if(i == index){
oListLi[i].className = "on";
}
}
}
if($(".listBox li").length<=5){
for (var i = 0; i < len2; i++) {
oListLi[i].index = i;
oListLi[i].onmouseover = function(){
index = this.index;
Change();
}
}
}else{
oNext.onclick = oNext.onclick = function(){
index ++;
index = index == len2 ? 0 : index;
Change();
}
oPrev.onclick = oPrev.onclick = function(){
index --;
index = index == -1 ? len2 -1 : index;
Change();
}
}
for (var i = 0; i < len2; i++) {
oListLi[i].index = i;
oListLi[i].onmouseover = function(){
index = this.index;
Change();
}
}
}
function closeLayer(e){
e.parents('.layui-layer').remove();
$("body").find(".layui-layer-shade").eq(1).remove();
}
//鍔ㄧ敾鏁堟灉 vigro
function animatev(){
$('.'+arguments[0]+arguments[1]).addClass(arguments[2]).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){$(this).removeClass(arguments[2])});
$('.'+arguments[0]+arguments[1]).attr({'data-wow-duration':arguments[3]+'s','data-wow-delay':arguments[4]+'s','data-wow-offset':arguments[5],'data-wow-iteration':arguments[6]});
$('.'+arguments[0]+arguments[1]).css({'animation-duration':arguments[7],'animation-delay':arguments[8],'animation-iteration-count':arguments[6],'animation-fill-mode':'both'})
for(i in arguments){
}
}
//璁$畻閫氭爮閲岄潰鐨刲eft vigro
function tlancv(){
var screenWidth = $(window).width();
var labelWidth = $("#" +arguments[0]).width();
if (labelWidth == 0){labelWidth = screenWidth;}
var halfScreenWidth = screenWidth/2;
var bodyWidth = $(".fwtop,.fwmain,.fwbottom").width();
var x1 = (screenWidth - bodyWidth)/2;
var labelLeft = arguments[1];
if(labelLeft.indexOf('%')<0){
labelLeft = $("#" + arguments[0]).position().left;
}else{labelLeft=$("#" + arguments[0]).parent().width()*labelLeft}
var left=0;
if(x1>0){
left = x1 + labelLeft;
}else{if(labelLeft<0){left = 0;}else{left = labelLeft;}}
if ($("#" + arguments[0]).parent().hasClass("tLan"))
{
if (labelWidth == screenWidth)
{
$("#" + arguments[0]).css({"left":"0px"});
}
else
{
if (labelLeft == halfScreenWidth){$("#" + arguments[0]).css({"left":"50%"});}
else if (labelLeft == 0){$("#" + arguments[0]).css({"left":"0"});}
else{$("#" + arguments[0]).css({"left":left + "px"});}}
}
}