//=== viewid:dh_style_28_1554691209632 ===//

/*pc,手机显示隐藏*/
function is_mobile(){
	return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767);
}
$(function(){
	$("#dh_style_28_1554691209632 li").each(function(){
					if($(this).find("ul") && $(this).find("ul").length != 0){
				$(this).children("a.mainMenuSet").removeAttr('href');
				if(is_mobile){
					$(this).children("a.mainMenuSet").attr('onclick','navSwtich(this)');
				}
			}
						
		  });
})


//=== viewid:dh_style_28_1554691209632 ===//

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_28_1554691209632(){
	$("#dh_style_28_1554691209632 .menuUl>li").each(function(){
		$(this).find(".menuUl03").css("left",'100%');
	})
}
$(window).resize(function() {
	subLeft_dh_style_28_1554691209632();
})
$(function(){
    
	$("#dh_style_28_1554691209632 .fa-navicon").click(function(){
        $("#dh_style_28_1554691209632").addClass('clearTransform');
		$("#dh_style_28_1554691209632 .menuUlCopy").each(function(){
			$(this).siblings(".fa").show();
		})
	})
	subLeft_dh_style_28_1554691209632();
		$("#dh_style_28_1554691209632 .subBox").css("top",$("#dh_style_28_1554691209632 .menuUl_box").height());
		
	if($("#dh_style_28_1554691209632 .menuUl").hasClass("noHover")){
		var tabNum = 0;
		$("#dh_style_28_1554691209632 .menuUl>li").find(".Onsub").each(function(){
			tabNum += 1;
			$(this).parent().attr("tabNum",tabNum)
		})
		$("#dh_style_28_1554691209632 .menuUl>li .Onsub").mouseover(function(){
			$("#dh_style_28_1554691209632 .subBox").show();
			var index = $(this).parent().attr("tabNum");
			$("#dh_style_28_1554691209632 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide();
							$("#dh_style_28_1554691209632 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide();
					})
						$("#dh_style_28_1554691209632 .subBox").mouseleave(function(){
			$(this).hide();
		});
		$("#dh_style_28_1554691209632 .menuUl>li .Nosub").mouseover(function(){
			$("#dh_style_28_1554691209632 .subBox").hide();
		})
		
		//风格41 42
					
		
		
	}
})
	var color = $('#dh_style_28_1554691209632 .menuStyle_28 .menuUl02 .subMenu02').css('background-color');
	$('#dh_style_28_1554691209632 .menuStyle_28').append(`<style>#dh_style_28_1554691209632 .menuStyle_28 .menuUl .rflex .menuUl02::before{border-bottom-color:${color}!important;}</style>`);
	$('#dh_style_28_1554691209632 .menuStyle_28 .menuUl02 .subMenu02').mouseover(function(){
		let that = $(this);
		setTimeout(function(){
			var hoverColor = that.css('background-color');
			$('#dh_style_28_1554691209632 .menuStyle_28').append(`<style>#dh_style_28_1554691209632 .menuStyle_28 .menuUl02 .arrow:hover::before{border-left-color:${hoverColor}!important;}</style>`);
		},100);
	});


//=== viewid:floornavigation_style_01_1584521389857 ===//

	$(".navPosa").empty()
	

//=== viewid:floornavigation_style_01_1584521389857 ===//

function curThis(obj){
	$(obj).addClass("current").siblings().removeClass("current");
	var newtop;
	if($(window).width()>1200){
		newtop = $(obj).attr("data-pc");
	}else{
		newtop = $(obj).attr("data-pad");					
	}
	$("html,body").stop().animate({"scrollTop":newtop-12+"px"},500);
}


function floorPcBlock(){
	$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems").removeClass("current");
	for(var i=0; i < $("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems").length; i++){
		if($(window).scrollTop()+180 > parseInt($("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems:eq("+i+")").attr("data-pc"))){
			$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems:eq("+i+")").addClass("current")
		}
	}
	if($("#floornavigation_style_01_1584521389857 .floorNavigMenu .current").length > 1){
		dataPc = $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq(0)").attr("data-pc");
		for(var i=0; i < $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current").length; i++){
			if(parseInt($("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq("+i+")").attr("data-pc")) > dataPc){
				dataPc = $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq("+i+")").attr("data-pc");
			}
		}
		$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems[data-pc='"+dataPc+"']").siblings().removeClass("current");
	}
}
function floorPadBlock(){
	$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems").removeClass("current");
	for(var i=0; i < $("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems").length; i++){
		if($(window).scrollTop()+180 > parseInt($("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems:eq("+i+")").attr("data-pad"))){
			$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems:eq("+i+")").addClass("current")
		}
	}
	if($("#floornavigation_style_01_1584521389857 .floorNavigMenu .current").length > 1){
		dataPad = $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq(0)").attr("data-pad");
		for(var i=0; i < $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current").length; i++){
			if(parseInt($("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq("+i+")").attr("data-pad")) > dataPad){
				dataPad = $("#floornavigation_style_01_1584521389857 .floorNavigMenu .current:eq("+i+")").attr("data-pad");
			}
		}
		$("#floornavigation_style_01_1584521389857 .floorNavigMenu .navItems[data-pad='"+dataPad+"']").siblings().removeClass("current");
	}
}
//与页面顶部距离多少才显示
$(function(){
	if($(window).scrollTop()==0){
		$("#floornavigation_style_01_1584521389857 .floorNavigMenu").show();
	}
	$(window).scroll(function(){
		//与页面顶部距离多少才显示
		if ($(window).scrollTop()>=0) {
			$("#floornavigation_style_01_1584521389857 .floorNavigMenu").fadeIn(300);
		}else{
			$("#floornavigation_style_01_1584521389857 .floorNavigMenu").hide();
		}
			if($(window).width()>1200){
			setTimeout("floorPcBlock()",300);
		}else{
			setTimeout("floorPadBlock()",300);
		}
		})
})
//window.parent.setBoxPositionType('window');



//=== viewid:customForm_style_button_01_1554713013340 ===//
function btnTop(){$("html,body").animate({scrollTop:"0px"},1000);}function btnBottom(){var bodyH = $("html,body").height();$("html,body").animate({scrollTop:bodyH},1000);}

//=== viewid:customForm_style_button_01_1554713013340 ===//

    if(typeof showcart !== 'function'){
        function showcart(){
            var langid = 0;
            if (langid==0 && BodyIsFt) langid = 1;
            if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){
                location.href = "https://admin.mifwl.com/exusers/u_cart.php?idweb=48255&act=show&lang="+langid+"&ismobile=1";
            }else{
                document.getElementById("boxName").innerHTML="";
                if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×";
                document.getElementById("showiframe").src="https://admin.mifwl.com/exusers/u_cart.php?idweb=48255&act=show&lang="+langid+"&v=9";
                box.Show({width:'1000px', height:'600px'});
            }
        }
    }



//=== viewid:customForm_form_1554712946261 ===//

$(function(){
	$("#form_customForm_form_1554712946261 input,select,textarea").each(function(){
		var typename = $(this).attr("type");
		if(typename=="hidden") return;
		$(this).attr('tabindex', $(this).offset().top);
	});

});
window.addEventListener('pageshow', function(event) {
  var historyTraversal = event.persisted || (typeof window.performance != 'undefined' && window.performance.navigation.type === 2);
  if (historyTraversal) {
    // 通过返回上一页进入时触发
	hideFormTipView();
	$('.style_verification_01 .input_view img').attr('src','//admin.mifwl.com/exusers/codeimg.php?sign=customForm&rnd=' + Date.parse(new Date()));
  }
});
function submitForm(form){
    showFormTipView();
    if (!CheckForm(form)){
        hideFormTipView();
        return false;
    } 
    return true;
}
function showFormTipView(){
    if($(".showFormTipView").length > 0){
        $(".showFormTipView").show();
        $("#showFormTipOverlay").show();
    }else{
        let html = `
            <style>
                #showFormTipOverlay{position: absolute; z-index: 99998; top: 0px; left: 0px; width: 100%; height: 1181px; background: rgb(255, 255, 255); opacity: 0.5;}
                .showFormTipView{position: fixed;top: 50%;left: 50%;width: 228px;background: #fff;padding: 24px;box-sizing: border-box;z-index: 99998;text-align: center;border-radius: 6px;box-shadow: 0 0 20px rgba(0,0,0,0.2);-webkit-transform: translate(-50%,-50%);-moz-transform: translate(-50%,-50%);-o-transform: translate(-50%,-50%);transform: translate(-50%,-50%);}
                .showFormTipView .fa{font-size: 28px;color: #999;}
                .showFormTipView .formTip{display: inline-block;padding-top: 12px;color: #333;}
            </style>
            <div id="showFormTipOverlay"></div>
            <div class="showFormTipView">
                <i class="fa fa-spinner fa-pulse"></i>
                <span class="formTip">该表单正在提交中，请稍等并且不要重复提交。</span>
            </div>
        `;
        $('body').append(html);
    }
}
function hideFormTipView(){
    $(".showFormTipView").hide(0);
    $("#showFormTipOverlay").hide(0);
}


//=== viewid:qqol_style_01_1554789900984 ===//

/*
 * ***************************************************************
 * 片段列表类
 */
function FragmentList(config) {
    this._default = {
        'prefix':'fragment-',
        'css':{}
    };
    config = $.extend(true, this._default, config);
    this.config = config;
    this.list = [];
    this.object = $('<div></div>');
    // 执行配置
    this.init(config);
}
/*
 * 初始化
 */
FragmentList.prototype.init = function(config) {
    config.css && this.object.css(config.css);
};
/*
 * 添加
 */
FragmentList.prototype.append = function (fragment) {
    this.list.push(fragment);
};
/*
 * 获取jquery对象
 */
FragmentList.prototype.get = function () {
    this.object.addClass(this.config.prefix + 'list').children().remove();
    for(var i = 0, len = this.list.length, html = ''; i < len; ++i) {
        html += this.list[i].html();
    }
    return this.object.html(html);
};
/*
 * 输出
 */
FragmentList.prototype.html = function () {
    return this.get().prop('outerHTML');
};

/*
 * ***************************************************************
 * 片段类
 */
Fragment.prototype.prefix = 'fragment-';
function Fragment(config) {
    (!config.init || Util.prototype.type(config.init) != 'function') && (config.init = function () {});
    !config.html && (config.html = '<div></div>');
    this._default = {
        'name':'item'
    };
    config = $.extend(true, this._default, config);
    // 创建jquery对象
    config.data && (config.html = Util.prototype.replace(config.html, Util.prototype.toArray(config.data)));
    this.object = $(config.html).addClass((config.name != 'item' ? this.prefix + 'item': '') + ' ' + this.prefix + config.name);
    config.init(this.object);
    delete config.html; // jquery对象创建后, config.html 不再使用
    this.config = config;
    // 执行配置
    this.init(config);
}
/*
 * 复制
 */
Fragment.prototype.clone = function () {
    return new Fragment($.extend(true, {}, this.config));
};
/*
 * 初始化
 */
Fragment.prototype.init = function(config) {
    config.css && this.object.css(config.css);
};
/*
 * 修改样式
 */
Fragment.prototype.css = function(css) {
    css && this.object.css(css);
    return this;
};
/*
 * 输出
 */
Fragment.prototype.html = function () {
    return this.object.prop('outerHTML');
};
/*
 * 使用指定数据更新自己
 */
Fragment.prototype.data = function (data) {
    this.object.html(Util.prototype.replace(this.html(), Util.prototype.toArray(data)));
    return this;
};

/*
 * ***************************************************************
 * 边栏类
 */
function Sidebar(config) {
    this._default = {
        // 默认配置, 常量, 不应该修改, 对象初始化时可覆盖
        'template':'sidebar',
        'expand':true,    // 默认展开还是隐藏
        'css':undefined,
        'main':{'width':'120px', 'position':'right'},
        'border':{'width':'1px', 'color':'#ccc', 'radius':'2px'},
        'button':{'width':'26px', 'color':'#333', 'font-size':'12px', 'background-color':'#ececec', 'radius':'5px'},
        'close':{'hide':false, 'height':'25px', 'font-size':'12px', 'padding':'0 .6em 0 .3em'},
        'show':{'start':undefined, 'end':undefined},   // 显示开始和结束时要执行的函数
        'end':{'start':undefined, 'end':undefined}   // 隐藏开始和结束时要执行的函数
    };
    config = $.extend(true, this._default, config);
    this.config = config;
    // dom 结构
    var temp = $('.'+config.template+':first');
    temp.hide();
    this.main = temp.clone().removeClass(config.template).show();
    this.main.data('instance', this);    // dom 结构的 data 中保存类对象
    config.css && this.main.addClass(config.css);
    // 主要属性
    this.width = config.main.width;
    this.position = config.main.position;
    this.main.addClass(this.position);
    this.position_rev = this.position == 'right' ? 'left' : 'right';
    this.wrapper = this.main.children('.wrapper');
    this._close = this.wrapper.children('.close');
    this.button = this.main.children('.button');
    // 子元素的 dom 结构的 data 中保存类对象
    this._close.data('parent', this);
    this.button.data('parent', this);
    // 执行配置
    this.init(config);
}
/*
 * 初始化
 */
Sidebar.prototype.init = function(config) {
    this.initMain();
    this.initWrapper(config);
    this.initButton(config);
    // 垂直居中后, 移动到body最后
    this.verticalCenter().appendTo('body');
    config.expand ? this.show(false) : this.hide(false);
    this.main.show();
    // 存储所有的对象到window中 (后期会使用)
    !window.online_service_list && (window.online_service_list = []);
    window.online_service_list.push(this);
    $(window).resize(this.onWindowResize);
};
/*
 * 初始化 - main
 */
Sidebar.prototype.initMain = function() {
    this.main.hide().css({
        'height':'auto',
        'position':'fixed',
        'z-index':'100000000',
        'top':'0px',
        'width':this.width
    });
    this.main.css(this.position, '0px');
    // 移入移出时
    this.main.hover(
        function () {
            $(this).data('instance').show();
        },
        function () {
            if(!$(this).hasClass('animate-showing')) {
                $(this).data('instance').hide();
            }
        }
    );
};
/*
 * 初始化 - wrapper
 */
Sidebar.prototype.initWrapper = function(config) {
    this.wrapper.css({
        'border': config.border.width +' solid ' + config.border.color,
        'border-radius':config.border.radius,
        '-moz-border-radius':config.border.radius
    });
    this._close.css({
        'display':config.close.hide ? 'none' : 'block',
        'position':'absolute',
        'top':'0px',
        'right':'0px',
        'height':config.close.height,
        'line-height':config.close.height,
        'font-size':config.close['font-size'],
        'padding':config.close.padding,
        'cursor':'pointer'
    }).click(function () {
        var instance = $(this).data('parent');
        Sidebar.prototype.hide.call(instance);
        if(typeof($("img").lazyload)=="function"){
            //异步加载图片
            setTimeout(function(){
                $("img").lazyload({effect: "fadeIn",threshold:0,failure_limit:20,skip_invisible:false});
            },500);
            
        }
    }).attr({'onselectstart':'return false', 'unselectable':'on'});   // [兼容]禁止选择文本
};
/*
 * 隐藏Sidebar
 * animate: 是否带动画
 */
Sidebar.prototype.hide = function (animate) {
    animate === undefined && (animate = true);
    var instance = this, width = '-'+this.width, end = this.position == 'right' ? {right :width} : {left :width},
        btn_width = '-'+instance.config.button.width, btn_end = instance.position == 'right' ? {left :btn_width} : {right :btn_width};
    instance.onHide('start');
    if(animate) {
        instance.main.animate(end, 'fast', function() {
            instance.button.show().animate(btn_end, 'fast');
            instance.onHide('end');
        });
    } else {
        instance.main.css(end);
        instance.button.show().css(btn_end);
        instance.onHide('end');
    }
};
/*
 * 隐藏Sidebar开始和结束时
 */
Sidebar.prototype.onHide = function (status) {
    var func;
    if(this.config.hide) {
        switch(status) {
            case 'start':
                Util.prototype.type(func = this.config.hide.start) == 'function' && func();  // 执行自定义函数
                break;
            case 'end':
                Util.prototype.type(func = this.config.hide.end) == 'function' && func();  // 执行自定义函数
                break;
        }
    }
};
/*
 * 初始化 - button
 */
Sidebar.prototype.initButton = function(config) {
    var width = config.button.width;
    this.button.hide().css({
        'position':'absolute',
        'top':'0%',
        'width':width,
        'line-height':'1.35em',
        'padding':'.5em 0',
        'font-size':config.close['font-size'],
        'color':config.button.color,
        'background-color':config.button['background-color'],
        'cursor':'pointer',
        'word-wrap':'break-word',
        'word-break':'break-all'
    });
    var radius = config.button.radius;
    if(this.position == 'right') {
        this.button.css({
            'border-top-left-radius':radius,
            'border-bottom-left-radius':radius
        });
    } else {
        this.button.css({
            'border-top-right-radius':radius,
            'border-bottom-right-radius':radius
        });
    }
    this.button.css(this.position_rev, '0px');
    // 点击时
    this.button.click(function () {
        var instance = $(this).data('parent');
        Sidebar.prototype.show.call(instance);
    }).attr({'onselectstart':'return false', 'unselectable':'on'});   // [兼容]禁止选择文本
};
/*
 * 显示Sidebar
 * animate: 是否带动画
 */
Sidebar.prototype.show = function (animate) {
    animate === undefined && (animate = true);
    var instance = this, end = instance.position == 'right' ? {right :0} : {left :0};
    instance.onShow('start');
    if(animate) {
        instance.onAnimate('showing');
        instance.main.animate(end, 'fast', function() {
            instance.onAnimate();
            instance.button.hide(); // Bug修复: 额外隐藏一次
            instance.onShow('end');
        });
    } else {
        instance.main.css(end);
        instance.onShow('end');
    }
    // 显示开始后, 不管是否有动画, 按钮应该马上隐藏
    instance.button.hide();
    instance.button.css(instance.position_rev,'0px');
};
/*
 * 显示Sidebar开始和结束时
 */
Sidebar.prototype.onShow = function (status) {
    var func;
    if(this.config.show) {
        switch (status) {
            case 'start':
                Util.prototype.type(func = this.config.show.start) == 'function' && func();  // 执行自定义函数
                break;
            case 'end':
                Util.prototype.type(func = this.config.show.end) == 'function' && func();  // 执行自定义函数
                break;
        }
    }
};
/*
 * 设置实时动画状态
 * status: 为空时表示动画结束
 */
Sidebar.prototype.onAnimate = function(status) {
    Util.prototype.removeClass(this.main, 'animate-');
    status && this.main.addClass('animate-'+status);
};
/*
 * 窗口大小改变时
 */
Sidebar.prototype.onWindowResize = function() {
    for(var i = 0, len = window.online_service_list.length; i < len; ++i) {
        window.online_service_list[i].verticalCenter();
    }
};
/*
 * 在窗口垂直居中
 */
Sidebar.prototype.verticalCenter = function() {
    var h1 = this.main.height(), h2 =$(window).height();
    if(h1 && h2) {
        this.main.css('top', ((h2 - h1) / 2) + 'px');
    }
    return this.main;
};
/*
 * 添加内容
 */
Sidebar.prototype.append = function(obj) {
    this.wrapper.append(obj);
    this.verticalCenter();
};

/*
 * ***************************************************************
 * 工具类
 */
function Util() {
}
/*
 * 返回对象类型
 */
Util.prototype.type = function(obj) {
    var type = obj === undefined ? 'undefined' : (obj === null ? 'null' : undefined);   // 兼容旧版js解析器
    return type ? type : Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
};
/*
 * 检测对象类型
 */
Util.prototype.is = function(obj, type) {
    var cls = this.type(obj);
    return obj !== undefined && obj !== null && cls.toLowerCase() === type.toLowerCase();
};
/*
 * 属性扩展( 增强版 )
 * 注意: 一般深度复制, 可直接使用 $.extend(true, target, source)
 */
Util.prototype.extend = function(target, source, is_deep, is_add) {
    is_deep === undefined && (is_deep = true);   // 如果值也是对象, 是否对值也调用extend
    is_add === undefined && (is_add = true);     // 如果目标对象中没有源对象的键, 是否允许新增键值
    for (var p in source) {
        if (source.hasOwnProperty(p) && (is_add || target.hasOwnProperty(p))) {
            // 执行extend
            if(is_deep && this.is(target[p], 'object') && this.is(source[p], 'object')) {
                this.extend(target[p], source[p]);
            } else {
                target[p] = source[p];
            }
        }
    }
    return target;
};
/*
 * 删除class( 删除指定名称的class和所有以指定名称开头的class )
 */
Util.prototype.removeClass = function(obj, rm) {
    obj.attr('class', function () {
        var regExp = new RegExp(rm + '\\S*', 'g');
        return Util.prototype.clear($(this).attr('class').replace(regExp, ''));
    });
    return obj;
};
/*
 * 删除前后空白
 */
Util.prototype.trim = function(s){
    return s.replace(/(^\s*)|(\s*$)/g,'');
};
/*
 * 合并中间多个空白为一个
 */
Util.prototype.clear = function(s){
    return s.replace(/(^\s*)|(\s*$)|(\s{2,})/g,'');
};
/*
 * 对象转数组
 */
Util.prototype.toArray = function(obj) {
    var array = [], p, item;
    for (p in obj) {
        if (obj.hasOwnProperty(p)) {
            item = [p];
            item.push(this.is(obj[p], 'object') ? this.toArray(obj[p]) : obj[p]);
            array.push(item);
        }
    }
    return array;
};
/*
 * 使用指定的键值数组替换一个字符串
 * 备注: 字符串中键以{{}}标记
 * 备注: data: 二维数组, 一维数组的每一项是一个长度为二的内层数组, 内层数组的第一项为键, 第二项为值
 */
Util.prototype.replace = function(s, data) {
    var i, len, reg_str = [], reg;
    for(i = 0, len = data.length; i < len; ++i) {
        reg_str.push('({{' + data[i][0] + '}})');
    }
    // 正则替换
    reg = new RegExp(reg_str.join('|'), 'g');
    return s.replace(reg, replace);
    // 执行替换的函数
    function replace(){
        // arguments 中包含的是: 字符串中当前位置匹配到的字符串, 第0个()匹配到的字符串, ..., 第n-1个()匹配到的字符串, 当前匹配的位置, 整个字符串
        // 从索引为1开始, 第一个不为undefined的项的索引值减一即为匹配到的键的索引
        for(var i = 1, len = arguments.length; i < len; ++i) {
            if(arguments[i] !== undefined) {
                return data[--i][1];
            }
        }
    }
};


//=== viewid:qqol_style_01_1554789900984 ===//

    //购物车
    if(typeof showcart !== 'function'){
        function showcart(){
            var langid = 0;
            if (langid==0 && BodyIsFt) langid = 1;
            if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767)){
            location.href = "//admin.mifwl.com/exusers/u_cart.php?idweb=48255&act=show&lang="+langid+"&ismobile=1";
            }else{
            document.getElementById("boxName").innerHTML="查看购物车";
            if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="×"; 
            document.getElementById("showiframe").src="//admin.mifwl.com/exusers/u_cart.php?idweb=48255&act=show&lang="+langid+"&v=9";
            box.Show({width:'1000px', height:'600px'});
            }
        }
    }
    //判断是否是手机,用于处理QQ电脑端及手机端链接不一致问题
    var mobile_flag = isMobile();
    if(mobile_flag){
                $('#qqol_style_01_1554789900984 .qq-btn-pc').hide();
        $('#qqol_style_01_1554789900984 .qq-btn-mobile').show();
            }
    function isMobile() {
        var userAgentInfo = navigator.userAgent;
        var mobileAgents = [ "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad","iPod"];
        var mobile_flag = false;
        //根据userAgent判断是否是手机
        for (var v = 0; v < mobileAgents.length; v++) {
            if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
                mobile_flag = true;
                break;
            }
        }
        var screen_width = window.screen.width;
        var screen_height = window.screen.height;

        //根据屏幕分辨率判断是否是手机
        if(screen_width < 500 && screen_height < 800){
            mobile_flag = true;
        }
        return mobile_flag;
    }


//=== viewid:qqol_style_01_1554789900984 ===//

	function remove_qqol_qqol_style_01_1554789900984(){
		$('body > .online-service.qqol-qqol_style_01_1554789900984').remove();
	}
    // 创建在线客服
    $(function () {
        // 清理旧的
        remove_qqol_qqol_style_01_1554789900984();

        // 创建边栏
        var sidebar = new Sidebar({
            'template': 'online-template',
            'css': 'qqol-qqol_style_01_1554789900984',
            'expand': false,
            'main': {'width':'200px', 'position': 'right'},
            'border': {'color': '#cc1017', 'width': '4px', 'radius': '10px'},
            'button': {'color': '#fff', 'background-color': '#cc1017', 'radius': '5px'},
            'close': {'hide': false}
        });

        // 片段模板
        var qqOnlineStr = '<div class="clearfix">' +
                '<a class="qq-btn qq-btn-pc" target="_blank" href="//wpa.qq.com/msgrd?v=3&uin={{qq}}&site=qq&menu=yes">' +
                '<img border="0" src="//admin.mifwl.com/images/qq_icon/icon-{{style}}.gif" alt="{{title}}" title="{{title}}">' +
                '{{text}}</a>' +
				'<a class="qq-btn qq-btn-mobile" target="_blank" href="mqqwpa://im/chat?chat_type=wpa&uin={{qq}}&version=1&src_type=web&web_src=oicqzone.com">' +
				'<img border="0" src="//admin.mifwl.com/images/qq_icon/icon-{{style}}.gif" alt="{{title}}" title="{{title}}">' +
				'{{text}}</a>' +
				'</div>';	// 图标不能显示时, 更换QQ号码让其显示 

        // 创建片段
        Fragment.prototype.prefix = 'ol-';

        // 创建片段列表
        var fragmentList = new FragmentList({
            'prefix':'ol-',
            'css':{'padding':'0 20px'}
        });
                        fragmentList.append(new Fragment({
                    'name':'qq-online',
                    'html':qqOnlineStr,
                    'data':{'qq':'188491426', 'style':2, 'title':'在线客服', 'text':'      客服一'},
                    'css':{'margin':'.5em 0'}
                }));
                    		fragmentList.append(new Fragment({
                    'name':'separator',
                    'css':{'height':'2px', 'background-color':'#a0a0a0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>工作时间</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>周一至周日 ：8:00-17:00</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name':'separator',
                    'css':{'height':'2px', 'background-color':'#a0a0a0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>联系方式</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>电话1：0511—86095079</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>电话2：13952891226</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>QQ：188491426</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        		fragmentList.append(new Fragment({
                    'name': 'text',
                    'html': '<div>general@zjcorim.com</div>',
                    'css':{'margin':'.5em 0'}
                }));
        	        // 添加到边栏
        var list = fragmentList.get();
        !list.children().length && list.html('<p>内容列表为空！</p>');
        sidebar.append(list);
        if(typeof($("img").lazyload)=="function"){
            $("img").lazyload({effect: "fadeIn",threshold:0,failure_limit:20,skip_invisible:false});
        }
    });
	


//=== viewid:qqol_style_01_1554789900984 ===//

    // 对输入内容中的尖括号、引号等进行转义
    function html_encode(str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&/g, "&amp;");
        s = s.replace(/</g, "&lt;");
        s = s.replace(/>/g, "&gt;");
        s = s.replace(/ /g, "&nbsp;");
        s = s.replace(/\'/g, "&#39;");
        s = s.replace(/\"/g, "&quot;");
        s = s.replace(/\n/g, "<br>");
        return s;
    }
    function html_decode(str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&amp;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/&#39;/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/<br>/g, "\n");
        return s;
    }