; (function($) { "use strict"; var navbar = $('.header-area'); var nav_offset_top = $('.header-area').offset().top + 100; /*------------------------------------------------------------------------------- navbar -------------------------------------------------------------------------------*/ if($(document).height()>1500){ navbar.affix({ offset: { top: nav_offset_top, } }); navbar.on('affix.bs.affix', function() { if (!navbar.hasclass('affix')) { navbar.addclass('animated slideindown'); } }); navbar.on('affixed-top.bs.affix', function() { navbar.removeclass('animated slideindown'); }); } // // menu elevator animation // $(".navbar-default a[href*=\\#]:not([href=\\#])").on("click", function() { // if ( // location.pathname.replace(/^\//, "") == // this.pathname.replace(/^\//, "") && // location.hostname == this.hostname // ) { // var target = $(this.hash); // if (target.length) { // $("html,body").animate( // { // scrolltop: target.offset().top - 150 // }, // 1000 // ); // return false; // } // } // }); if ($(".menu-trigger").length) { $(".menu-trigger").on("click", function() { $(this).toggleclass("active"); $(".header-area .nav").slidetoggle(200); }); } /*----------------------------------------------------*/ /* main slider js /*----------------------------------------------------*/ function main_slider() { var $revsliderdiv = $('#main_slider'); if ($revsliderdiv.length && $.fn.revolution) { $revsliderdiv.revolution({ slidertype: "standard", sliderlayout: "auto", delay: 8000, disableprogressbar: "on", navigation: { onhoverstop: 'off', touch: { touchenabled: "on" }, arrows: { style: "gyges", enable: true, hide_onmobile: true, hide_onleave: true, left: { h_align: "left", v_align: "center", h_offset: 20, v_offset: 0 }, right: { h_align: "right", v_align: "center", h_offset: 20, v_offset: 0 } }, bullets: { enable: true, hide_onmobile: true, style: "normal", hide_onleave: true, //direction: "vertical", h_align: "center", v_align: "bottom", h_offset: 0, v_offset: 20, space: 10, tmp: '' } }, //responsivelevels: [4096, 1199, 992, 767, 480], //gridwidth: [1140, 970, 750, 700, 300], // gridheight: [600, 600, 600, 300, 300], gridwidth: [1920], gridheight: [700], lazytype: "smart" }); } } main_slider(); /*----------------------------------------------------*/ /* clients slider2 /*----------------------------------------------------*/ function feature_slider() { var $featuresliderdiv = $('.feature_slider_inner'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: true, margin: 0, items: 4, nav: true, autoplay: true, smartspeed: 1500, dots: false, navtext: ['', ''], responsiveclass: true, responsive: { 0: { items: 2, }, 600: { items: 2, }, 992: { items: 4, } } }); } } feature_slider(); /*----------------------------------------------------*/ /* testimonials slider /*----------------------------------------------------*/ function testimonials_slider() { var $testsliderdiv = $('.testimonials_slider'); if ($testsliderdiv.length && $.fn.owlcarousel) { $testsliderdiv.owlcarousel({ loop: true, margin: 0, items: 1, nav: true, autoplay: false, smartspeed: 1500, dots: true, navcontainer: ".testimonials_inner", navtext: ['', ''], responsiveclass: true, // responsive: { // 0: { // items: 1, // }, // 480: { // items: 2, // }, // 600: { // items: 4, // }, // 800: { // items: 6, // } // } }); } } testimonials_slider(); function feature_slider_home() { var $featuresliderdiv = $('.owl-demob'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ animateout: 'fadeoutup ', animatein: 'fadeinup', loop: true, margin: 0, items: 1, nav: false, autoplay: true, autoplaytimeout:6000, autoplayhoverpause:false, dots: false, navtext: ['', ''], responsiveclass: true, responsive: { 0: { items: 1, }, 600: { items: 1, }, 992: { items: 1, } } }); } } feature_slider_home(); function product_slider2() { var $teamsliderdiv = $('.product_thumb'); if ($teamsliderdiv.length && $.fn.owlcarousel) { $teamsliderdiv.owlcarousel({ loop: false, margin: 10, items: 4, nav: true, autoplay: false, autoplaytimeout:8000, smartspeed: 1500, autoplayhoverpause:true, dots: true, //navcontainer: ".testimonials_inner", navtext: ['', ''], responsiveclass: true, responsive: { 0: { items: 1, }, 400: { items: 1, }, 600: { items: 4, } } }); } } product_slider2(); function solution_list() { var $featuresliderdiv = $('.solution_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ animateout: 'fadeout ', animatein: 'fadein', loop: true, margin: 0, items: 1, nav: true, autoplay: true, autoplaytimeout:10000, autoplayhoverpause:false, smartspeed: 1500, dots: true, navtext: ['', ''], responsiveclass: true, lazyload: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 1, }, 600: { items: 1, }, 992: { items: 1, } } }); } } solution_list(); function feature_slider_yj() { var $featuresliderdiv = $('.news_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: true, margin: 20, items: 3, nav: true, autoplay: false, smartspeed: 1500, dots: false, lazyload: true, //autoplayhoverpause:true, navtext: ['', ''], responsiveclass: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 1, autoplay: 4000, }, 600: { items: 2, }, 992: { items: 3, } } }); } } feature_slider_yj(); function development_slider() { var $featuresliderdiv = $('.development_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: true, stagepadding: 10, margin: 40, items: 3, nav: true, autoplay: false, smartspeed: 1500, dots: false, lazyload: true, //autoplayhoverpause:true, navtext: ['', ''], responsiveclass: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 1, }, 600: { items: 2, }, 992: { items: 3, } } }); } } //development_slider(); function case_slider() { var $featuresliderdiv = $('#case_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: true, stagepadding: 10, margin: 40, items: 3, nav: true, autoplay: false, smartspeed: 1500, dots: false, lazyload: true, //autoplayhoverpause:true, navtext: ['', ''], responsiveclass: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 1, }, 600: { items: 2, }, 992: { items: 3, } } }); } } function callback(event) { $('body,html').animate({ scrolltop: $(window).scrolltop() + 1 }, 0); $('body,html').animate({ scrolltop: $(window).scrolltop() - 1 }, 0); } case_slider(); function product_slider() { var $featuresliderdiv = $('.owl-index-product'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: false, stagepadding: 10, margin: 40, items: 4, nav: true, autoplay: false, smartspeed: 1500, dots: true, lazyload: false, autoplayhoverpause:false, navtext: ['', ''], responsiveclass: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 1, loop:true, autoplay: 3000, }, 600: { items: 2, loop:true, autoplay: 3000, }, 992: { items: 4, } } }); } } product_slider(); /*----------------------------------------------------*/ /* testimonials slider /*----------------------------------------------------*/ function client_slider() { var $clientsliderdiv = $('.client_slider'); if ($clientsliderdiv.length && $.fn.owlcarousel) { $clientsliderdiv.owlcarousel({ loop: true, margin: 20, stagepadding:20, items: 5, nav: true, autoplay: false, autoplaytimeout:6000, autoplayhoverpause:false, dots: false, // navcontainer:".testimonials_inner", navtext: ['',''], responsiveclass: true, responsive: { 0: { items: 2, }, 600: { items: 3, }, 992: { items: 5, } } }); } } client_slider(); /*----------------------------------------------------*/ /* testimonials slider /*----------------------------------------------------*/ function team_slider() { var $teamsliderdiv = $('.our_team_slider'); if ($teamsliderdiv.length && $.fn.owlcarousel) { $teamsliderdiv.owlcarousel({ loop: true, margin: 30, items: 3, nav: false, autoplay: true, smartspeed: 1500, dots: false, responsiveclass: true, responsive: { 0: { items: 1, }, 400: { items: 2, }, 600: { items: 3, } } }); } } team_slider(); function main_pic_news() { var $featuresliderdiv = $('.picnews_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ animateout: 'fadeout', animatein: 'pulse', loop: true, margin: 0, items: 1, nav: true, autoplay: true, autoplaytimeout:5000, autoplayhoverpause:false, smartspeed: 450, dots: true, navtext: ['', ''], responsiveclass: false, responsive: { 0: { items: 1, }, 600: { items: 1, }, 992: { items: 1, } } }); } } main_pic_news(); function all_pic_news() { var $featuresliderdiv = $('.allpic'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ animateout: 'fadeout', animatein: 'fadein', loop: true, stagepadding:50, margin: 50, items: 1, nav: true, autoheight:true, autoplay: true, autoplaytimeout:5000, autoplayhoverpause:true, smartspeed: 1000, dots: false, navtext: ['', ''] }); } } all_pic_news(); function partner_slider() { var $featuresliderdiv = $('.partner_list'); if ($featuresliderdiv.length && $.fn.owlcarousel) { $featuresliderdiv.owlcarousel({ loop: true, margin: 10, items: 6, nav: false, autoplay: true, smartspeed: 800, dots: false, lazyload: true, autoplaytimeout:2000, autoplayhoverpause:false, navtext: ['', ''], responsiveclass: true, ondrag: callback, ontranslated:callback, responsive: { 0: { items: 2, }, 600: { items: 3, }, 992: { items: 6, } } }); } } partner_slider(); /*----------------------------------------------------*/ /* magnific popup /*----------------------------------------------------*/ var $zoomgallerydiv = $('.zoom-gallery'); if ($zoomgallerydiv.length && $.fn.magnificpopup) { $zoomgallerydiv.magnificpopup({ delegate: 'a', type: 'image', closeoncontentclick: false, closebtninside: false, mainclass: 'mfp-with-zoom mfp-img-mobile', gallery: { enabled: true }, zoom: { enabled: true, duration: 300, // don't foget to change the duration also in css opener: function(element) { return element.find('img'); } } }); } //置顶图标显示 $('#top-back').hide() $(window).scroll(function(){ if($(this).scrolltop() > 500){ $("#top-back").fadein(); } else{ $("#top-back").fadeout(); } }) var wow = new wow({ boxclass: 'wow', animateclass: 'animated', offset: 0, mobile: true, live: true }); wow.init(); })(jquery);