$(function () { $("a").focus(function () { this.blur(); }); //搜索s $(".search .icon").click(function () { $(".search .icon").hide(); $(".searchbox").show(); }); //搜索end $(".homelink .item").hover(function () { $(this).find("dd").stop(true, true).slideup(); $(this).addclass("on"); }, function () { $(this).find("dd").stop(true, true).slidedown(); $(this).removeclass("on"); }); // $(".homenotice .box li").each(function (i, item) { if (number(i - 1) % 2 == 0) { $(this).addclass("bg"); } }); // $(".newsnotice li").each(function (i, item) { if (number(i - 1) % 2 == 0) { $(this).addclass("next"); } }); // $(".zcfgbox li").each(function (i, item) { if (number(i - 1) % 2 == 0) { $(this).addclass("next"); } }); // $(".openbtn").click(function () { $(this).toggleclass("on"); $(".mainnav").slidetoggle(); $(".mstbg").fadetoggle(); $(".closebtn").slidetoggle(1000); }); // // $(".closebtn").click(function () { // $(".openbtn").removeclass("on"); // $(".mainnav").animate({ right: "-150px" }); // $(".mstbg").fadeout(); // $(".closebtn").fadeout(0); // }); // $('.jbbtn').click(function () { $('html,body').animate({ scrolltop: $('.wsjbbox').offset().top }, 800); }); $('a[href*=#]').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetoffset = $target.offset().top; $('html,body').animate({ scrolltop: targetoffset }, 1000); return false; } } }); $(".homescope .effict li").each(function () { var flag = $(this).find(".moretxt").text().trim().length == 0; if (flag == true) { $(this).find(".moretxt").hide(); } }) }); var offset = 200, offset_opacity = 1200, scroll_top_duration = 1000, $back_to_top = $('.cd-top'); $(window).scroll(function () { ($(this).scrolltop() > offset) ? $back_to_top.addclass('cd-is-visible') : $back_to_top.removeclass('cd-is-visible'); }); $('.cd-top').click(function () { $('html,body').animate({ scrolltop: '0px' }, 800); }); //返回顶部 jquery(".mainnav li").bind("mouseover", function () { jquery(this).find(".navpull").stop(true, true).slidedown(); jquery(this).addclass("onnav"); }) jquery(".mainnav li").bind("mouseleave", function () { jquery(this).find(".navpull").stop(true, true).slideup(); jquery(this).removeclass("onnav"); }) $(".hrlist li").each(function () { var btn = $(this).find(".jobtitle").find("table"); btn.click(function () { var statis = $(this).parents("li").find(".txtcont").css("display"); if (statis == "none") { $(this).parents("li").siblings().removeclass("current"); $(this).parents("li").siblings().find(".txtcont").slideup(500); $(this).parents("li").addclass("current"); $(this).parents("li").find(".txtcont").slidedown(500); } else { $(this).parents("li").find(".txtcont").slideup(500); $(this).parents("li").removeclass("current"); } }); }); //人才招聘 $(function () { var win = $(window); var wintop = 0; var winhei = win.height() * 0.7; var winhei2 = win.height() * 0.8; var anm1 = $("#anm1"); var anm2 = $("#anm2"); var anm3 = $("#anm3"); var anm4 = $("#anm4"); var anm5 = $("#anm5"); var anm6 = $("#anm6"); var anm7 = $("#anm7"); var anm8 = $("#anm8"); var anm9 = $("#anm9"); var anm10 = $("#anm10"); var anm11 = $("#anm11"); var anm12 = $("#anm12"); win.resize(function (e) { winhei = win.height() * 0.7; winhei2 = win.height() * 0.8; }); win.scroll(function () { wintop = win.scrolltop(); scroll_fun(wintop); }); function scroll_fun(t) { if (anm1.length > 0) { if (t >= anm1.offset().top - winhei) { anm1.addclass("anm"); } } if (anm2.length > 0) { if (t >= anm2.offset().top - winhei2) { anm2.addclass("anm"); } } if (anm3.length > 0) { if (t >= anm3.offset().top - winhei) { anm3.addclass("anm"); } } if (anm4.length > 0) { if (t >= anm4.offset().top - winhei) { anm4.addclass("anm"); } } if (anm5.length > 0) { if (t >= anm5.offset().top - winhei) { anm5.addclass("anm"); } } if (anm6.length > 0) { if (t >= anm6.offset().top - winhei) { anm6.addclass("anm"); } } if (anm7.length > 0) { if (t >= anm7.offset().top - winhei) { anm7.addclass("anm"); } } if (anm8.length > 0) { if (t >= anm8.offset().top - winhei) { anm8.addclass("anm"); } } if (anm9.length > 0) { if (t >= anm9.offset().top - winhei) { anm9.addclass("anm"); } } if (anm10.length > 0) { if (t >= anm10.offset().top - winhei) { anm10.addclass("anm"); } } if (anm11.length > 0) { if (t >= anm11.offset().top - winhei) { anm11.addclass("anm"); } } if (anm12.length > 0) { if (t >= anm12.offset().top - winhei) { anm12.addclass("anm"); } } } scroll_fun(0); }) $(".historylist li .btn").click(function () { $(this).parents("li").toggleclass("on"); });