$(function () { //公众平台下拉 $('.head .head_ .top dl dt .xl a').click(function () { $('.head .head_ .top dl dt .jiao1').slidetoggle(); $('.head .head_ .top dl dt ul').slidetoggle(); }); $('.head .head_ .nav dl dd').hover(function () { $(this).find('.jiao2').show(); $(this).find('ul').stop(true, true).slidedown(); $(this).addclass(''); }, function () { $(this).find('.jiao2').hide(); $(this).find('ul').stop(true, true).slideup(); $(this).removeclass('hover'); }); for (var i = 0; i < $('.cplist ul li').length; i += 4) { $('.cplist ul li').eq(i).css('margin-left', 0) } /*二级导航css样式*/ var index =''; $(".onlinemsg").each(function(){ if($(this).hasclass("activexk")){ index = $(this).index(); } }); $(".onlinemsg").hover(function(){ $(this).find("a").addclass("way"); $(this).siblings().find("a").removeclass("way"); }); $(".xiank .message").mouseleave(function(){ $(".onlinemsg").find("a").removeclass("way"); $(".onlinemsg").eq(index).find("a").addclass("way"); }); $(".head .head_ .nav dl dd ul li a").removeclass("on"); //tab // $(function () { // tabs(".cybk .title h2 a"); // var height = $(window).height(); // $(".gudingcc").css("top",(height-227)/2+"px"); // }); // function tabs(obj) { // var len = $(obj).length; // $(obj).first().addclass("active"); // $(obj).parent().siblings(".more:first").show(); // $(obj).parent().parent().siblings(".tabli:first").show(); // $(obj).click(function () { // var index = $(obj).index(this); // $(obj).removeclass("active").eq(index).addclass("active"); // $(obj).parent().siblings(".more").hide().eq(index).show(); // $(obj).parent().parent().siblings(".tabli").hide().eq(index).show(); // }); // }; }); $(window).bind('load resize',function(){ var pmwidth = $(window).width(), pmheight = $(window).height(); $('.industry ul li').eq(0).addclass('in'); var s = parseint(pmwidth*0.2); var l = pmwidth - s * 3; $('.industry ul li').width(s); $('.industry ul li').eq(0).width(l); var index = ''; $('.industry ul li').hover(function(){ $(this).stop(true,true).animate({width:l},1100).siblings().stop(true,true).animate({width:s},1100); $(this).find(".icon").css("bottom","80px"); $(this).find(".icon").stop(true,true).animate({bottom:215},1100); $(this).addclass('in').siblings().removeclass('in'); },function(){ }); }); /*$(window).bind('scroll',function(){ var height = $(window).height(); var scrolltop = $(window).scrolltop(); if(scrolltop > height/2){ $(".guanfangss").slidedown(); }else{ $(".guanfangss").slideup(); } });*/