/** * tabs * @return */ function tabs(tabtitle,tab_content,tabmore,event){ var index=$(tabtitle).children(".hover").index(); var tabhref = $(tabtitle).children(".hover").find('a').attr('href'); $(tab_content).children().eq(index).show().siblings().hide(); if(tabmore != "" || tabmore != undefined ){ $(tabmore).attr('href',tabhref); } $(tabtitle).children().bind(event,function(){ var index=$(this).index(); var tabhref = $(this).find('a').attr('href'); if(tabmore != "" || tabmore != undefined ){ $(tabmore).attr('href',tabhref); } $(this).addclass("hover").siblings().removeclass("hover"); $(tab_content).children().eq(index).show().siblings().hide(); return false; }); } function mytabsm(tabtitle,tab_content,tabmore,event){ var index=$(tabtitle).children(".hover").index(); var tabhref = $(tabtitle).children(".hover").find('a').attr('href'); $(tab_content).children().eq(index).show().siblings().hide(); if(tabmore != "" || tabmore != undefined ){ $(tabmore).attr('href',tabhref); } $(tabtitle).children().bind(event,function(){ var index=$(this).index(); var tabhref = $(this).find('a').attr('href'); if(tabmore != "" || tabmore != undefined ){ $(tabmore).attr('href',tabhref); } $(this).addclass("hover").siblings().removeclass("hover"); $(tab_content).children().eq(index).show().siblings().hide(); return false; }); } /*选择框*/ function selected(selectdiv){ $(selectdiv).attr("val","0") $(selectdiv).find(".seljg,i").click(function(){ var val=$(this).parent().attr("val") var nowtext=$(this).parent().find(".seljg").text().replace(/\s*/g,""); $(this).siblings(".seltj").find("a").each(function(index, element) { var seltext=$(this).text() if(seltext == nowtext){ $(this).addclass("hover") } }); //判断当前这个点击其他的隐藏 //下面这个if判断以单击写双击 if(val==1){ $(this).siblings(".seltj").hide() $(this).parent().attr("val","0") $(this).parent().css("zindex","0") }else{ $(this).siblings(".seltj").slidedown("fast"); $(this).parent().css("zindex","999999999999999").siblings().css("zindex","0") $(this).parent().siblings().find(".seltj").slideup("fast"); $(this).siblings(".seltj").find("a").click(function(){ var selecttext=$(this).text() $(this).addclass("hover").siblings().removeclass("hover") $(this).parent().siblings(".seljg").text(selecttext) $(this).parent().siblings("input").attr("value",selecttext) $(this).parent().css("display","none") $(this).parents(selectdiv).attr("val","0") }); $(this).parent().attr("val","1").siblings().attr("val","0") } //下面这段实现点击外层隐藏下拉 $(document).one("click", function() { //对document绑定一个影藏div方法 $(selectdiv).find(".seltj").hide(); $(selectdiv).attr("val","0"); $(selectdiv).css("zindex","0") }); //var obj = event.srcelement ? event.srcelement : event.target; //event.stoppropagation(); //阻止事件向上冒泡 event.stopimmediatepropagation(); }) $(selectdiv).click(function(event) { //event.stoppropagation(); //阻止事件向上冒泡 event.stopimmediatepropagation(); }); } //图片等比缩放 function scaleimg(){ $('.scalebox img').jqthumb({ width: $('.scalebox').outerwidth(), height: $('.scalebox').outerheight(), after: function(imgobj){ imgobj.css('opacity', 1).animate({opacity: 1},1000); } }); } function scaleimg2(){ $('.scalebox2 img').jqthumb({ width: $('.scalebox2').outerwidth(), height: $('.scalebox2').outerheight(), after: function(imgobj){ imgobj.css('opacity', 1).animate({opacity: 1},1000); } }); } //图片自适应居中 function autoimg(list,dom){ var img = new image(); var _w = $(dom).outerwidth(); var _h = $(dom).outerheight(); var scale1 = _h/_w; $(list).each(function(){ var imgw = $(this).find('img').width(); var imgh = $(this).find('img').height(); var scale2 = imgh/imgw; if(scale2>=scale1){ $(this).find('img').css({'height':'100%','left':'50%','margin-left':-((_h/scale2)/2)+'px'}); }else{ $(this).find('img').css({'width':'100%','top':'50%','margin-top':-((_w*scale2)/2)+'px'}); } }); } //wow 同一行 元素延迟加载 function wowdelay(box,row,delaytime){ $(box).children().each(function(index){ for(var i = 0;i1){ $(".foundplanslide").slide({ //titcell:".hd ul", maincell: ".bd ul", autopage:true, autoplay:false, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:1 }); $('.foundplanslide').hover(function(){ $(this).find('.prev').stop(true,true).animate({left:0}); $(this).find('.next').stop(true,true).animate({right:0}); },function(){ $(this).find('.prev').stop(true,true).animate({left:'-100%'}); $(this).find('.next').stop(true,true).animate({right:'-100%'}); }); }; //人才招聘 var nn=$(".rmtslide .bd dl dd").length; if(nn>3){ $(".rmtslide .bt").show(); } $(".rmtslide").slide({ titcell:".hd ul", maincell: ".bd dl", autopage:true, autoplay:false, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:3 }); $(".imglist_dl dd").hover(function(){ $(this).find('.imglistdeta').stop(true,true).animate({bottom: 0}) },function(){ $(this).find('.imglistdeta').stop(true,true).animate({bottom: '-80px'}) }); ////////////、、、、、、、、、、、关于俊发 var lilg=$(".aboutbox2slide .hd ul li").length,a=0,ulw=0; $(".aboutbox2slide .hd ul").width(138*lilg); $(".aboutbox2slide").slide({ titcell:".hd ul li", maincell: ".bd dl", autopage:false, autoplay:false, //自动播放 effect:"left", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:1, startfun:function(i){ var xl=i*138; if(xl>3*138&&xl<(lilg-4)*138){ $(".aboutbox2slide .hd ul").stop(true,false).animate({left:-xl+3*138}); }else if(i<5){ $(".aboutbox2slide .hd ul").stop(true,false).animate({left:0}); }; if(i>=(lilg-4)&&ulw>1110){ $(".aboutbox2slide .hd ul").stop(true,false).animate({left:-(lilg-8)*138}); }; $(".aboutbox2slide .bd dl dd").eq(i).find(".aboutbox2slide2").stop(true,true).fadein(1500); $(".aboutbox2slide .bd dl dd").eq(i).siblings().find(".aboutbox2slide2").stop(true,true).fadeout(); } }); // if(lilg>0){ ulw=$(".aboutbox2slide .hd ul").width(); }; if(ulw<1110){ $(".aboutbox2slide .hd ul").css({paddingleft:(1110-ulw),marginleft:-(1110-ulw)/2,paddingright:(1110-ulw),marginright:-(1110-ulw)}); $(".aboutbox2slide .hd ul").append('
  • ') }; //// $(".aboutbox2slide2").each(function(){ var _this=$(this); if($(this).find('.bd2 ul li').length>2){ $(this).slide({ titcell:".hd ul", maincell: ".bd2 ul", autopage:true, autoplay:true, //自动播放 effect:"toploop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev2", nextcell: ".next2", //scroll:2, vis:3, startfun:function(i){ _this.find(".bd2 ul li").eq(i+1).addclass("hover"); _this.find(".bd2 ul li").eq(i+1).siblings().removeclass("hover"); var imgsrc=_this.find(".bd2 ul li").eq(i+1).attr("dirimg"); var href=_this.find(".bd2 ul li").eq(i+1).find("a").attr("href"); _this.find(".piclbox").find("a img").attr("src",imgsrc); _this.find(".piclbox").find("a").attr("href",href); } }) $(this).find('.btbox .bt2').css('display','block'); }else{ //初始化 $(this).find(".bd2 ul li").eq(0).addclass("hover"); var imgsrc=_this.find(".bd2 ul li").eq(0).attr("dirimg"); var href=_this.find(".bd2 ul li").eq(0).find("a").attr("href"); $(this).find(".piclbox").find("a img").attr("src",imgsrc); $(this).find(".piclbox").find("a").attr("href",href); //鼠标感应 $(this).find(".bd2 ul li").hover(function(){ $(this).addclass("hover").siblings().removeclass('hover'); var imgsrc=$(this).attr("dirimg"); var href=$(this).find("a").attr("href"); $(this).parents('.aboutbox2slide2').find(".piclbox").find("a img").attr("src",imgsrc); $(this).parents('.aboutbox2slide2').find(".piclbox").find("a").attr("href",href); },function(){}); } }); //团队精英 if($('.aboutbox3slide .bd dl dd').length>1){ $(".aboutbox3slide").slide({ titcell:".hd ul", maincell: ".bd dl", autopage:true, autoplay:false, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 3000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", vis:1 }); $('.aboutbox3slide .bt').css({'display':'block'}); }; }); $(window).resize(function(){ bansize();//banner图高度 }); $(window).load(function(){ //内页导航 配合menu.jsp使用 //首页新闻选项卡 tabs('.ind1stl_tab','.ind1sttab','.ind1stltabmore','hover'); //业务 $(".business1").slide({ //titcell:".hd ul", maincell: ".bd dl", autopage:false, autoplay:false, //自动播放 effect:"leftloop", //左循环滚动 fold:淡入淡出 toploop:上循环滚动; leftloop:左循环滚动; delaytime: 1000, //切换时间 intertime: 4000, //切换间隔 trigger: "click", prevcell: ".prev", nextcell: ".next", //scroll:2, vis:5 }); });