$(function(){ $(".index_brand .logo_list .item").hover(function(){ var tex = $(this).find(".tex").html(); var _url = $(this).find(".tex").attr("data-url") || "javascript:;"; $(this).addclass("on").siblings().removeclass("on"); $(".index_brand .logo_text .inner").empty().html(tex); if(_url.indexof("javascript:;") > -1){ $(".index_brand .logo_text").addclass('logo_text_none') $(".index_brand .logo_text").removeattr('target') }else{ $(".index_brand .logo_text").removeclass('logo_text_none') $(".index_brand .logo_text").attr('target',"_blank"); } $(".index_brand .logo_text").attr("href",_url) },function(){}); $(".banner").slide({ titcell:".num",startfun:function(i,c){if(i==0){$('.btitle').hide()}else{$('.btitle').show()}},maincell:".pic",effect:"leftloop",vis:"auto",scroll:1,autopage:"
  • ",intertime:5000,delaytime:800,trigger:"click",autoplay:true,}); $(".language").hover(function() { $(this).children(".drop_down").stop().fadein(300); }, function() { $(this).children(".drop_down").stop().fadeout(200) }); $(".searchbar").hover(function() { $(this).children(".search").stop().fadein(300); }, function() { $(this).children(".search").stop().fadeout(200) }); $(".focusbox").slide({ titcell:".num li",maincell:".pic",effect:"leftloop",autoplay:true,trigger:"click",intertime:3500,delaytime:300,startfun:function(i,c){}}); $(".focusbox").slide({ titcell:".num li",maincell:".txt ul",effect:"leftloop",autoplay:true,trigger:"click",intertime:3500,delaytime:300,startfun:function(i,c){}}); }); function b(){ h = $(window).height(); t = $(document).scrolltop(); if(t > 500){ $('#top1').show(); }else{ $('#top1').hide(); } } b(); $(window).scroll(function(e){ b(); }); $('#top1').click(function(){ $(document).scrolltop(0); }); function ellipsis(elem,maxwidth) { $(elem).each(function(){ if($(this).text().length > maxwidth) { $(this).text($(this).text().substring(0,maxwidth)); $(this).html($(this).html()+'...'); } }); } ellipsis($(".w02right span"),270); function check() { if($("#searchwords").val().length < 1) { alert('请输入关键词'); return false; }else{ return true; } }