function btn_effect() { $('.btn_box').each(function () { var $circlesTopLeft = $(this).find('.circle.top-left'); var $circlesBottomRight = $(this).find('.circle.bottom-right'); var tl = new TimelineLite(); var tl2 = new TimelineLite(); var btTl = new TimelineLite({ paused: true }); tl.to($circlesTopLeft, 1.2, { x: -25, y: -25, scaleY: 2, ease: SlowMo.ease.config(0.1, 0.7, false) }); tl.to($circlesTopLeft.eq(0), 0.1, { scale: 0.2, x: '+=6', y: '-=2' }); tl.to($circlesTopLeft.eq(1), 0.1, { scaleX: 1, scaleY: 0.8, x: '-=10', y: '-=7' }, '-=0.1'); tl.to($circlesTopLeft.eq(2), 0.1, { scale: 0.2, x: '-=15', y: '+=6' }, '-=0.1'); tl.to($circlesTopLeft.eq(0), 1, { scale: 0, x: '-=5', y: '-=15', opacity: 0 }); tl.to($circlesTopLeft.eq(1), 1, { scaleX: 0.4, scaleY: 0.4, x: '-=10', y: '-=10', opacity: 0 }, '-=1'); tl.to($circlesTopLeft.eq(2), 1, { scale: 0, x: '-=15', y: '+=5', opacity: 0 }, '-=1'); var tlBt1 = new TimelineLite(); var tlBt2 = new TimelineLite(); tlBt1.set($circlesTopLeft, { x: 0, y: 0, rotation: -45 }); tlBt1.add(tl); tl2.set($circlesBottomRight, { x: 0, y: 0 }); tl2.to($circlesBottomRight, 1.1, { x: 30, y: 30, ease: SlowMo.ease.config(0.1, 0.7, false) }); tl2.to($circlesBottomRight.eq(0), 0.1, { scale: 0.2, x: '-=6', y: '+=3' }); tl2.to($circlesBottomRight.eq(1), 0.1, { scale: 0.8, x: '+=7', y: '+=3' }, '-=0.1'); tl2.to($circlesBottomRight.eq(2), 0.1, { scale: 0.2, x: '+=15', y: '-=6' }, '-=0.2'); tl2.to($circlesBottomRight.eq(0), 1, { scale: 0, x: '+=5', y: '+=15', opacity: 0 }); tl2.to($circlesBottomRight.eq(1), 1, { scale: 0.4, x: '+=7', y: '+=7', opacity: 0 }, '-=1'); tl2.to($circlesBottomRight.eq(2), 1, { scale: 0, x: '+=15', y: '-=5', opacity: 0 }, '-=1'); tlBt2.set($circlesBottomRight, { x: 0, y: 0, rotation: 45 }); tlBt2.add(tl2); btTl.add(tlBt1); btTl.to($(this).parent().find('.button.effect-button'), 0.8, { scaleY: 1.1 }, 0.1); btTl.add(tlBt2, 0.2); btTl.to($(this).parent().find('.button.effect-button'), 1.8, { scale: 1, ease: Elastic.easeOut.config(1.2, 0.4) }, 1.2); btTl.timeScale(2.6); $(this).on('mouseenter', function () { btTl.restart(); }); }); } function mo_effect() { setTimeout(function () { $(".medical_wrap .con_box li:first-of-type").addClass("mo_active"); $(".medical_wrap .medical_img .bg_box:first-of-type").addClass("mo_active"); }, 200); } $(document).ready(function () { mo_effect(); }); function value() { $(".medical_wrap .con_box li").on("mouseenter", function () { $(".medical_wrap .con_box li").removeClass('active'); $(this).addClass('active'); }); $(".medical_wrap .con_box li").each(function (index, item) { var bg_num = index + 1; $(item).on("mouseenter", function () { $(".medical_img .bg_box").removeClass("active"); $(".medical_img .bg_box_0" + bg_num).addClass("active"); $(".medical_wrap .tab_box .tabMenu li").removeClass("active"); $(".medical_wrap .tab_box .tabMenu .tab_menu_0" + bg_num).addClass("active"); }); }); $(".medical_wrap .tab_box .tabMenu li").click(function () { var activeTab = $(this).attr("data-tabNumb"); $(".medical_wrap .tab_box .tabMenu li").removeClass("active"); $(this).addClass("active"); $(".medical_wrap .con_box li").removeClass("active"); $("#" + activeTab).addClass("active"); $(".medical_img .bg_box").removeClass("active"); $("#" + activeTab + "_bg").addClass("active"); }); } $(document).ready(function () { value(); btn_effect(); }); $(function(){ // custom_cursor(); // $(document).ready(function(){ // if($("body").addClass("on")){ // } // }); // var gallerySlide = new Swiper('.best_product', { // slidesPerView: '3', // autoplay: { // delay:2000, // disableOnInteraction: false // }, // speed: 1000, // navigation: { // nextEl: $('.slider .btn_next'), // prevEl: $('.slider .btn_prev'), // }, // pagination: { // el: ".swiper-pagination", // type: "bullets", // }, // }); var swiper = new Swiper(".best_product", { slidesPerView: 1, spaceBetween: 40, loop: true, loopedSlides: 0, autoplay: { delay: 2500, disableOnInteraction: false, }, pagination: { el: ".swiper-pagination", clickable: true, }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, breakpoints: { 1200: { slidesPerView: 2, loopedSlides: 2, spaceBetween: 20, }, 1600: { slidesPerView: 3, loopedSlides: 2, spaceBetween: 20, }, }, }); });