function zs(id,id1){ $(".bocweb-header .nav-li").eq(id).addClass("active").find(".nav-top").addClass("active"); // $(".bocweb-header .nav-li.active .nav-bot .li").eq(id1).addClass("active"); } function ab(a,b){ $(".about-contact .about-contact-tit .items").on("mouseenter",function(){ var _index = $(this).index(); $(".about-contact .about-contact-txt").addClass("active").eq(_index).show().siblings().hide().removeClass("active"); }) $(".about-contact .about-contact-tit .items").eq(a).mouseenter(); $(".inside2 .about-hbox .about-contact-txt.active .items").eq(b).addClass("active"); $(".about-contact .about-contact-tit .items").eq(a).addClass("active"); // $(".bocweb-header .nav-li.active .nav-bot .li").eq(a).addClass("active"); } function scrollAnimation2(ele) { $(ele).each(function() { var _this = $(this); if (_this.offset().top > $(window).scrollTop() + $(window).height() || _this.offset().top < $(window).scrollTop() - _this.outerHeight()) { // _this.removeClass('animate'); } else if ($(window).scrollTop() >= _this.offset().top - $(window).height() * 1) { _this.addClass('animate'); setInterval(function(){ $("body").addClass("avh0"); },50) // _this.find(".k10 .ul").addClass('animate'); _this.find(".loading-sw").remove(); } }); $(window).scroll(function(){ $(ele).each(function() { var _this = $(this); if (_this.offset().top > $(window).scrollTop() + $(window).height() || _this.offset().top < $(window).scrollTop() - _this.outerHeight()) { // _this.removeClass('animate'); } else if ($(window).scrollTop() >= _this.offset().top - $(window).height() * 1) { // console.log($(window).scrollTop() ,_this.offset().top - $(window).height() * 0.8) _this.addClass('animate'); // _this.find(".k10 .ul").addClass('animate'); _this.find(".loading-sw").remove(); } }); }); } function Remove(ele){ $(ele).contents().filter(function() { return this.nodeType === 3; }).remove(); } Remove(".pagination,.kh") scrollAnimation2($('.secwen')); function clickVideo(selector){ var video = document.getElementById('video'); selector.on('click',function(){ var videoSrc = $(this).attr('data-src'); $('#video').attr('src',videoSrc); $('.video-fixed').stop().fadeIn(); video.play(); }) $('.video-fixed .cha').on('click',function(){ $('.video-fixed').stop().fadeOut(); video.pause(); $('#video').attr('src',""); }) $(".video-fixed").on("click",function(){ $(".video-fixed").fadeOut(); $('#video').attr('src',""); }) $(".video-fixed .videoboxs").on("click",function(e){ e.stopPropagation() }) } function visual_button_scroll_down(){ $(".idem").each(function(){ $(this).on('click',function(){ var target = $(this).attr('href'); var target_top = $(target).offset().top-64; $('html,body').animate({ scrollTop : target_top },800, 'easeInOutQuad'); return false; }); }) } visual_button_scroll_down(); $(".appli-details01 .apli").each(function(item){ var _k0 = $(".bocweb-header").innerHeight(); var _kh = $(".joinbot-tit").innerHeight(); var g =_k0 + _kh +100; var i = $(this).index(); var j = i+1; $(".join-bot .joinbot-tit .li").eq(0).addClass("active"); function serve(){ if(j == $(".appli-details01 .apli").length){ if($(window).scrollTop() >= ($(".appli-details01 .apli").eq(i).offset().top - g)){ $(".join-bot .joinbot-tit .li").eq(i).addClass("active").siblings().removeClass("active"); } }else{ var k = i -1; var _kh = $(".joinbot-tit").innerHeight(); if($(window).scrollTop() >= ($(".appli-details01 .apli").eq(i).offset().top - g) & $(window).scrollTop() < ($(".appli-details01 .apli").eq(j).offset().top) - g){ $(".join-bot .joinbot-tit .li").eq(i).addClass("active").siblings().removeClass("active"); } } } $(window).scroll(function(){ serve (); }) }); // window.addEventListener('scroll', function(event) { // var depth, layer, layers, movement, topDistance, translate3d, _i, _len; // topDistance = this.pageYOffset; // layers = document.querySelectorAll("[data-type='parallax']"); // for (_i = 0, _len = layers.length; _i < _len; _i++) { // layer = layers[_i]; // depth = layer.getAttribute('data-depth'); // movement = -(topDistance * depth/5); // // translate3d = 'translate3d(0, ' + movement + 'px, 0)'; // translate3d = 'matrix(1, 0, 0, 1, 0 , ' + movement + ')'; // layer.style['-webkit-transform'] = translate3d; // layer.style['-moz-transform'] = translate3d; // layer .style['-ms-transform'] = translate3d; // layer.style['-o-transform'] = translate3d; // layer.style.transform = translate3d; // } // }); if($("body").hasClass("about-body")){ zs(6,0); } if($("body").hasClass("news-body")){ zs(6,0); }