/* Js for , Version=1757860995 */
 v.lang = {"confirmDelete":"\u60a8\u786e\u5b9a\u8981\u6267\u884c\u5220\u9664\u64cd\u4f5c\u5417\uff1f","deleteing":"\u5220\u9664\u4e2d","doing":"\u5904\u7406\u4e2d","loading":"\u52a0\u8f7d\u4e2d","updating":"\u66f4\u65b0\u4e2d...","timeout":"\u7f51\u7edc\u8d85\u65f6,\u8bf7\u91cd\u8bd5","errorThrown":"\u6267\u884c\u51fa\u9519\uff1a","continueShopping":"\u7ee7\u7eed\u8d2d\u7269","required":"\u5fc5\u586b","back":"\u8fd4\u56de","continue":"\u7ee7\u7eed","bindWechatTip":"\u53d1\u5e16\u529f\u80fd\u8bbe\u7f6e\u4e86\u7ed1\u5b9a\u5fae\u4fe1\u7684\u9650\u5236\uff0c\u8bf7\u5148\u7ed1\u5b9a\u5fae\u4fe1\u4f1a\u5458\u3002","importTip":"\u53ea\u5bfc\u5165\u4e3b\u9898\u7684\u98ce\u683c\u548c\u6837\u5f0f","fullImportTip":"\u5c06\u4f1a\u5bfc\u5165\u6d4b\u8bd5\u6570\u636e\u4ee5\u53ca\u66ff\u6362\u7ad9\u70b9\u6587\u7ae0\u3001\u4ea7\u54c1\u7b49\u6570\u636e"};;var imgShow = document.getElementsByClassName('parent')[0],
	dotList = document.querySelectorAll('.dots >.clearfix > li');
var btnLeft = document.getElementsByClassName('btnLeft')[0],
    btnRight = document.getElementsByClassName('btnRight')[0];
var dotLen = dotList.length,
	index = 0; //轮播层的图片索引，0表示第一张

//圆点显示
function showRadius() {
	for(var i = 0; i < dotLen; i++) {
		if(dotList[i].className === "on"){
			dotList[i].className = "off";
		}
	}
	dotList[index].className = "on";
}

//向左移动
btnLeft.onclick = function() {
	index--;
    if(index < 0){  /*第1张向左时，变为第5张*/
        index = 4;
    }
    showRadius();
	var left;
	var imgLeft = imgShow.style.left;
	if(imgLeft === "0px") { /*当是第1张时，每张图片左移，移4张图，位置为-(4*500)*/
		left = -4800;
	}
	else{
		left = parseInt(imgLeft) + 1200; /*由于left为负数，每左移一张加500*/
	}
	imgShow.style.left = left + "px";
}

//向右移动
btnRight.onclick = function() {
	index++;
    if(index > 4){  /*第5张向右时，变为第1张*/
        index = 0;
    }
    showRadius();
	var right;
	var imgLeft = imgShow.style.left;
	if(imgLeft === "-4800px") { /*当是第5张时，第1张的位置为0*/
		right = 0;
	}
	else{
		right = parseInt(imgLeft) - 1200; /*由于left为负数，每右移一张减500*/
	}
	imgShow.style.left = right + "px";
}

// 自动轮播
/*var timer;
function autoPlay() {
	timer = setInterval(function() {
		var right;
		var imgLeft = imgShow.style.left;
		if(imgLeft === "-2000px") {
			right = 0;
		}
		else{
			right = parseInt(imgLeft) - 500;
		}
		imgShow.style.left = right + "px";
	} ,1000)
}
autoPlay();*/

for(var i = 0; i < dotLen; i++) {
    /*利用闭包传递索引*/
    (function(i) {
        dotList[i].onclick = function() {
	        var dis = index - i; //当前位置和点击的距离
	        imgShow.style.left = (parseInt(imgShow.style.left) + dis * 1200) + "px";
	        index = i; //显示当前位置的圆点
	        showRadius();
    	}
    })(i);
};var imgShow1 = document.getElementsByClassName('parent1')[0],
	dotList1 = document.querySelectorAll('.dots >.clearfix > li');
var btnLeft1 = document.getElementsByClassName('btnLeft1')[0],
    btnRight1 = document.getElementsByClassName('btnRight1')[0];
var dotLen1 = dotList1.length,
	index1 = 0; //轮播层的图片索引，0表示第一张

//圆点显示
function showRadius1() {
	for(var i = 0; i < dotLen1; i++) {
		if(dotList1[i].className === "on"){
			dotList1[i].className = "off";
		}
	}
	dotList1[index1].className = "on";
}

//向左移动
btnLeft1.onclick = function() {
	index1--;
    if(index1 < 0){  /*第1张向左时，变为第5张*/
        index1 = 2;
    }
    showRadius1();
	var left1;
	var imgLeft1 = imgShow1.style.left;
	if(imgLeft1 === "0px") { /*当是第1张时，每张图片左移，移4张图，位置为-(4*500)*/
		left1 = -2400;
	}
	else{
		left1 = parseInt(imgLeft1) + 1200; /*由于left为负数，每左移一张加500*/
	}
	imgShow1.style.left = left1 + "px";
}

//向右移动
btnRight1.onclick = function() {
	index1++;
    if(index1 > 2){  /*第5张向右时，变为第1张*/
        index1 = 0;
    }
    showRadius1();
	var right1;
	var imgLeft1 = imgShow1.style.left;
	if(imgLeft1 === "-2400px") { /*当是第5张时，第1张的位置为0*/
		right1 = 0;
	}
	else{
		right1 = parseInt(imgLeft1) - 1200; /*由于left为负数，每右移一张减500*/
	}
	imgShow1.style.left = right1 + "px";
}

// 自动轮播
/*var timer;
function autoPlay() {
	timer = setInterval(function() {
		var right;
		var imgLeft = imgShow.style.left;
		if(imgLeft === "-2000px") {
			right = 0;
		}
		else{
			right = parseInt(imgLeft) - 500;
		}
		imgShow.style.left = right + "px";
	} ,1000)
}
autoPlay();*/

for(var i = 0; i < dotLen1; i++) {
    /*利用闭包传递索引*/
    (function(i) {
        dotList1[i].onclick = function() {
	        var dis = index1 - i; //当前位置和点击的距离
	        imgShow1.style.left = (parseInt(imgShow1.style.left) + dis * 1200) + "px";
	        index1 = i; //显示当前位置的圆点
	        showRadius1();
    	}
    })(i);
};var imgShow2 = document.getElementsByClassName('parent2')[0],
	dotList2 = document.querySelectorAll('.dots >.clearfix > li');
var btnLeft2 = document.getElementsByClassName('btnLeft2')[0],
    btnRight2 = document.getElementsByClassName('btnRight2')[0];
var dotLen2 = dotList2.length,
	index2 = 0; //轮播层的图片索引，0表示第一张

//圆点显示
function showRadius2() {
	for(var i = 0; i < dotLen2; i++) {
		if(dotList2[i].className === "on"){
			dotList2[i].className = "off";
		}
	}
	dotList2[index2].className = "on";
}

//向左移动
btnLeft2.onclick = function() {
	index2--;
    if(index2 < 0){  /*第1张向左时，变为第5张*/
        index2 = 2;
    }
    showRadius2();
	var left2;
	var imgLeft2 = imgShow2.style.left;
	if(imgLeft2 === "0px") { /*当是第1张时，每张图片左移，移4张图，位置为-(4*500)*/
		left2 = -2400;
	}
	else{
		left2 = parseInt(imgLeft2) + 1200; /*由于left为负数，每左移一张加500*/
	}
	imgShow2.style.left = left2 + "px";
}

//向右移动
btnRight2.onclick = function() {
	index2++;
    if(index2 > 2){  /*第5张向右时，变为第1张*/
        index2 = 0;
    }
    showRadius2();
	var right2;
	var imgLeft2 = imgShow2.style.left;
	if(imgLeft2 === "-2400px") { /*当是第5张时，第1张的位置为0*/
		right2 = 0;
	}
	else{
		right2 = parseInt(imgLeft2) - 1200; /*由于left为负数，每右移一张减500*/
	}
	imgShow2.style.left = right2 + "px";
}

// 自动轮播
/*var timer;
function autoPlay() {
	timer = setInterval(function() {
		var right;
		var imgLeft = imgShow.style.left;
		if(imgLeft === "-2000px") {
			right = 0;
		}
		else{
			right = parseInt(imgLeft) - 500;
		}
		imgShow.style.left = right + "px";
	} ,1000)
}
autoPlay();*/

for(var i = 0; i < dotLen2; i++) {
    /*利用闭包传递索引*/
    (function(i) {
        dotList2[i].onclick = function() {
	        var dis = index2 - i; //当前位置和点击的距离
	        imgShow2.style.left = (parseInt(imgShow2.style.left) + dis * 1200) + "px";
	        index2 = i; //显示当前位置的圆点
	        showRadius2();
    	}
    })(i);
};$('#block244').find('.slide-card').click(function(){
    location.href = $(this).data('url');
});;$('#block243').find('.slide-card').click(function(){
    location.href = $(this).data('url');
});;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function()
{          
    // add "index" class to the body element.
    $('body').addClass('index');

    $('.nav-system-home:first').addClass('active');
    $('#navbar li.active').parents('li').addClass('active');
})

;
function loadCartInfo(twinkle)
{
    $('#siteNav').load(createLink('misc', 'printTopBar'),
        function()
        {
            if(twinkle) 
            {
                bootbox.dialog(
                {  
                    message: v.addToCartSuccess,  
                    buttons:
                    {  
                        back:
                        {  
                            label:     v.lang.continueShopping,
                            className: 'btn-primary',  
                            callback:  function(){location.reload();}  
                        },
                        cart:
                        {  
                            label:     v.gotoCart,  
                            className: 'btn-primary',  
                            callback:  function(){location.href = createLink('cart', 'browse');}  
                        }  
                    }  
                });
            }
        }
    );
}
