$(function () { //navigation $(".navigation li:last").css({"margin-right":"0"}); $(".index_pro_ec a:last").css({"border":"none"}); //下拉菜单 $(".navigation li").hover(function () { $(this).find(".navToggle").stop(true, true).slideDown(); },function(){ $(this).find(".navToggle").stop(true, true).slideUp(); }); //底部 $(".foot_ban .overE a").hover(function () { $(this).stop(true, true).animate({"margin-top": "-5px"}); },function(){ $(this).stop(true, true).animate({"margin-top": "0px"}); }); //人力资源 $(".bo").click(function(){ $(".bo").removeClass("cz_current").next().hide(); $(this).addClass("cz_current").next().slideDown(800); return false; // $(this).next(".czem_a_cont").slideToggle(); // $(this).find(".a span").toggleClass("cz_current"); }); //搜索 $(".index_ser input[type='text']").each(function() { $(this).focus(function() { $(this).css({"background":"none"}); }); }); //产品 var $ps_big = $(".index_pro_re").children();//$ps_big只是命名 $(".index_pro_re").append($ps_big.clone()); $(".index_pro_u li").live("click",function(){ var index = $(this).index(); $(".index_pro_u li a").removeClass("hover").eq(index).addClass("hover"); $(".index_pro_rb").fadeOut().eq(index).fadeIn(); }); $(".hu_u li").live({ mouseenter: function () { $(this).stop().animate({ "margin-top": "-5px" }); }, mouseleave: function () { $(this).stop().animate({ "margin-top": "0px" }); } }); //客服 $(window).scroll(function(){$(this).scrollTop()>150?$(".keFu").fadeIn():$(".keFu").fadeOut()}); $(".keFu li").hover(function () { $(this).find(".keZ").stop(true, true).animate({"left": -$(".keZ").width()},500); $(this).find(".kCd").stop(true, true).fadeIn(); // $(this).find(".kCd").stop(true, true).animate({"left": -$(".kCd").width() - 10},500); },function(){ $(this).find(".keZ").stop(true, true).animate({"left": $(".keZ").width()},500); $(this).find(".kCd").stop(true, true).fadeOut(); // $(this).find(".kCd").stop(true, true).animate({"left": $(".kCd").width()},500); }); //返回顶部 function backtop(){ var fn = function(){ $('html,body').animate({ scrollTop: '0px' },1000); return false; } $('.kBack').bind('click',fn); } backtop(); });