if(isIE6){ try {document.execCommand("BackgroundImageCache", false, true);} catch(r) {} } //添加到收藏夹 function AddToFavorite() { if (document.all){ window.external.addFavorite(window.location,document.title); }else if (window.sidebar){ window.sidebar.addPanel(document.title, window.location, ""); } } $(function(){ /* hover子菜单时保持顶级选中 */ $('#ddmenu2>li').hover(function(){ $(this).parent().prev('a').addClass('current'); },function(){ $(this).parent().prev('a').removeClass('current'); }); }); $(function(){ $('.menu li').each(function(e){ IDs =$(this).attr("id"); if(IDs=="hot"){ if($(this).children('ul').length<=0) $(this).parent().parent().attr('id', 'hot');//点击菜单,下拉菜单选中,父级也选中 } if($('.menu').width()<=800){ $('.menu a').css({"fontSize":"14px","padding":"0px 5px"}); } }); //产品列表 图片居中 $("#p_img img").each(function(e){ var $el = $(this); setTimeout(function(){ var Pheight = $("#p_img").height(); var Iheight = $el.height(); if(Pheight > Iheight){ $el.css("marginTop",(Pheight-Iheight)/2); }else{ $el.height(175); }; }, 500); }); //$(".dmain2").width($(window).width()-160*2-275); /* if($(".dmain1").height()>$(".dmain2").height()){ $(".dmain2").height($(".dmain1").height()); }*/ });