$(document).ready(function () { init(); }); $(window).load(function() { autosize(); }); function swiper(){ var myswiper = new swiper ('.banner .swiper-container', { direction: 'horizontal', pagination : '.pagination', loop: true, initialslide :0, speed:1500, autoplay:4000, autoplaydisableoninteraction:false, }) $('.banner .swiper-button-prev').click(function(){ myswiper.swipeprev(); }) $('.banner .swiper-button-next').click(function(){ myswiper.swipenext(); }) var myswiper2 = new swiper ('.newcenter .swiper-container', { direction: 'horizontal', pagination : '.pagination', loop: true, initialslide :0, speed:1000, autoplay:3000, autoplaydisableoninteraction:false, }) $('.newcenter .swiper-button-prev').click(function(){ myswiper2.swipeprev(); }) $('.newcenter .swiper-button-next').click(function(){ myswiper2.swipenext(); }) $('.newcenter .swiper-slide').mouseover(function(){ myswiper2.stopautoplay(); }) $('.newcenter .swiper-slide').mouseleave(function(){ myswiper2.startautoplay(); }) var myswiper3 = new swiper ('.investorenterpries .swiper-container', { direction: 'horizontal', pagination : '.pagination', loop: true, initialslide :0, speed:500, autoplay:3000, autoplaydisableoninteraction:false, }) $('.investorenterpries .swiper-button-prev').click(function(){ myswiper3.swipeprev(); }) $('.investorenterpries .swiper-button-next').click(function(){ myswiper3.swipenext(); }) if($('div[class="listenterpries"]').length<4){ myswiper3.stopautoplay(); } } $(document).on("click", ".types button", function() { $(this).siblings().removeclass("select"); $(this).addclass("select"); $("#"+$(this).attr("id")+"list").siblings().filter(".list ").addclass("hide"); $("#"+"rd_"+$(this).attr("id")).siblings().css('display','none'); $("#"+$(this).attr("id")+"list").removeclass("hide"); $("#"+"rd_"+$(this).attr("id")).css('display','block'); }); $(document).on("mouseenter", ".specialshow .spencialpanel", function() { if($(this).hasclass("foucss")){return;} $(this).addclass("foucss"); $(".paneltext").css("bottom","-48px"); $(this).find(".paneltext").animate({bottom:'5px'}); $(".panelbg").css("bottom","-50px"); $(this).find(".panelbg").animate({bottom:'0px'}); }); $(document).on("mouseleave", ".spencialpanel", function() { $(this).removeclass("foucss"); }); /*业务动态动画 var finish = true;; $(document).on("click", ".speciallogo", function() { if(!finish){return;} finish = false; $(".speciallogo").css("display","block"); $(".showdetail").css({"width":"0px","display":"none"}); $(".businessdynamiclist>li").each(function(){ var classname = $(this).attr("id")+"fixed"; $(this).removeclass(classname); }) $(this).css("display","none"); $(this).parent().find(".showdetail").css("overflow","hidden"); $(this).parent().find(".showdetail").css("display","block"); //$(".businessdynamic .show").animate({width:"0px"},"normal"); var indexnum = $(this).parent().index(); $(".businessdynamiclist>li:gt('"+indexnum+"')").each(function(){ var classname = $(this).attr("id")+"fixed"; $(this).addclass(classname); }) $(this).parent().find(".showdetail").animate({width:"888px"},"normal","swing",function(){finish=true;}); }); */ function autosize(){ var imgheight = $(".banner img.bannersmall").height(); $(".banner .swiper-container").height(imgheight); $(".banner .swiper-wrapper").height(imgheight); $(".banner .swiper-slide").height(imgheight); imgheight = $(".listenterpries img").height() * 3; $(".investorenterpries .swiper-container").height(imgheight); $(".investorenterpries .swiper-wrapper").height(imgheight); $(".investorenterpries .swiper-slide").height(imgheight); } /*公告滚动*/ function gonggaoscroll(){ $('.marquee').kxbdmarquee({ direction:'left', eventa:'mouseenter', eventb:'mouseleave' }); } //function tab(){ // settimeout(function tabssxw(){ // $('#ssxw').click(); // settimeout(function tabdjxw(){ // $('#djxw').click(); // settimeout(function tabjtyw(){ // $('#jtyw').click(); // tab(); // },5000); // },5000); // },5000); //} var point_v = 0; var swtimer = null; function autotab(){ var time=5000; if (swtimer != null) { cleartimeout(swtimer); } swtimer = settimeout(function(){ swtype( (point_v+1)%3 ); }, time); } function swtype(pv) { if(pv == 0){ $('#jtyw').addclass('select'); $('#djxw').removeclass('select'); $('#ssxw').removeclass('select'); $('#rd_jtyw').css('display','block'); $('#rd_ssxw').css('display','none'); $('#rd_djxw').css('display','none'); $('#jtywlist').removeclass('hide'); $('#djxwlist').addclass('hide'); $('#ssxwlist').addclass('hide'); point_v = 0; }else if(pv == 1){ $('#ssxw').addclass('select'); $('#jtyw').removeclass('select'); $('#djxw').removeclass('select'); $('#rd_jtyw').css('display','none'); $('#rd_ssxw').css('display','block'); $('#rd_djxw').css('display','none'); $('#ssxwlist').removeclass('hide'); $('#djxwlist').addclass('hide'); $('#jtywlist').addclass('hide'); point_v = pv; }else if(pv == 2){ $('#djxw').addclass('select'); $('#ssxw').removeclass('select'); $('#jtyw').removeclass('select'); $('#rd_jtyw').css('display','none'); $('#rd_ssxw').css('display','none'); $('#rd_djxw').css('display','block'); $('#djxwlist').removeclass('hide'); $('#jtywlist').addclass('hide'); $('#ssxwlist').addclass('hide'); point_v = pv; } autotab(); } function init(){ $("#home").addclass("select"); // 专题页面跳转 $('.spencialpanel').on('click', function(){ window.open($(this).attr('href')); }); $('.panelmobile').on('click', function(){ window.open($(this).attr('href')); }); $('.link').on('click', function(){ window.open($(this).attr('href')); }); swiper(); window.onresize = autosize; gonggaoscroll(); $(".typetab").click(function(){ if (swtimer != null) { cleartimeout(swtimer); } swtype(parseint($(this).data("p"))); }); settimeout(function tabssxw(){ $('#ssxw').click(); autotab(); },5000); }