// JavaScript Document function dropMenu(obj){ $(obj).each(function(){ var theSpan = $(this); var theMenu = theSpan.find(".sub_menu"); var tarHeight = theMenu.height(); //theMenu.css({opacity:0}); theSpan.hover( function(){ $(this).addClass("selected"); theMenu.stop().show().animate({opacity:1},10); }, function(){ $(this).removeClass("selected"); theMenu.stop().animate({opacity:0},10,function(){ $(this).css({display:"none"}); }); } ); }); } $(function(){ // if($("#banner_carousel").size()>0){ $('#banner_carousel').owlCarousel({ autoplay:true, autoplayTimeout:6000, loop:true, margin:0, nav:true, navText: ['', ''], navClass: [ 'owl-prev fa fa-angle-left', 'owl-next fa fa-angle-right' ], responsive:{ 0:{ items:1 } } }) } // if($("#customer_carousel").size()>0){ $('#customer_carousel').owlCarousel({ autoplay:true, autoplayTimeout:6000, loop:true, margin:20, nav:true, navText: ['', ''], navClass: [ 'owl-prev fa fa fa-caret-left', 'owl-next fa fa fa-caret-right' ], responsive:{ 0:{ items:2 }, 450:{ items:3 }, 600:{ items:6 }, 800:{ items:7 } ,2000:{ items:7 } } }) } // if($("#about_carousel").size()>0){ $('#about_carousel').owlCarousel({ autoplay:true, autoplayTimeout:6000, loop:true, margin:0, nav:true, navText: ['', ''], navClass: [ 'owl-prev fa', 'owl-next fa' ], responsive:{ 0:{ items:1 } } }) } // if($("#news_carousel").size()>0){ $('#news_carousel').owlCarousel({ autoplay:true, autoplayTimeout:6000, loop:true, margin:0, nav:true, navText: ['', ''], navClass: [ 'owl-prev fa', 'owl-next fa' ], responsive:{ 0:{ items:1 } } }) } // if($("#ygfc_carousel").size()>0){$('#ygfc_carousel').owlCarousel({autoplay:2500,loop:true,margin:15,nav:true,navText: ['', ''],navClass: [ 'owl-prev fa', 'owl-next fa' ],responsive:{0:{items:1}}})} // var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: true, live: true }); wow.init(); // $(window).scroll(function(){ var top =$(window).scrollTop(); if(top>=162){ $("#top").addClass("scroll"); $("#scrollTop").show(); }else{ $("#scrollTop").hide(); $("#top").removeClass("scroll"); } }); $("#scrollTop,.fa-angle-up").click(function(event){ event.preventDefault(); $("html,body").animate({scrollTop:0},400) }); // $(".click_a").click(function(){ window.location.href=$(this).attr("lang"); }); // $("#menu_open font").click(function(){ if($(this).hasClass("on")){ $("html,body").css("overflow","visible"); $(this).removeClass("on"); $("#menu").hide(); }else{ $("html,body").css("overflow","hidden"); $(this).addClass("on"); $("#menu").show(); } }); // $("#play_ul p").click(function(){ $("#play_ul p").removeClass("on"); $(this).addClass("on"); var lang =$(this).attr("lang"); $(".video_play iframe").attr("src",lang); }); // // if($("#cert_carousel").size()>0){ $('#cert_carousel').owlCarousel({ autoplay:2500, loop:true, margin:25, nav:true, navText: ['', ''], navClass: [ 'owl-prev fa', 'owl-next fa' ], responsive:{ 0:{ items:3 }, 500:{ items:4 }, 800:{ items:4 }, 1300:{ items:5 },2500:{ items:5 } } }) } // $(".join_title i").click(function(){ if($(this).parent().parent().hasClass("on")){ $(this).parent().parent().removeClass("on"); }else{ $(this).parent().parent().addClass("on"); } }); // $(".pro_tab span").click(function(){ var lang =$(this).attr("lang"); var t = $("div[lang='"+lang+"']").offset().top; console.log(t); $("html,body").animate({scrollTop:t-100},400); $(".pro_tab span").removeClass("on"); $(this).addClass("on"); }); }) $(function(){ var MobileUA = (function() { var ua = navigator.userAgent.toLowerCase(); var mua = { IOS: /ipod|iphone|ipad/.test(ua), //iOS IPHONE: /iphone/.test(ua), //iPhone IPAD: /ipad/.test(ua), //iPad ANDROID: /android/.test(ua), //Android Device WINDOWS: /windows/.test(ua), //Windows Device TOUCH_DEVICE: ('ontouchstart' in window) || /touch/.test(ua), //Touch Device MOBILE: /mobile/.test(ua), //Mobile Device (iPad) ANDROID_TABLET: false, //Android Tablet WINDOWS_TABLET: false, //Windows Tablet TABLET: false, //Tablet (iPad, Android, Windows) SMART_PHONE: false //Smart Phone (iPhone, Android) }; mua.ANDROID_TABLET = mua.ANDROID && !mua.MOBILE; mua.WINDOWS_TABLET = mua.WINDOWS && /tablet/.test(ua); mua.TABLET = mua.IPAD || mua.ANDROID_TABLET || mua.WINDOWS_TABLET; mua.SMART_PHONE = mua.MOBILE && !mua.TABLET; return mua; }()); //SmartPhone if (MobileUA.SMART_PHONE) { // 缁夎濮╃粩顖炴懠閹恒儱婀撮崸鈧 $("#kefu_online").remove(); // document.location.href = 'http://www.aaa.com/wap/index.html'; } }); // function setH(){ if($(".product_lt").size()>0){ var a =$(".product_lt").height(); var b =$(".product_rt").height(); if($(window).width()<=1020){ $(".product_lt").removeAttr("style"); return false; } if(a0){ var a =$(".service_lt").height(); var b =$(".service_rt").height(); if($(window).width()<=1020){ $(".service_lt").removeAttr("style"); return false; } if(a=980){ dropMenu(".hasNav"); }else{ $(".hasNav").unbind("hover"); } // $(".hasNav a").click(function(event){ var size = $(this).next().size(); var width =$(window).width(); if(size>0 && width<=980){ event.preventDefault(); if($(this).hasClass("mon")){ $(this).removeClass("mon").find(".fa").removeClass("fa-angle-up").addClass("fa-angle-down");; $(this).next().removeAttr("style"); }else{ $(this).addClass("mon").find(".fa").removeClass("fa-angle-down").addClass("fa-angle-up"); $(this).next().show(); } } }) // $(window).resize(function(){ var width =$(window).width(); if(width>=980){ $(".sub_menu").removeAttr("style"); $(".hasNav a").removeClass("mon"); dropMenu(".hasNav"); }else{ $(".hasNav").unbind("hover"); $(".sub_menu").removeAttr("style"); } }); }) function openMenu() { $('div.burger').addClass('open'); $('div.y').fadeOut(100); $("nav").show(); $('#menu').height($(window).height()-70); setTimeout(function () { $('div.x').addClass('rotate30'); $('div.z').addClass('rotate150'); setTimeout(function () { $('div.x').addClass('rotate45'); $('div.z').addClass('rotate135'); }, 100); }, 10); $("html,body").css("overflow","hidden"); } function closeMenu() { $('#menu').removeAttr("style"); $("nav").removeAttr("style"); $('div.y').fadeIn(150); $('div.burger').removeClass('open'); $('div.x').removeClass('rotate45').addClass('rotate30'); $('div.z').removeClass('rotate135').addClass('rotate150'); setTimeout(function () { $('div.x').removeClass('rotate30'); $('div.z').removeClass('rotate150'); }, 50); setTimeout(function () { $('div.x, div.z').removeClass('collapse'); }, 70); $("html,body").css("overflow","visible"); }