//=== viewid:clock_style_1_1526375199680 ===//
$(document).ready(function(){
});

//=== viewid:clock_style_1_1526375199680 ===//
//--
				$(function(){
					var viewid="clock_style_1_1526375199680";
					var sys_url="viewid=clock_style_1_1526375199680&name=clock&style=style_1&langid=0&pageid=93556&viewCtrl=default&isfb=1";
					var moreParams='';
					if(typeof(history.pushState) != 'undefined'){
						var hstate=JSON.stringify(history.state);
						if(hstate!='null'&& hstate!=null){
							eval('var hjson = ' + hstate);
							moreParams=hjson.moreParamsclock_style_1_1526375199680;
						}
					}
					RequestURL(viewid,sys_url,moreParams);
				});
			//--

//=== viewid:clock_style_1_1526375199680 ===//

        var timeclock_style_1_1526375199680 = "2024-10-24 23:59:59";
        var endDayclock_style_1_1526375199680 = new Date(Date.parse(timeclock_style_1_1526375199680));
        
        // var weekNum = endDayclock_style_1_1526375199680.getDay();  //返回0-6  0对应的是周日  
        var starttimeclock_style_1_1526375199680 = timeclock_style_1_1526375199680.replace(new RegExp("-","gm"),"/");

        var dayArrclock_style_1_1526375199680 = new Array(),hourArrclock_style_1_1526375199680 = new Array(),minuteArrclock_style_1_1526375199680 = new Array(),secondArrclock_style_1_1526375199680 = new Array();

        function getTimeFunc_clock_style_1_1526375199680() {
            var endTimeclock_style_1_1526375199680 = (new Date(starttimeclock_style_1_1526375199680)).getTime();
            var nowTimeclock_style_1_1526375199680 = new Date();
            
            nowTimeclock_style_1_1526375199680 = nowTimeclock_style_1_1526375199680.getTime();
            var centerTimeclock_style_1_1526375199680 = endTimeclock_style_1_1526375199680 - nowTimeclock_style_1_1526375199680;

            let daysclock_style_1_1526375199680 = Math.floor(centerTimeclock_style_1_1526375199680 / (1000 * 60 * 60 * 24));
        　　let hoursclock_style_1_1526375199680 = Math.floor((centerTimeclock_style_1_1526375199680 % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
        　　let minutesclock_style_1_1526375199680 = Math.floor((centerTimeclock_style_1_1526375199680 % (1000 * 60 * 60)) / (1000 * 60));
        　　let secondsclock_style_1_1526375199680 = Math.floor(centerTimeclock_style_1_1526375199680 % (1000 * 60) / 1000);

                        var timerclock_style_1_1526375199680 = '';
            

            if( centerTimeclock_style_1_1526375199680 <= 0 && timerclock_style_1_1526375199680) {
                clearInterval(timerclock_style_1_1526375199680);
                daysclock_style_1_1526375199680 = hoursclock_style_1_1526375199680 = minutesclock_style_1_1526375199680 = secondsclock_style_1_1526375199680 = 0;
            }

                            if( centerTimeclock_style_1_1526375199680 <= 0) {
                    daysclock_style_1_1526375199680 = hoursclock_style_1_1526375199680 = minutesclock_style_1_1526375199680 = secondsclock_style_1_1526375199680 = 0;
                }
            
            // 风格6渲染
            
            // 风格7渲染
            var html_days = '',html_hours = '',html_minutes = '',html_seconds = '';
                    }
        getTimeFunc_clock_style_1_1526375199680();
                    var timerclock_style_1_1526375199680 = setInterval(getTimeFunc_clock_style_1_1526375199680,1000);
            

//=== viewid:clock_style_1_1526375199680 ===//

    $(function () {
        start_clock_clock_style_1_1526375199680();
    });
    function start_clock_clock_style_1_1526375199680() {
        setTimeout(update_clock_clock_style_1_1526375199680, 1000);
    }
    function update_clock_clock_style_1_1526375199680() {
        var clock = $('#clock_style_1_1526375199680 .clock'),
                options = {
                    'timezone':clock.attr('data-timezone'),
                    'with_leading_zeros':clock.attr('data-with_leading_zeros'),
                    'hour_format':clock.attr('data-hour_format'),
                    'template':clock.attr('data-template')
                },
                time = get_time_info(options);
        clock.find('.year').html(time['year']);
        clock.find('.month').html(time['month']);
        clock.find('.date').html(time['date']);
        clock.find('.hours').html(time['hours']);
        clock.find('.minutes').html(time['minutes']);
        clock.find('.seconds').html(time['seconds']);
        clock.find('.am-pm').html(time['am-pm']);
        clock.find('.year').html(time['year']);
        setTimeout(update_clock_clock_style_1_1526375199680, 1000);
    }
    function get_time_info(options) {
        var date = get_time_in_zone(options.timezone), result;
        result = {
            'year' : date.getFullYear(),
            'month' : _val(date.getMonth() + 1, options.with_leading_zeros),
            'date' : _val(date.getDate(), options.with_leading_zeros),
            'hours' : _val(options.hour_format == 12 && date.getHours() > 12 ? date.getHours() % 12 : date.getHours(), options.with_leading_zeros),
            'minutes' : _val(date.getMinutes(), true),
            'seconds' : _val(date.getSeconds(), true),
            'am-pm' : date.getHours() < 12 ? 'AM' : 'PM',
            'week-index' : date.getDay()
        };

        var weeks, months, am_pm;
        switch(options.template) {
            case 'english':
                weeks = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
                months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
                result['month'] = months[result['month'] - 1];
                break;
            case 'default': default:
                weeks = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
                am_pm = ['上午', '下午'];
                result['am-pm'] = result['am-pm'] == 'am' || result['am-pm'] == 'AM' ? am_pm[0] : am_pm[1];
            break;
        }
        result['week-name'] = weeks ? weeks[result['week-index']] : '';
        return result;
    }
    function get_timezone_offset(timezone) {
        var timezone_list = {
            'Etc/GMT+5': -5,
            'UTC': 0,
            'GMT+0': 0,
            'Etc/GMT-8': 8,
            'PRC': 8,
            'Etc/GMT-9': 9
        };
        return timezone_list[timezone] !== undefined ? timezone_list[timezone] : 0;
    }
    function get_utc_time() {
        var date = new Date(), local = date.getTime(), offset = date.getTimezoneOffset() * 60000;
        return local + offset;
    }
    function get_time_in_zone(timezone) {
        return new Date(get_utc_time() + 3600000 * get_timezone_offset(timezone));
    }
    function _val(val, with_leading_zeros) {
        return '' + (val < 10 && with_leading_zeros ? '0' : '') + val;
    }


//=== viewid:dh_style_11_1551172560647,dh_style_11_1551247983209 ===//

/*pc,手机显示隐藏*/
function is_mobile(){
	return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767);
}
var is_mobile_boolean = is_mobile();
$(function(){
    /*pc,手机显示隐藏*/
    
})


//=== viewid:dh_style_11_1551172560647 ===//

function navSwtich(obj) {
	$(obj).siblings(".menuUlCopy").slideToggle(200);
	$(obj).toggleClass('ontoggle');
	$(obj).parent().siblings().find(".menuUlCopy").slideUp(200);
	$(obj).parent().siblings().find(".fa-angle-down").removeClass('ontoggle');
}
function subLeft_dh_style_11_1551172560647(){
	$("#dh_style_11_1551172560647 .menuUl>li").each(function(){
		$(this).find(".menuUl03").css("left",'100%');
	})
}
$(window).resize(function() {
	subLeft_dh_style_11_1551172560647();
})
$(function(){
    
	$("#dh_style_11_1551172560647 .fa-navicon").click(function(){
        $("#dh_style_11_1551172560647").addClass('clearTransform');
		$("#dh_style_11_1551172560647 .menuUlCopy").each(function(){
			$(this).siblings(".fa").show();
		})
	})
	subLeft_dh_style_11_1551172560647();
		$("#dh_style_11_1551172560647 .subBox").css("top",$("#dh_style_11_1551172560647 .menuUl_box").height());
		
	if($("#dh_style_11_1551172560647 .menuUl").hasClass("noHover")){
		var tabNum = 0;
		$("#dh_style_11_1551172560647 .menuUl>li").find(".Onsub").each(function(){
			tabNum += 1;
			$(this).parent().attr("tabNum",tabNum)
		})
		$("#dh_style_11_1551172560647 .menuUl>li .Onsub").mouseover(function(){
			$("#dh_style_11_1551172560647 .subBox").show();
			var index = $(this).parent().attr("tabNum");
			$("#dh_style_11_1551172560647 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide();
			// 风格49，是用鼠标经过效果而不用鼠标选中效果
										$("#dh_style_11_1551172560647 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide();
					})
		// 风格49，是用鼠标经过效果而不用鼠标选中效果
								$("#dh_style_11_1551172560647 .subBox").mouseleave(function(){
			$(this).hide();
		});
		$("#dh_style_11_1551172560647 .menuUl>li .Nosub").mouseover(function(){
			$("#dh_style_11_1551172560647 .subBox").hide();
		})
		
		//风格41 42
					
		
		
	}
})


//=== viewid:dh_style_11_1551247983209 ===//

function navSwtich(obj) {
	$(obj).siblings(".menuUlCopy").slideToggle(200);
	$(obj).toggleClass('ontoggle');
	$(obj).parent().siblings().find(".menuUlCopy").slideUp(200);
	$(obj).parent().siblings().find(".fa-angle-down").removeClass('ontoggle');
}
function subLeft_dh_style_11_1551247983209(){
	$("#dh_style_11_1551247983209 .menuUl>li").each(function(){
		$(this).find(".menuUl03").css("left",'100%');
	})
}
$(window).resize(function() {
	subLeft_dh_style_11_1551247983209();
})
$(function(){
    
	$("#dh_style_11_1551247983209 .fa-navicon").click(function(){
        $("#dh_style_11_1551247983209").addClass('clearTransform');
		$("#dh_style_11_1551247983209 .menuUlCopy").each(function(){
			$(this).siblings(".fa").show();
		})
	})
	subLeft_dh_style_11_1551247983209();
		$("#dh_style_11_1551247983209 .subBox").css("top",$("#dh_style_11_1551247983209 .menuUl_box").height());
		
	if($("#dh_style_11_1551247983209 .menuUl").hasClass("noHover")){
		var tabNum = 0;
		$("#dh_style_11_1551247983209 .menuUl>li").find(".Onsub").each(function(){
			tabNum += 1;
			$(this).parent().attr("tabNum",tabNum)
		})
		$("#dh_style_11_1551247983209 .menuUl>li .Onsub").mouseover(function(){
			$("#dh_style_11_1551247983209 .subBox").show();
			var index = $(this).parent().attr("tabNum");
			$("#dh_style_11_1551247983209 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide();
			// 风格49，是用鼠标经过效果而不用鼠标选中效果
										$("#dh_style_11_1551247983209 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide();
					})
		// 风格49，是用鼠标经过效果而不用鼠标选中效果
								$("#dh_style_11_1551247983209 .subBox").mouseleave(function(){
			$(this).hide();
		});
		$("#dh_style_11_1551247983209 .menuUl>li .Nosub").mouseover(function(){
			$("#dh_style_11_1551247983209 .subBox").hide();
		})
		
		//风格41 42
					
		
		
	}
})


//=== viewid:dh_style_menu2_01_1551348791905,dh_style_menu2_01_1551316897339,dh_style_menu2_01_1551347556674,dh_style_menu2_01_1551345431143,dh_style_menu2_01_1551343448102,dh_style_menu2_01_1551422806036,dh_style_menu2_01_1551428532202,dh_style_menu2_01_1568878542799,dh_style_menu2_01_1555559363273 ===//

                                    
    // 风格style_menu2_03 交互
    

//=== viewid:productList_style_08_1555559291900,productList_style_04_1551757360193 ===//

var showSub = '0';



//=== viewid:productList_style_08_1555559291900,productList_style_04_1551757360193 ===//

    

//=== viewid:productList_style_04_1551757360193 ===//

if(typeof addcart !== 'function'){
	function addcart(pid,is_virtual,idspecprice,idpackage){
        var lang=0;
        if(lang == '0'){
            lang = Default_isFT;
            if(BodyIsFt == '0'){
                lang = BodyIsFt;
            }else if(BodyIsFt == '1'){
                lang = BodyIsFt;
            }
        }
        var packStr = '';
        if(typeof (idpackage) != 'undefined'){
            packStr = "&idpackage="+idpackage;
        }
		if(is_mobile()){
			var locationUrl = "http://admin.timeinfo8.cn/exusers/u_cart.php?idweb=7769&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr;
			if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice;
			if (isNaN(pid)) {//如果不是数字，表示批量加入购物车
				locationUrl = "http://admin.timeinfo8.cn/exusers/u_cart.php?idweb=7769&lang="+lang+"&act=add&ismobile=1" + pid + (idspecprice ? idspecprice : "");
			}
			var res = "0";
			if(res == '1' && is_virtual == 0){
				locationUrl+= "&use_ajax=1&callback=?";
				$.getJSON(locationUrl,function(ret){
				if(ret.i_AddFlag){
					$.alerts.dialogClass  = 'success';
					alert(ret.message);
				}
				});
			}else{
			    window.location = locationUrl;
			}

		}else{
			var locationUrl = "http://admin.timeinfo8.cn/exusers/u_cart.php?idweb=7769&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr;
			if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice;
			if (isNaN(pid)) {//如果不是数字，表示批量加入购物车
				locationUrl = "http://admin.timeinfo8.cn/exusers/u_cart.php?idweb=7769&lang="+lang+"&act=add&ispc=1" + pid + (idspecprice ? idspecprice : "");
			}
			document.getElementById("boxName").innerHTML="加入购物车";
			if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×";
			document.getElementById("showiframe").src=locationUrl;
			box.Show({width:"840px",height:"420px"});
		}
	}
}

function is_mobile(){
	return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767);
}
$(function(){
	$('#productList_style_04_1551757360193 .prod_infos .end_time').each(function(){
		purchase_clock(this);//开启倒计时
	});
});

//拼购倒计时
function purchase_clock(obj) {
	var time = parseInt($(obj).attr('data-time'));
	if (time > 0) {
		var str = '';
		var num = 0;
		num = parseInt(time/86400);
		if(num > 0)str += num.toString() + '天';
		time -= num * 86400;
		num = parseInt(time/3600);
		if(num > 0)str += num.toString() + '时';
		time -= num * 3600;
		num = parseInt(time/60);
		if(num > 0)str += num.toString() + '分';
		time -= num * 60;
		if(num > 0)str += time.toString() + '秒';
		$(obj).text(str).attr('data-time', parseInt($(obj).attr('data-time')) - 1);
		setTimeout(function(){
			purchase_clock(obj);
		}, 1000);
	} else {
		$(obj).text('0天0时0分0秒');
	}
}


//=== viewid:counter_style_1_1577242088891 ===//
//--
				$(function(){
					var viewid="counter_style_1_1577242088891";
					var sys_url="viewid=counter_style_1_1577242088891&name=counter&style=style_1&langid=0&pageid=93556&viewCtrl=default&isfb=1";
					var moreParams='';
					if(typeof(history.pushState) != 'undefined'){
						var hstate=JSON.stringify(history.state);
						if(hstate!='null'&& hstate!=null){
							eval('var hjson = ' + hstate);
							moreParams=hjson.moreParamscounter_style_1_1577242088891;
						}
					}
					RequestURL(viewid,sys_url,moreParams);
				});
			//--