function wp_multilingual_changeLang(id)
{
$.ajax({
type:'POST',
url:parseToURL('multilingual','changeLang'),
data:"id="+id,
success:function(js_code){
eval(js_code);
},
error:function(response){
wp_alert("Choose the language.
请求失败");
}
});
}
$('#layer4551A11DEAD39E7AA7F8BC5BA5D16177').layer_ready(function(){
setTimeout(function(){
$("#layer4551A11DEAD39E7AA7F8BC5BA5D16177").find('.wp-diy-selectedb-outside').remove();
},100);
$("#layer4551A11DEAD39E7AA7F8BC5BA5D16177").find('select').cstselect({selectclass:'wp-diy-selectedb'});
})
$(function(){
if ($('div.wp-diy-selecteda-outside').length || $('div.wp-diy-selectedb-outside').length || $('div.wp-diy-selectedc-outside').length || $('div.wp-diy-selectedd-outside').length) {
$('#scroll_container').scroll(function(){
$('body').children('div.wp-diy-selecteda-content').remove();
$('body').children('div.wp-diy-selectedb-content').remove();
$('body').children('div.wp-diy-selectedc-content').remove();
$('body').children('div.wp-diy-selectedd-content').remove();
});
}
});
$('#layer4551A11DEAD39E7AA7F8BC5BA5D16177').layer_ready(function(){
var custom_css = '';
var langstyle = 'custom2';
var $curlayer = $('#layer4551A11DEAD39E7AA7F8BC5BA5D16177');
var custom_a_font_size = $curlayer.find('.wp-content .custom_dom_class').css('font-size');
var custom_a_color = $curlayer.find('.wp-content .custom_dom_class').css('color');
if(custom_a_font_size){
$curlayer.find('.wp-content .custom_dom_class a').css('font-size',custom_a_font_size);
}
if(custom_a_color){
$curlayer.find('.wp-content .custom_dom_class a').css('color',custom_a_color);
}
if((langstyle == 'default' || langstyle == 'yellow') && custom_css == ''){
$curlayer.find('.wp-content p.custom_dom_class a').css('color','red');
}
var time=100;
if(langstyle == 'custom5' || langstyle == 'custom6') time=500;
$curlayer.find(".aout_over").unbind('click.toggle').bind('click.toggle',function(){ $curlayer.find(".text-a").slideToggle(time);});
setTimeout(function(){
var text_a_font_size = $curlayer.find('.wp-content .custom_dom_class a').css('font-size') || '12px';
var text_a_color = $curlayer.find('.wp-content .custom_dom_class .aout').css('color') || '#ffffff';
var text_a_bgcolor = $curlayer.find('.wp-content .custom_dom_class').css('background-color') || '#ffffff';
var text_a_border_radius = $curlayer.find('.wp-content .custom_dom_class .aout').css('border-radius') || '5px';
var $text_a = $curlayer.find('.wp-content .custom_dom_class .text-a');
if(text_a_font_size){ $text_a.find('a').css('font-size',text_a_font_size);}
if(text_a_color){ $text_a.find('a').css('color',text_a_color);}
if(text_a_bgcolor){ $text_a.css('background-color',text_a_bgcolor);}
if(text_a_border_radius){ $text_a.css('border-radius',text_a_border_radius);}
},400);
});
function wp_showdefaultHoverCss(layer_id){
var layertype=$('#'+layer_id).attr('type');
if(layertype && window['wp_showdefaultHoverCss_'+layertype]){
return window['wp_showdefaultHoverCss_'+layertype](layer_id);
}
return false;
}
function wp_showdefaultHoverCss_product_category(layer_id)
{
var plugin_name=$("#"+layer_id).attr('type');
var hover=$("#"+layer_id).find('.nav1').attr('hover');
var skinname=$("#"+layer_id).find('.nav1').attr('skin');
if(skinname=='vertical_vs10_1'){
return;
}
if(hover!=1){ return;}
wp_getdefaultHoverCss(layer_id);
var n=0;
if(plugin_name=='new_navigation'){
var page_id=$("#page_id").val();
var rootpid=$("#page_id").attr("rpid")*1;
}else{
var page_id=$('#'+layer_id+'').find(".default_pid").html();
if(page_id==0 || page_id.length==0){
page_id=$('#nav_'+layer_id+'').children('li:first').attr('pid');
}
}
$('#nav_'+layer_id+'').children('li').each(function(){
var type_pid=$(this).attr('pid');
if(type_pid==page_id){
$(this).addClass("lihover").children('a').addClass("ahover");
}else if(type_pid==rootpid){
$(this).addClass("lihover").children('a').addClass("ahover");
}
if(window.location.href == $(this).find("a").attr("href") || window.location.href == $(this).find("a").attr("href")+"&brd=1"){ $(this).addClass("lihover").children('a').addClass("ahover"); }
n++;
});
if(!$('#nav_'+layer_id+'').children('li.lihover').length){
$('#nav_'+layer_id+' ul').children('li').each(function(){
var lochref=window.location.href.replace(/^https?:/,'').replace(/&brd=1$/,'');
var subahref= $(this).find('a').attr("href").replace(/^https?:/,'').replace(/&brd=1$/,'');
if(lochref == subahref || lochref ==subahref+"&brd=1"){
$(this).parents(".wp_subtop").addClass("lihover").children('a').addClass("ahover");
return;
}
})
}
if(hover==1){
if($('#nav_'+layer_id+'').children('li').children('a.ahover').length<1){
$('#nav_'+layer_id+'').children('li:first').addClass("lihover").children('a').addClass("ahover");
}
}
}
var wp_showdefaultHoverCss_layer4B130ED22F0EFF25677797E92DE04B3D=wp_showdefaultHoverCss;
function wp_addMoreButton(layer_id){
var layertype=$('#'+layer_id).attr('type');
if(layertype && window['wp_addMoreButton_'+layertype]){
return window['wp_addMoreButton_'+layertype](layer_id);
}
return false;
}
function wp_addMoreButton_product_category(layer_id)
{
var firstLiTop = 0;
var hasMore = false;
$('#nav_'+layer_id).children('li.wp_subtop').each(function(i){
if(i == 0) {firstLiTop = $(this).offset().top;return true;}
if($(this).offset().top > firstLiTop)
{
$('#'+layer_id).data('hasMore','yes');//配置逻辑获取
var more = $.trim($('#'+layer_id).children('.wp-product_category_content').children('.nav1').attr('more'));
var doms = $(this).prev().prev().nextAll().clone();
var objA = $(this).prev().children('a');
if(objA.children('span').length > 0) objA.children('span').html(more);
else objA.html(more);
if(objA.hasClass('sub'))
{
objA.next('ul').empty();
doms.appendTo(objA.next('ul'));
}
else
{
objA.after('
');
doms.appendTo(objA.next('ul'));
objA.addClass('sub');
}
$(this).prev().nextAll().remove();
objA.next('ul').children('li').removeClass('wp_subtop');
hasMore = true;
objA.attr('href','javascript:void(0);');
//点击"更多"弹出全站导航
if($("#"+layer_id).find('.nav1').attr('moreshow') == 1)
{
objA.click(function (e){
$('#'+layer_id).find('#basic-modal-content_'+layer_id).modal({
containerId:'wp-product_category-simplemodal-container_'+layer_id,
zIndex:9999,
close:false,
onOpen:function(dialog){
dialog.overlay.fadeIn('slow', function(){
dialog.container.slideDown('slow',function(){
dialog.data.fadeIn('slow','swing',function(){
$('.wp_menus').not('.wp_thirdmenu0').each(function(){
var left = $(this).parent().parent().children('a').eq(0).outerWidth()+5;
$(this).css({position:'relative',left:left+'px'});
});
});
});
});
},
onClose:function(dialog){
dialog.data.fadeOut('slow',function (){
dialog.container.slideUp('slow', function () {
dialog.overlay.fadeOut('slow', function () {
$.modal.close();
});
});
});
}
});
return false;
});
}
return false;
}
});
if(!hasMore) $('#'+layer_id).data('hasMore','no');
wp_showdefaultHoverCss(layer_id);
}
//编辑模式水平拖动动态刷新修改More按钮
function wp_updateMoreButton(layer_id)
{
var $layer = $('#'+layer_id);
var $nav1 = $layer.children('.wp-product_category_content').children('.nav1');
var tmp_css = $.trim($("#datastys_"+layer_id).text());
var tmp_cssa = $.trim($("#datasty_"+layer_id).text());
$.post(parseToURL("product_category","refreshNavigator",{menustyle:$.trim($nav1.attr('skin')),saveCss:'yes',page_id:$("#page_id").val(),blockid:layer_id,typeval:$.trim($layer.find(".wp-product_category_content").attr('type')),colorstyle:$.trim($nav1.attr('colorstyle')),direction:$.trim($nav1.attr('direction')),more:$.trim($nav1.attr('more')),hover:$.trim($nav1.attr('hover')),moreshow:$.trim($nav1.attr('moreshow')),morecolor:$.trim($nav1.attr('morecolor'))}),function(data){
$layer.find('.wp-product_category_content').html(data);
$("#datastys_"+layer_id).text(tmp_css);
var setcss=$("#page_set_css").html();
setcss=setcss.replace(/');
});
wp_showdefaultHoverCss(layer_id);
}
function wp_removeLoading(layer_id)
{
var $nav1 = $('#'+layer_id).find(".nav1");
var ishorizon=$nav1.attr("ishorizon");
if(ishorizon=='1'){
$("#"+layer_id).find('.wp-new_navigation_content').css({height:'auto',overflow:'hidden'});
}else{
$("#"+layer_id).find('.wp-new_navigation_content').css({width:'auto',overflow:'hidden'});
}
// 修复IE浏览器部分版本导航无法显示问题 2013/12/26
var temptimer = setTimeout(function(){
$("#"+layer_id).find('.wp-new_navigation_content').css("overflow", 'visible');
clearTimeout(temptimer);
}, 50);
}
$("#layer4B130ED22F0EFF25677797E92DE04B3D").data("jeditMode",0);
layer_prdcat_setvar({"isedit":0,"layerid":"layer4B130ED22F0EFF25677797E92DE04B3D"});
$(function(){
setTimeout(function(){
var layerids = "ul#nav_layer4B130ED22F0EFF25677797E92DE04B3D";
if($(layerids).find('.wp_subtop:last').children('a').html() == ""){
$(layerids).find('.wp_subtop:last').children('a').html('更多');
}
},500)
})
var wp_showdefaultHoverCss_layer4B130ED22F0EFF25677797E92DE04B3D=wp_showdefaultHoverCss;
$("#layer4B130ED22F0EFF25677797E92DE04B3D").data("datasty_", '@charset "utf-8"; #nav_layer4B130ED22F0EFF25677797E92DE04B3D,#nav_layer4B130ED22F0EFF25677797E92DE04B3D ul,#nav_layer4B130ED22F0EFF25677797E92DE04B3D li{list-style-type:none; margin:0px; padding:0px; border:thin none;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D { position:relative;padding-left:20px;background-image:url(/skin/images/menu6_bg.jpg);background-repeat:repeat;background-position:top left;background-color:transparent;height:42px;-moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;behavior: url(script/pie.htc);} #nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop{padding-left:5px;padding-right:5px;text-align:center;height:42px;line-height:42px;position: relative; float:left; width:120px; padding-bottom:0px;background-image:url(/skin/images/menu6_line.jpg);background-color:transparent;background-repeat:no-repeat;background-position:top right;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop:hover{height:42px;line-height:42px;width:120px;text-align:center;background-image:url(/skin/images/menu6_hover.jpg);background-repeat:repeat-x;background-color:transparent;background-position:top left;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a{white-space:nowrap;font-style:normal;font-weight:normal;font-family:arial;font-size:12px;display:block; padding:0px; color:#ffffff; text-align:center; text-decoration: none;overflow:hidden;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a:hover{color:#fff; text-decoration: none;font-size:12px;font-style:normal;font-weight:normal;font-family:arial;color:#ffffff;text-align:center;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul {position:absolute;left:0px;display:none; background-color:transparent;margin-left:0px;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li {padding-left:5px;padding-right:5px;text-align:center;position:relative; float: left;padding-bottom:0px;background-image:none;background-color:#fc6701;height:25px;line-height:25px;background-position:top left;background-repeat:repeat;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li:hover{text-align:center;background-image:none; background-color:#dc3200;width:120px;height:25px;line-height:25px;background-position:top left;background-repeat:repeat;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li a {text-align:center;color:#fff;font-size:12px;font-family:arial;font-style:normal;font-weight:normal;white-space:nowrap;display:block;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li a:hover{ color:#fff;font-size:12px;font-family:arial;text-align:center;font-style:normal;font-weight:normal;} #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul ul {position: absolute; margin-left: 120px; margin-top: -25px;display: none; }');
$("#layer4B130ED22F0EFF25677797E92DE04B3D").data("datastys_", '#nav_layer4B130ED22F0EFF25677797E92DE04B3D{background-color:transparent;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D{background-image:url(/skin/images/png_bg.png);}#nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li{background-color:#f1c232;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop:hover{background-image:url(/skin/images/png_bg.png);}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a:hover{color:#000000;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a{font-weight:normal;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a{color:#434343;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop>a{font-family:SourceHanSansCN-Regular;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop{background-position:center center;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop{height:39px;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop{background-image:url(/skin/images/png_bg.png);}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop{background-color:transparent;}#nav_layer4B130ED22F0EFF25677797E92DE04B3D li.wp_subtop:hover{background-color:#d9d9d9;}');
function layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss(css_pro,type)
{
var typeval=type;
if(typeval==1){
var regex = "#nav_layer[0-9|a-z|A-Z]+\\s+ul+\\s+li+\\s+a:\\s*hover\\s*{\\s*"+css_pro+"\\s*:[^;]+";
}else{
var regex = "#nav_layer[0-9|a-z|A-Z]+\\s+li\.wp_subtop>a:\\s*hover\\s*{\\s*"+css_pro+"\\s*:[^;]+";
}
var navStyle = $.trim($("#layer4B130ED22F0EFF25677797E92DE04B3D").data("datastys_"));
if(navStyle.length > 0)
{
var patt1 =new RegExp(regex,'i');
var tmp = patt1.exec($.trim(navStyle));
if(tmp)
{
return $.trim((tmp[0].match(/{[^:]+:[^;]+/)[0]).match(/:[^;]+/)[0].replace(':',''));
}
}
navStyle = $.trim($("#layer4B130ED22F0EFF25677797E92DE04B3D").data("datasty_"));
if(navStyle.length > 0)
{
if(typeval==1){
var patt1 = new RegExp("#nav_layer[0-9|a-z|A-Z]+\\s+ul+\\s+li+\\s+a:\\s*hover\\s*{[^}]+}",'i');
}else{
var patt1 = new RegExp("#nav_layer[0-9|a-z|A-Z]+\\s+li\.wp_subtop>a:\\s*hover\\s*{[^}]+}",'i');
}
var tmp = patt1.exec(navStyle);
if(tmp)
{
var tmp1 = tmp[0].match(/{[^}]+}/)[0];
var patt2 = new RegExp(css_pro+"\\s*:\\s*[^;]+;",'i');
tmp = patt2.exec(tmp1);
if(tmp) return $.trim(tmp[0].replace(/[^:]+:/,'').replace(';',''));
}
}
return $.trim($("#nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li a").css(css_pro));
}
setTimeout(function(){
wp_addMoreButton('layer4B130ED22F0EFF25677797E92DE04B3D');
$(document).ready(function(){
$('#nav_layer4B130ED22F0EFF25677797E92DE04B3D').find('li').hover(function(){
$(this).children('ul').show();
},function(){
$(this).children('ul').hide();
});
//子菜单位置设置
$(".menu_hs6 #nav_layer4B130ED22F0EFF25677797E92DE04B3D").find('li').mouseenter(function(){
var firstLi = $(this);
var firestLiouterWidth = firstLi.outerWidth();
var tmp_max_width = 0;
firstLi.children('ul').children('li').each(function(){
if($(this).outerWidth() < firestLiouterWidth)
$(this).width(firestLiouterWidth - parseInt($(this).css('padding-left')) - parseInt($(this).css('padding-right')));
else if($(this).outerWidth() > tmp_max_width) tmp_max_width = $(this).outerWidth();
});
if(tmp_max_width > 0) firstLi.children('ul').children('li').each(function(){
$(this).width(tmp_max_width - parseInt($(this).css('padding-left')) - parseInt($(this).css('padding-right')));
});
if(firstLi.parent('ul').attr('id') != 'nav_layer4B130ED22F0EFF25677797E92DE04B3D')
firstLi.children('ul').css('margin-left',firstLi.outerWidth());
tmp_max_width = 0;
});
//第三级即下级菜单随高度增加位置动态修改
$(".menu_hs6 #nav_layer4B130ED22F0EFF25677797E92DE04B3D ul li").hover(function(){
if($(this).children('ul').length > 0)
{
var marginTop = parseInt($(this).children('ul').css('margin-top'));
if($(this).children('ul').offset().top > $(this).offset().top)
$(this).children('ul').css('margin-top',marginTop - ($(this).children('ul').offset().top - $(this).offset().top) + 'px');
}
});
$('.menu_hs6 #nav_layer4B130ED22F0EFF25677797E92DE04B3D').find('li').hover(function(){
var direction=$("#layer4B130ED22F0EFF25677797E92DE04B3D").find('.nav1').attr('direction');
var height = parseInt($(this).outerHeight());
if($(this).parent().hasClass('navigation'))
{
$('#nav_layer4B130ED22F0EFF25677797E92DE04B3D .wp_subtop').removeClass("lihover").children('a').removeClass("ahover");
if(direction==1){
$(this).children('ul').css('top','auto').css('bottom',height + 'px');
}else{
$(this).children('ul').css('top',height+'px').css('bottom','auto');
}
$(this).children('a').css({'font-family':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-family",0),'font-size':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-size",0),'color':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("color",0),'font-weight':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-weight",0),'font-style':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-style",0)});
}else{
if(direction==1){
$(this).children('ul').css('top','auto').css('bottom', '-0px');
}else{
$(this).children('ul').css('top',height+'px').css('bottom','auto');
}
$(this).children('a').css({'font-family':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-family",1),'font-size':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-size",1),'color':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("color",1),'font-weight':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-weight",1),'font-style':layer4B130ED22F0EFF25677797E92DE04B3D_getSubMenuHoverCss("font-style",1)});
}
},function(){
if($(this).parent().hasClass('navigation'))
{
wp_showdefaultHoverCss('layer4B130ED22F0EFF25677797E92DE04B3D');
}
$(this).children('a').attr("style",'');
});
wp_showdefaultHoverCss('layer4B130ED22F0EFF25677797E92DE04B3D');
wp_removeLoading('layer4B130ED22F0EFF25677797E92DE04B3D');
});
},50);
var this_more_layer4B130ED22F0EFF25677797E92DE04B3D='#basic-modal-content_layer4B130ED22F0EFF25677797E92DE04B3D {display:none;} /* Overlay */ #simplemodal-overlay {background-color:#000;} /* Container */ #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D{height:502px; width:553px; color:#bbb;text-align:center;font-size:12px;color:#2F2F2F;font-family:Verdana,Arial,Helvetica,sans-serif,"宋体";} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D{height:502px; width:553px; color:#bbb;text-align:center;font-size:12px;color:#2F2F2F;font-family:Verdana,Arial,Helvetica,sans-serif,"宋体";} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .simplemodal-data {padding:0px;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .simplemodal-data {padding:0px;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D a{text-decoration: none;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D a{text-decoration: none;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .topban{ height:54px; padding-top:24px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .topban{ height:54px; padding-top:24px; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .topban .close{ background: url("/skin/images/close.gif") no-repeat scroll 0 0 transparent; color: #FFFFFF; display: block; height: 22px; margin-left: 465px; padding-left: 7px; padding-top: 3px; width: 77px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .topban .close{ background: url("/skin/images/close.gif") no-repeat scroll 0 0 transparent; color: #FFFFFF; display: block; height: 22px; margin-left: 465px; padding-left: 7px; padding-top: 3px; width: 77px; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain{ height: 424px; overflow-x: hidden; overflow-y: auto; text-align: left; padding-left:15px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain{ height: 424px; overflow-x: hidden; overflow-y: auto; text-align: left; padding-left:15px; background-color:#fff3bd; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td { font-size: 12px; line-height: 24px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td { font-size: 12px; line-height: 24px; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle { height: 33px; line-height: 40px; overflow: hidden; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle { height: 33px; line-height: 40px; overflow: hidden; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain a { background: none repeat scroll 0 0 transparent; font-family: "Microsoft Yahei"; font-size: 15px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain a { background: none repeat scroll 0 0 transparent; font-family: "Microsoft Yahei"; font-size: 15px; color:#a56f2f; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td a { background: url("/skin/images/arrow.gif") no-repeat scroll -1px 8px transparent; float: left; font-size: 12px; margin-left: 5px; padding: 0 5px 0 10px; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td a { background: url("/skin/images/arrow.gif") no-repeat scroll -1px 8px transparent; float: left; font-size: 12px; margin-left: 5px; padding: 0 5px 0 10px; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle{ overflow:hidden; }#wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle{ overflow:hidden; } #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle a{white-space:nowrap;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle a{white-space:nowrap;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td a.second_menu{white-space:nowrap;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td a.second_menu{white-space:nowrap;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .second_menu_container{overflow:hidden;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .second_menu_container{overflow:hidden;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title{text-align:left;padding-left:24px;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title{text-align:left;padding-left:24px;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title span{font-size:16px;font-family:arial;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title span{font-size:16px;font-family:Verdana,Arial,Helvetica,sans-serif,"宋体";} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title .wp_global_nav{position:relative;left:5px;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title .wp_webname{color:#fff;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title .wp_global_nav{position:relative;left:5px;color:#ffe373;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D a.second_menu{min-width:70px;} #wp-new_navigation-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D a.second_menu{min-width:70px;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D{border:3px solid #e04e0d;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D{background-color:#fff3bd;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain{background-color:#fff3bd;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list{background-color: #fff3bd;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list{border-bottom: 1px solid #f6e2a9;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td{color:#a56f2f;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain a{color:#a56f2f;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .navMain .list td .tle a{color:#eb4e08;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title .wp_webname{color:#fff;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .wp_product_category_title .wp_global_nav{color:#ffe373;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .topban .close:hover{color:#f8ffa5;} #wp-product_category-simplemodal-container_layer4B130ED22F0EFF25677797E92DE04B3D .second_menu_container a.second_menu:hover{color:#eb4e08;}';
this_more_layer4B130ED22F0EFF25677797E92DE04B3D=this_more_layer4B130ED22F0EFF25677797E92DE04B3D.replace(/[\r\n]/g, " ").replace(/\s+/g, " ");
get_plugin_css('_layer4B130ED22F0EFF25677797E92DE04B3D_',this_more_layer4B130ED22F0EFF25677797E92DE04B3D);
$(window).load(function(){
wp_heightAdapt($('#layer70B77BBC2C064C22F120FAB7AD0FA98D')); window.scroll_container_adjust();
var oriheight=$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').data('oriheight');
if(oriheight && $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').height()-oriheight>200){
setTimeout(function(){
wp_heightAdapt($('#layer70B77BBC2C064C22F120FAB7AD0FA98D')); window.scroll_container_adjust();
},1000)
}
});
function set_thumb_layer70B77BBC2C064C22F120FAB7AD0FA98D(obj) {
var callback=function(img){
img.fadeIn('slow',function(){
img.closest('.img,.wp-new-product-style-01-left').children('.imgloading').remove();
});
}
$(obj).each(function() {
var img=$(this);
callback(img);
});
}
$(function(){
$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find('.wp-new-ar-pro-style-description').each(function(){
if($(this).find('textarea').length){
$(this).html($(this).find('textarea').val());
}
})
})
if ("01" === "01") {
$(document).ready(function (){
var maxliheight = 0,tmplayerid = "#layer70B77BBC2C064C22F120FAB7AD0FA98D";
if (tmplayerid.length == 1) return;
var $tmpnode = '';
function maxHeightFunc() {
$tmpnode = $(tmplayerid+' li > .wp-new-article-style-c');
$tmpnode.css('height','auto');
maxliheight = Math.max.apply(null,$tmpnode.map(function(){
var self=$(this);
var bottom=$(this).find('.wp-new-ar-pro-style-description').filter(function(){
return $(this).css('display')!='none';
}).css('margin-bottom');
bottom=parseInt(bottom)||0;
return $(this).height()+bottom;
}).toArray());
var prdbacheight = '0';
if ("01" === "01" && prdbacheight != '0') {
maxliheight = prdbacheight;
}
if (maxliheight) $tmpnode.height(maxliheight);
}
maxHeightFunc();
setTimeout(maxHeightFunc,100);
// 右间距 2014/03/17
$(tmplayerid).unbind("fixedmarginright").bind("fixedmarginright", function(e, margin){
var $target = $(this),$li = $target.find('li.wp-new-article-style_lis');
if(margin != undefined) { $li.css("margin-right", margin+'px');}
else /*动态获取margin-right*/$li.css("margin-right", $li.filter(':first').css("margin-right"));
var $first = $li.filter(':first');
if($li.length > 0){
liwidth = $first.width() +
parseInt( $first.css("padding-left").match(/\d+/) ) + parseInt( $first.css("padding-right").match(/\d+/) ) +
parseInt( $first.css("border-left-width") ) * 2, //30、6 li的padding和border
mgnright = $._parseFloat($first.css("marginRight")),
maxwidth = $target.children('.wp-product_list_content').width();
if($.browser.msie && $.browser.version < 9){
liwidth = liwidth = $first.width() +
parseInt( $first.css("padding-left").match(/\d+/) ) + parseInt( $first.css("padding-right").match(/\d+/) );
}
var maxcols = Math.floor(maxwidth / (liwidth + mgnright));
if(maxwidth >= maxcols * (liwidth + mgnright) + liwidth) maxcols += 1;
for(var i = 1,licnt = $li.length; i <= licnt; i++){
if (i % maxcols != 0) continue;
if ((maxcols == 1) && (2*liwidth <= maxwidth)) continue;
$li.filter(':eq('+(i - 1)+')').css("margin-right", '0');
}
}
$curlayer = $li = null;
}).triggerHandler("fixedmarginright");
// <
0){
// fixed bug#4411
var nwidth = $._parseFloat('350'),
ihack = (nwidth && ($.browser.version<9) && ('Proportion'=='Proportion'))?true:false;
$imgs.each(function(){
if($(this).css('display') == 'inline'){
$(this).css('display','block');
// fixed bug#4411
ihack && $(this).parent('a').css({"display": 'inline-block',"width": nwidth+'px'});
}
});
}
}
}
inlineToDisplay();
});
var chromebug = $('#scroll_container').data('chrome_bug');
var imgcontainer = chromebug ? window : $('#scroll_container');
$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find('img.img_lazy_load').lazyload({
threshold : 300,
failure_limit : $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find('img.img_lazy_load').length,
container : imgcontainer,
placeholder:"//template/default/images/blank.gif",
load:function(){
var self=$(this);
var id=self.closest('.cstlayer').prop('id');
if(window['set_thumb_'+id]) window['set_thumb_'+id](this);
}
});
function showlazyimg(){
setTimeout(function(){
$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find('img.img_lazy_load').lazyload({
threshold : 300,
failure_limit : $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find('img.img_lazy_load').length,
container : $('#scroll_container'),
placeholder:"//template/default/images/blank.gif",
load:function(){
var self=$(this);
var id=self.closest('.cstlayer').prop('id');
if(window['set_thumb_'+id]) window['set_thumb_'+id](this);
}
});
},200)
}
showlazyimg();
$(function(){
var pageskips = '1';
var layerid = "layer70B77BBC2C064C22F120FAB7AD0FA98D",$cstlayer = $('#'+layerid),
$pglnker = $cstlayer.find('.wp-product_list_content .wp-pager_link');
$pglnker.find('a').unbind("click.te").bind("click.te", function(e,page){
var urlhrf = $(this).attr("href");
if(urlhrf.indexOf("##")>-1){
e.preventDefault();
e.stopPropagation();
var pageid = page||$(this).attr("href").replace("###",'');
if("" == "1") $.method.product_list.refreshProductList({"page":pageid,"layerid":layerid});
else {
var dom = $cstlayer.find('.product_list_save_itemList'),
params = {};
if(pageid!= $("#"+layerid).data("pagecid") && $("#"+layerid).data("pagecid")){
return false;
}
$.ajax({
type: "GET",
url: parseToURL("product_list","get_page"),
data: {product_category:"",product_category_more:"",layer_id: layerid,page: pageid},
success: function(data){
var $layer = $("#"+layerid);
var prediv = $layer;
prediv.data('pagecid',pageid);
setTimeout(function(){prediv.data('pagecid','');},500);
var oldHeight = $layer.find('.product_list-'+layerid).height();
$layer.children('.wp-product_list_content').before(data).remove();
doAdaptHeight($layer);
scrollPos();
setTimeout(function(){
doAdaptHeight($layer);
},1000)
}
});
function scrollPos(){
//explain:产品列表模块刷新后将页面定位到该模块距离浏览器顶部的距离,author:fpf,date:2014-12-18,action:modify;
//1/定位到网站页首2/定位到产品列表页首
if(pageskips == 1){
$('#scroll_container').scrollTop(0);
} else if(pageskips == 2){
var product_listtop = $cstlayer.css('top').replace('px','');
var father = $cstlayer.attr('fatherid')||'';
if(father){
var father_top = $('#'+father).css('top').replace('px','');
product_listtop = parseInt(product_listtop)+parseInt(father_top);
if($("#"+father).length>0){
var fathers = $("#"+father).attr('fatherid')||'';
if(fathers){
var father_tops = $('#'+fathers).css('top').replace('px','');
product_listtop = parseInt(product_listtop)+parseInt(father_tops);
}
}
}
setTimeout(function () {
if(product_listtop){$('#scroll_container').scrollTop(product_listtop);}
}, 500);
}
}
scrollPos();
}
return false;
}
});
//Ajax分页加载自适应高度处理
function doAdaptHeight(dom) {
var this_dom = dom;
this_dom.find(".wp-pager_link").css({'position':'relative','bottom':'auto','width':'100%'});
wp_heightAdapt(this_dom); var cheight = this_dom.find(".wp-product_content").height();
var oulheight = this_dom.find(".product_list-"+layerid).height();
var olkheight = this_dom.find(".wp-pager_link").outerHeight();
if(cheight>oulheight+olkheight){
this_dom.find(".wp-pager_link").css({'position':'absolute','bottom':'0px','width':'100%'})
}
}
if($.cookie('wp_layer_page_'+layerid) && $.cookie('wp_layer_page_'+layerid) != 1&&!$.browser.msie){
$pglnker.find('a:first').trigger('click',$.cookie('wp_layer_page_'+layerid));
}
// About input
$pglnker.find(':input').each(function(i,dom){
var $input = $(this),ent = pgid = '',fnc;
switch($input.attr("type")) {
case "text":
ent = 'keyup';
fnc = function(){
pgid = this.value = this.value.replace(/(?:\b0|[^\d+])/i,'');
//分页的style4样式的skin4皮肤,点击回车跳转到指定页面
var keycode = event.keyCode;
if (keycode == 13) {
var pagerstyle = $pglnker.parent().nextAll('.product_list_save_itemList').attr('pagerstyle');
var pstarr = pagerstyle.split('/'),pstyle = pstarr[0],pskin = pstarr[1];
if (pstyle == 'style4' && pskin == 'skin4') {
if (pgid.length && /^[1-9]{1}\d*$/.test(pgid)) {
var maxpg = _int($pglnker.find('span.total').html());
if(!maxpg) maxpg = 1;
var pagelink=$pglnker.find('a:first');
var urlhrf = pagelink.attr("href");
if(urlhrf.indexOf("##")>-1){
$pglnker.find('a').triggerHandler('click',[Math.min(pgid,maxpg)]);
}else{
urlhrf=urlhrf.replace(/\d+$/,Math.min(pgid,maxpg))
location.href=urlhrf;
}
}
}
}
function _int(numString){
var number = parseInt(numString);
if(isNaN(number)) return 0;
return number;
}
return false;
};
break;
case "button":
ent = 'click';
fnc = function(){
if (pgid.length && /^[1-9]{1}\d*$/.test(pgid)) {
var maxpg = _int($pglnker.find('span.total').html());
if(!maxpg) maxpg = 1;
$pglnker.find('a').triggerHandler('click',[Math.min(pgid,maxpg)]);
}
function _int(numString){
var number = parseInt(numString);
if(isNaN(number)) return 0;
return number;
}
return false;
};
break;
}
if(fnc && $.isFunction(fnc)) $input[ent](fnc);
});
});
$(window).load(function(){
$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find(".wp-pager_link").css({'position':'relative','bottom':'auto','width':'100%'});
wp_heightAdapt($('#layer70B77BBC2C064C22F120FAB7AD0FA98D')); var cheight = $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find(".wp-product_content").height();
var oulheight = $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find(".product_list-layer70B77BBC2C064C22F120FAB7AD0FA98D").height();
var olkheight = $('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find(".wp-pager_link").outerHeight();
if(cheight>oulheight+olkheight){
$('#layer70B77BBC2C064C22F120FAB7AD0FA98D').find(".wp-pager_link").css({'position':'absolute','bottom':'0px','width':'100%'})
}
})