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").click(function(){ $(this).toggleclass("active"); $(this).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:3000, }); var _li_length = $(".banner .slick-dots li").size() $(".banner .slick-dots li").each(function(){ var _but_text = $(this).find('button').text() _but_text = _but_text $(this).find('button').text(_but_text) }); $(".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(); });