function loader(bool) { var loading = $('#loading'); if(loading.length<=0){ return false; } if(bool){ loading.fadeOut(200); if($('#fullpage').length) { indexFullpage31();} if($('#fullpage2').length) { indexFullpage32();} if($('#fullpage3').length) { indexFullpage33();} return false; } var wrap = loading.find('.logo-wrap'), mask = loading.find('.load-mask'), ball = loading.find('.load-ball'); setTimeout(function () { mask.addClass('on'); setTimeout(function () { ball.addClass('on'); setTimeout(function () { loading.fadeOut(600); if($('#fullpage').length) { indexFullpage31();} if($('#fullpage2').length) { indexFullpage32();} if($('#fullpage3').length) { indexFullpage33();} },1200); },1200); },200); } function indexFullpage31(){ if($('#fullpage').length){ $('#fullpage').fullpage({ navigationPosition: 'left', //anchors: ['page1','page2','page3','page4','page5'], navigation: true, navigationTooltips: ['鍏充簬钃濇櫙','浼佷笟鏂囧寲','搴旂敤棰嗗煙','鍏ㄧ悆甯冨眬',''], loopBottom: true, loopTop: false, resize: !0, autoScrolling: true, scrollBar:false, showActiveTooltip:true, verticalCentered: true, fitToSection:false, afterRender: function(){ //棣栭〉banner if($('.newban .flexslider').length){ $('.newban .flexslider').flexslider({animation : 'slide', controlNav : true, directionNav : false, animationLoop : true, slideshow : true, useCSS: false,slideshowSpeed: 6000,animationSpeed: 500, pauseOnHover: false,pauseOnAction:false, mousewheel: false,startAt: 0, prevText:'<',nextText:'>', before: function (slider){ slider.pause(); slider.play();}, after:function(slider){ var i = slider.currentSlide; $('.newban .flexslider .slides li').removeClass('ac').eq(i+1).addClass('ac'); $('.newban .flexslider .flex-control-paging li').removeClass('ac').eq(i).addClass('ac');}, start:function(slider){ $('.newban .flexslider .slides li').removeClass('ac').eq(1).addClass('ac'); $('.newban .flexslider .flex-control-paging li').removeClass('ac').eq(0).addClass('ac');} }); } if($('.newnewban .flexslider').length){ $('.newnewban .flexslider').flexslider({animation : 'slide', controlNav : true, directionNav : true, animationLoop : true, slideshow : true, useCSS: false,slideshowSpeed: 8000,animationSpeed: 500, pauseOnHover: false,pauseOnAction:false, mousewheel: false,startAt: 0, prevText:'<',nextText:'>', before: function (slider){ slider.pause(); slider.play();}, after:function(slider){ var i = slider.currentSlide; $('.newnewban .flexslider .slides li').removeClass('ac').eq(i+1).addClass('ac'); $('.flexslider .flex-control-paging li').removeClass('ac').eq(i).addClass('ac');}, start:function(slider){ $('.newnewban .flexslider .slides li').removeClass('ac').eq(1).addClass('ac'); $('.newnewban .flexslider .flex-control-paging li').removeClass('ac').eq(0).addClass('ac');} }); } if( true){ $('.cvbanner').append('
'); $('.cvbanner').find('.chepic-scroll').hide(); $('.cvbanner').find('.ctrbox').show(); $('.section3').find('.peijianlist').show(); var imgs=[]; // var _path='__PUBLIC__'; var _path=''; $('.cvbanner .chepic-scroll img').each(function(i,oImg) {imgs.push(oImg.src) }); var initCanvasSlideshow = new CanvasSlideshow({ container:"cvbanner", pagination:".pagination", controls:".ctr", sprites: imgs, displacementImage: 'public/images/crystalize.jpg', displaceScale: [300, 300], fullScreen: true, centerSprites: true, wacky: true, stageWidth:1920, stageHeight:960, // displacementImage: 'public/images/clouds.jpg', // centerSprites: !1, // autoPlay: true, // autoPlaySpeed: [4, 5], after:function($this,$TgC,length){ $('.peijianlist').on("click","li",function(){ var i = $(this).index(); var idx = i;//var idx = i*2; $this[0].moveSlider( idx ); }); }, start:function($this,$TtC,idx,length){ //var i = Math.floor(idx/2); var i = idx; $('.peijianlist li').removeClass('on').eq(i).addClass("on"); $('.peijianlist2 li').removeClass('on').eq(i).addClass("on"); function setLoading(_dur,_cbk){ $this[0].xTimer=setTimeout(function(){ $this[0].next(); _cbk&&_cbk(); },_dur*1E3); } clearTimeout($this[0].xTimer); setLoading(4); } }); }else { $('.cvbanner').find('.chepic-scroll').show(); $('.cvbanner').find('.ctrbox').hide(); $('.section3').find('.peijianlist').hide(); if($('.chepic-scroll').length){ $('.chepic-scroll').flexslider({animation : 'slide', controlNav : true, directionNav : false, animationLoop : true, slideshow : true, useCSS: false,slideshowSpeed: 6000,animationSpeed: 500, pauseOnHover: false,pauseOnAction:false, mousewheel: false,direction:"horizontal",prevText:'<',nextText:'>', before: function (slider){ slider.pause(); slider.play(); var i2 = slider.animatingTo; var i3 = i2; //var i3 = Math.floor(i2/2); $('.peijianlist2 li').removeClass('on').eq(i3).addClass('on'); }, after:function(slider){ var i = slider.currentSlide; $('.chepic-scroll .flex-control-paging li').removeClass('ac').eq(i).addClass('ac');}, start:function(slider){ $('.chepic-scroll .flex-control-paging li').removeClass('ac').eq(0).addClass('ac'); $('.peijianlist2 li').removeClass('on').eq(0).addClass('on');} }); } } setTimeout(function(){$(window).trigger("resize")},100); if( $(window).width()>=1024 ) { $('.vd').length && $('.vd').get(0).play();} }, afterLoad: function(anchorLink, index){ if( index == 4 || index == 5){ $('.head,.navbtn,#fp-nav').addClass('special'); }else{ $('.head,.navbtn,#fp-nav').removeClass('special'); } if( index !=1 ){ // $(".nav,.navbtn").addClass("active"); $('.navvtwo').stop(true).fadeOut(0).removeClass('on'); $('.navvtwobg').stop(true).fadeOut(0); $('.head').removeClass('nvact'); }else{ // $(".nav,.navbtn").removeClass("active"); } }, onLeave: function(index,nextIndex){ if( (nextIndex ==1 || nextIndex ==5) && $(window).width()>=1024 ){ var obj = $('.section').eq(nextIndex-1).find('video'); obj.length && obj.get(0).play(); } } }); $(window).resize(function(){ autoScrolling() }); function autoScrolling(){ var $ww = $(window).width(); if($ww < 1024){ $.fn.fullpage.setAutoScrolling(false); } else { $.fn.fullpage.setAutoScrolling(true); } } autoScrolling(); $('.mouse').click(function(){ $.fn.fullpage.moveSectionDown() }) } } function indexFullpage32(){ if($('#fullpage2').length){ $('#fullpage2').fullpage({ navigationPosition: 'left', anchors: ['page1','page2','page3','page4','page5','page6','page7','page8','page9'], navigation: true, navigationTooltips: ['闆嗗洟浠嬬粛','浼佷笟姒傚喌','棰嗗鍥㈤槦','鍝佺墝鍘嗗彶','鑽h獕璧勮川','浼佷笟鏂囧寲','鐮斿彂涓庣敓浜?,'璐ㄩ噺鎺у埗',''], loopBottom: true, loopTop: false, resize: !0, autoScrolling: true, scrollBar:false, showActiveTooltip:true, verticalCentered: true, fitToSection:false, afterRender: function(){ if($('.wenhuapic-scroll').length){ $('.wenhuapic-scroll').flexslider({animation : 'slide', controlNav : true, directionNav : false, animationLoop : true, slideshow : true, useCSS: false,slideshowSpeed: 6000,animationSpeed: 500, pauseOnHover: false,pauseOnAction:false, mousewheel: false,direction:"horizontal",prevText:'<',nextText:'>', before: function (slider){ slider.pause(); slider.play();}, after:function(slider){ var i = slider.currentSlide; $('.wenhuapic-scroll .slides li').removeClass('ac').eq(i+1).addClass('ac');}, start:function(slider){ $('.wenhuapic-scroll .slides li').removeClass('ac').eq(1).addClass('ac');} }); } setTimeout(function(){$(window).trigger("resize")},100); }, afterLoad: function(anchorLink, index){ if( index == 14 || index == 15){ $('.head,.navbtn,#fp-nav').addClass('special'); }else{ $('.head,.navbtn,#fp-nav').removeClass('special'); } if( index !=1 ){ // $(".nav,.navbtn").addClass("active"); $('.navvtwo').stop(true).fadeOut(0).removeClass('on'); $('.navvtwobg').stop(true).fadeOut(0); $('.head').removeClass('nvact'); }else{ // $(".nav,.navbtn").removeClass("active"); } }, onLeave: function(index,nextIndex){ if( nextIndex ==9 && $(window).width()>=1024 ){ $('.section').eq(nextIndex-1).find('video').get(0).play();} if( nextIndex ==2){ setTimeout(function(){ $('.buildbox .build').eq(1).trigger('mouseover'); for (var j = 0; j < ctdemo2.length; j++) { ctdemo2[j].reset(); ctdemo2[j].start(); }; },500); } } }); $(window).resize(function(){ autoScrolling() }); function autoScrolling(){ var $ww = $(window).width(); if($ww < 1024){ $.fn.fullpage.setAutoScrolling(false); } else { $.fn.fullpage.setAutoScrolling(true); } } autoScrolling(); $('.mouse2').click(function(){ $.fn.fullpage.moveSectionDown() }) } } function indexFullpage33(){ if($('#fullpage3').length){ $('#fullpage3').fullpage({ navigationPosition: 'left', anchors: arr_fullpage3_anchors, navigation: true, navigationTooltips: arr_fullpage3_names, loopBottom: true, loopTop: false, resize: !0, autoScrolling: true, scrollBar:false, showActiveTooltip:true, verticalCentered: true, fitToSection:false, afterRender: function(){ setTimeout(function(){$(window).trigger("resize")},100); }, afterLoad: function(anchorLink, index){ Fullpage_Active_Index = index; if( index == 2 || index == 4){ $('.head,.navbtn,#fp-nav').addClass('special'); }else{ $('.head,.navbtn,#fp-nav').removeClass('special'); } if( index !=1 ){ // $(".nav,.navbtn").addClass("active"); $('.navvtwo').stop(true).fadeOut(0).removeClass('on'); $('.navvtwobg').stop(true).fadeOut(0); $('.head').removeClass('nvact'); }else{ // $(".nav,.navbtn").removeClass("active"); if( $(window).width() >= 1024 ){ $('.section').eq(0).find('.vd3').get(0).play(); $('.section').eq(0).find('i.playbtn').fadeOut(300); } } }, onLeave: function(index,nextIndex){ if( $(window).width() >= 1024 ){ anidesk[index-1] && anidesk[index-1].pause(); anidesk[nextIndex-1] && anidesk[nextIndex-1].play(); if(nextIndex ==4){ $('.section').eq(nextIndex-1).find('.vd3').get(0).play(); $('.section').eq(nextIndex-1).find('i.playbtn').fadeOut(300); }else{ $('.section').eq(nextIndex-1).find('i.playbtn').fadeIn(300); } }else{ //var vv3 =$('.section').eq(nextIndex-1).find('.vd3'); //vv3.length && vv3.get(0).play(); $('.section').eq(nextIndex-1).find('i.playbtn').fadeIn(300); //$('.section').eq(index-1).find('i.playbtn').fadeIn(300); } } }); $(window).resize(function(){ autoScrolling() }); function autoScrolling(){ var $ww = $(window).width(); if($ww < 1024){ $.fn.fullpage.setAutoScrolling(false); } else { $.fn.fullpage.setAutoScrolling(true); } } autoScrolling(); } } //棣栭〉banner //if($('#home_slider').length){ // $('#home_slider').flexslider({animation : 'slide', controlNav : true, directionNav : true, // animationLoop : true, slideshow : true, useCSS: false,slideshowSpeed: 6500,animationSpeed: 500, // pauseOnHover: false,pauseOnAction:false, mousewheel: false,startAt: 0, // before: function (slider){ slider.pause(); slider.play();},prevText:'<',nextText:'>', // after:function(slider){ var i = slider.currentSlide; // $('.slides li').removeClass('ac').eq(i+1).addClass('ac'); // $('.flex-control-paging li').removeClass('ac').eq(i).addClass('ac'); // $('#bannum').text('0' + (i+1)); // }, // start: function(){ // $('.slides li').removeClass('ac').eq(1).addClass('ac'); // $('.flex-control-paging li').removeClass('ac').eq(0).addClass('ac'); // $('#bannum').text('01'); // $('#bannumall').text('0' + slider.count); // } // }); //} //if($('.flexslider').length){ // var handpause=false;//棣栭〉瑙嗛鎵嬪姩鏆傚仠flag // var flextimer;//瑙嗛鎾斁寤舵椂璁℃椂鍣 // // $('.flexslider').flexslider({animation : 'slide', controlNav : true, directionNav : true, // animationLoop : false, slideshow : true, useCSS: false,slideshowSpeed: 5000,animationSpeed: 800, // pauseOnHover: false,pauseOnAction:false, mousewheel: false,startAt: 0,prevText:'<',nextText:'>', // after:function(slider){ var i = slider.currentSlide; // if(i==0 && !handpause){ // $('.vd').get(0).play();slider.pause(); // clearTimeout(flextimer); // flextimer = setTimeout( function(){ slider.play()},13000); // }else if(i!=0){ // clearTimeout(flextimer); // $('.vd').get(0).pause();slider.pause();slider.play(); // if(!handpause){ $('.vd').get(0).currentTime=0;} // } // $('.flexslider .slides li').removeClass('ac').eq(i).addClass('ac'); // $('.flex-control-paging li').removeClass('ac').eq(i).addClass('ac'); // $('#bannum').text('0' + (i+1)); // }, // start:function(slider){ // $('.flexslider .slides li').removeClass('ac').eq(0).addClass('ac'); // $('.flex-control-paging li').removeClass('ac').eq(0).addClass('ac'); // $('#bannum').text('01'); // $('#bannumall').text('0' + slider.count); // // $('.vd').get(0).play(); // slider.pause(); // clearTimeout(flextimer); // flextimer = setTimeout( function(){ slider.play()},13000); // } // }); // // $('.flexslider .vd').click(function(){ // var flex = $('.flexslider').data('flexslider'); // if(this.paused){ // this.play();flex.pause(); handpause = false; // clearTimeout(flextimer); // var t1 = this.duration,t2 = this.currentTime; // console.log(t1,t2); // flextimer = setTimeout( function(){ flex.play()},(t1-t2-3)*1000); // } // else{ // handpause = true; // clearTimeout(flextimer); // this.pause();flex.pause();flex.play(); // } // }) //}