function getieversion(){ if(navigator.appname == "microsoft internet explorer" && navigator.appversion .split(";")[1].replace(/[ ]/g,"")=="msie6.0") { return "ie6"; } else if(navigator.appname == "microsoft internet explorer" && navigator.appversion .split(";")[1].replace(/[ ]/g,"")=="msie7.0") { return "ie7"; } else if(navigator.appname == "microsoft internet explorer" && navigator.appversion .split(";")[1].replace(/[ ]/g,"")=="msie8.0") { return "ie8"; } else if(navigator.appname == "microsoft internet explorer" && navigator.appversion .split(";")[1].replace(/[ ]/g,"")=="msie9.0") { return "ie9"; } } $(function(){ $(".weixin").hover(function(){ $("img[src='images/weixinh.png']").attr('src','images/weixin.png'); },function(){ $("img[src='images/weixin.png']").attr('src','images/weixinh.png'); }) $(".weibo").hover(function(){ $("img[src='images/weiboh.png']").attr('src','images/weibo.png'); },function(){ $("img[src='images/weibo.png']").attr('src','images/weiboh.png'); }) }) $(function() { if($("#menu > div").length > 5){ $('#menu').slick({ slidestoshow:5, infinite:false }); if($("#menu .cur").length>0){ $("#menu").slick("slickgoto",$("#menu .cur").parent().data("slick-index")-4); } }else{ $('#menu').slick({ slidestoshow:5, infinite:false }); } }); $(function(){ $(".job ul li .jobtit").click(function(){ $(this).parent('li').toggleclass("active"); $(this).parent('li').find(".jobcon").toggleclass("slidedown"); }) $(".job ul li .jobcon").click(function(event){ $(this).show(); event.stoppropagation(); }) }) $(function(){ $(".nav ul li").hover(function(){ $(this).find("ul").addclass("slideright"); $(this).find("ul").show(); },function(){ $(this).find("ul").removeclass("slideright"); $(this).find("ul").hide(); }) }) $(function(){ $(".nav ul li ul li").hover(function(){ $(this).find(".three").show(); },function(){ $(this).find(".three").hide(); }) }) if (getieversion() !== "ie8") { new wow().init(); }; $(function(){ $('.banner').slick({ dots: true, autoplay:true, arrows:false, autoplayspeed:7000, }); $('.banner').on('beforechange',function(event, slick, currentslide, nextslide){ $('.slick-active').find(".banner_text1").fadeout(200); $('.slick-active').find(".banner_text2").fadeout(200); }); $('.banner').on('afterchange',function(event, slick, currentslide, nextslide){ $('.slick-active').find(".banner_text1").fadein(200); $('.slick-active').find(".banner_text2").fadein(200); }); $('.slides').slick({ dots: true, autoplay:true, arrows:false, autoplayspeed:6000, }); $(".fancybox").fancybox({ openeffect:"none", closeeffect:"none", maxheight:'500', maxwidth:'1000', minheight:'0', minwidth:'0' }); }); $(window).load(function(){ $('#loading').delay(300).hide(0); // settimeout(function(){ // // $('body').removeclass("scoll_dis"); // },300); }); $(function(){ $.fn.magnifying = function(){ var that = $(this), $imgcon = that.find('.big'), $img = $imgcon.find('img'), $drag = that.find('.magnifyingbegin'), $show = that.find('.magnifyingshow'), $showimg = $show.find('img'), $imglist = that.find('.small > .pic >img'), multiple = $show.width()/$drag.width(); $imgcon.mousemove(function(e){ $drag.css('display','block'); $show.css('display','block'); var ix = e.pagex - $(this).offset().left - $drag.width()/2, iy = e.pagey - $(this).offset().top - $drag.height()/2, maxx = $imgcon.width()-$drag.width(), maxy = $imgcon.height()-$drag.height(); ix = ix > 0 ? ix : 0; ix = ix < maxx ? ix : maxx; iy = iy > 0 ? iy : 0; iy = iy < maxy ? iy : maxy; $drag.css({left:ix+'px',top:iy+'px'}); $showimg.css({marginleft:-multiple*ix+'px',margintop:-multiple*iy+'px'}); }); $imgcon.mouseout(function(){ $drag.css('display','none'); $show.css('display','none'); }); $imglist.click(function(){ var nowsrc = $(this).data('bigimg'); $img.attr('src',nowsrc); $(this).parent().addclass('active').siblings().removeclass('active'); }); } $("#magnifier").magnifying(); }); $(function(){ $('input, textarea').placeholder(); });