$(function(){ custom_cursor(); $("body").addClass("on"); $(".mainslide").addClass("on"); $(document).ready(function(){ if($("body").addClass("on")){ } }); var mainSlide = new Swiper('.mainslide', { effect: "fade", autoplay: true, speed: 1000, allowTouchMove:false, simulateTouch:false, grabCursor: false, touchStartPreventDefault:false, pagination: { el: '.main_pagination', clickable: true, }, navigation: { nextEl: '.main_next', prevEl: '.main_prev', }, }); var productSlide = new Swiper('.product_slide', { speed: 800, autoplay: true, parallax: true, allowTouchMove:false, simulateTouch:false, grabCursor: false, touchStartPreventDefault:false, navigation: { nextEl: '.product_next', prevEl: '.product_prev', }, loop:true, slidesPerView:5, spaceBetween: 20, breakpoints: { 1340: { slidesPerView:4, spaceBetween: 20 }, 1024: { slidesPerView:3, spaceBetween: 20 }, 767: { slidesPerView:2, spaceBetween: 10 }, } }); var productText = new Swiper('.product_text', { effect: "fade", speed: 900, autoplay: true, allowTouchMove:false, simulateTouch:false, grabCursor: false, touchStartPreventDefault:false, pagination: { el: '.gallery_pagination', type: 'progressbar', }, loop:true, }); var gallerySlide = new Swiper('.gallery_slide', { centeredSlides: true, loop:true, autoplay:{ delay: 3000, }, speed: 1000, direction: 'horizontal', pagination: { el: '.gallery_pagination', type: 'progressbar', }, navigation: { nextEl: '.product_next', prevEl: '.product_prev', }, slidesPerView:2, spaceBetween: 20, breakpoints: { 767: { slidesPerView:1, spaceBetween:10 }, } }); var snsSlide = new Swiper('.sns_slide', { slidesPerView: 'auto', centeredSlides: true, //effect: "fade", autoplay: true, speed:1000, loop:true, //parallax: true, //allowTouchMove:false, //simulateTouch:false, //grabCursor: false, //touchStartPreventDefault:false, }); }); function custom_cursor(){ var $cursor = null; var $inner = null; var $circle = null; var $txt = null; if( $('html').hasClass('mobile') || $('html').hasClass('ie10') ) { return; } $('body').mousemove(function(e) { TweenMax.to($('#custom_cursor, #custom_cursor_text'), 1.3, { x: e.clientX, y: e.clientY, ease: Power3.easeOut }); }); // global cursor $(document).on({ mouseenter: function(){ $cursor = $('#custom_cursor, #custom_cursor_text'); $inner = $cursor.find('.custom_cursor_inner'); $circle = $cursor.find('.custom_hover_circle'); $txt = $cursor.find('.custom_hover_text'); var $this = $(this); var words = ( $this.data('hover') != undefined ) ? $this.data('hover') : ''; if( $this.hasClass('drag') ){ $cursor.addClass('drag'); } if( $this.hasClass('custom_simple_cursor') ){ words = ''; var size = ( $this.data('size') != undefined ) ? $this.data('size') : '48'; TweenMax.to($inner, .1, {width: size,height: size,ease: Power0.easeNone}); } $txt.find('> span').text( words ); TweenMax.killTweensOf($circle, $txt); TweenMax.to($circle, .3, {width: '100%',height: '100%',autoAlpha: 1,ease: Power0.easeNone}); TweenMax.to($txt, .3, {width: '100%',height: '100%',autoAlpha: 1,ease: Power0.easeNone}); }, mouseleave: function(){ $cursor = $('#custom_cursor, #custom_cursor_text'); $inner = $cursor.find('.custom_cursor_inner'); $circle = $cursor.find('.custom_hover_circle'); $txt = $cursor.find('.custom_hover_text'); var $this = $(this); if( $this.hasClass('drag') ){ $cursor.removeClass('drag'); } if( $this.hasClass('custom_simple_cursor') ){ TweenMax.to($inner, .2, {width: '100%',height: '100%',ease: Power0.easeNone}); } TweenMax.killTweensOf($circle, $txt); TweenMax.to($circle, .2, {width: '0%',height: '0%',autoAlpha: 0,ease: Power0.easeNone}); TweenMax.to($txt, .2, {width: '0%',height: '0%',autoAlpha: 0,ease: Power0.easeNone}); } }, '.custom_hover'); }