$(document).ready(function(){
/*slick 공통*/
$('.pause').click(function() {
$(this).siblings("div").slick('slickPause');
$(this).siblings("ul").slick('slickPause');
$(this).hide();
$(this).siblings(".play").show();
});
$('.play').click(function() {
$(this).siblings("div").slick('slickPlay');
$(this).siblings("ul").slick('slickPlay');
$(this).hide();
$(this).siblings('.pause').show();
});
/* 뉴스 ë¡¤ë§ */
$('.gall_news').slick({
slidesToShow:3,
arrows:true,
autoplay: true,
autoplaySpeed:2000,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow:2
}
},
{
breakpoint:767,
settings: {
slidesToShow:1
}
}
]
});
/* ì˜¤í”ˆìŠ¤í† ì–´ ë¡¤ë§ */
$('.gall_store').slick({
slidesToShow:3,
arrows:true,
autoplay: true,
autoplaySpeed:2000,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow:2
}
},
{
breakpoint:767,
settings: {
slidesToShow:1
}
}
]
});
/* ì—°í˜ ë¡¤ë§ */
$('.gall_history').slick({
slidesToShow:3,
autoplay:false,
autoplay: true,
autoplaySpeed:2000,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow:2
}
},
{
breakpoint:767,
settings: {
slidesToShow:1
}
}
]
});
/* 메뉴 ë¡¤ë§ */
$('.gall_menu').slick({
rows:2,
slidesPerRow:3,
slidesToShow:1,
arrows:true,
autoplay: true,
autoplaySpeed:3000,
responsive: [
{
breakpoint: 1024, //화면 사ì´ì¦ˆ 960px
settings: {
slidesToShow:2
}
},
{
breakpoint: 767, //화면 사ì´ì¦ˆ 960px
settings: {
slidesToShow:1
}
}
]
});
/* 매장 ë¡¤ë§ */
$('.gall_review').slick({
centerMode: true,
autoplay: true,
autoplaySpeed:2000,
centerPadding: '5.3%',
slidesToShow:5,
responsive: [
{
breakpoint:1279,
settings: {
slidesToShow:3
}
},
{
breakpoint: 767,
settings: {
centerPadding: '20%',
slidesToShow: 1
}
}
]
});
value();
});
$(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: 800,
autoplay: {delay:5000},
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', {
effect: "slide",
speed: 800,
autoplay: {delay:3000},
parallax: true,
allowTouchMove:false,
simulateTouch:false,
grabCursor: false,
touchStartPreventDefault:false,
navigation: {
nextEl: '.product_next',
prevEl: '.product_prev',
},
loop:true,
});
var productText = new Swiper('.product_text', {
effect: "fade",
speed: 900,
autoplay: {delay:3000},
allowTouchMove:false,
simulateTouch:false,
grabCursor: false,
touchStartPreventDefault:false,
navigation: {
nextEl: '.product_next',
prevEl: '.product_prev',
},
loop:true,
});
var gallerySlide = new Swiper('.gallery_slide', {
slidesPerView: 'auto',
//effect: "fade",
autoplay: true,
speed: 1000,
pagination: {
el: '.gallery_pagination',
type: 'progressbar',
},
});
});
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
});
});
}
// -------------------------------------------------------value 효과
function value(){
$(".value_section .con_box li").on("mouseenter", function(){
$(".value_section .con_box li").removeClass('active');
$(this).addClass('active');
});
$(".value_section .con_box li").each(function(index, item){
var bg_num = index + 1;
$(item).on("mouseenter", function(){
$(".value_img .bg_box").removeClass("active");
$(".value_img .bg_box_0" + bg_num).addClass("active");
$(".value_section .tab_box .tabMenu li").removeClass("active");
$(".value_section .tab_box .tabMenu .tab_menu_0" + bg_num).addClass("active");
});
});
$(".value_section .tab_box .tabMenu li").click(function(){
var activeTab = $(this).attr("data-tabNumb");
$(".value_section .tab_box .tabMenu li").removeClass("active");
$(this).addClass("active");
$(".value_section .con_box li").removeClass("active");
$("#"+activeTab).addClass("active");
$(".value_img .bg_box").removeClass("active");
$("#"+activeTab+"_bg").addClass("active");
});
}
$(document).ready(function () {
function attachPopupEvents() {
$(".menu-item").off("click").on("click", function (e) {
e.stopPropagation(); // í´ë¦ ì´ë²¤íЏ ì „íŒŒ ë°©ì§€
var imgSrc = $(this).attr("data-img"); // í´ë¦í•œ ë©”ë‰´ì˜ íŒì—… ì´ë¯¸ì§€ ê°€ì ¸ì˜¤ê¸°
var popup = $(this).find(".popup"); // 해당 ë©”ë‰´ì˜ íŒì—… 찾기
if (popup.is(":visible")) {
popup.fadeOut(200); // ì´ë¯¸ ì—´ë ¤ 있으면 닫기
} else {
$(".popup").fadeOut(200); // 다른 íŒì—… 닫기
popup.fadeIn(200).css("display", "block");
popup.find("img").attr("src", imgSrc);
}
});
// íŒì—… í´ë¦ 시 닫기
$(document).off("click", ".popup").on("click", ".popup", function (e) {
e.stopPropagation();
$(this).fadeOut(200);
});
}
// í™”ë©´ì„ í´ë¦í•˜ë©´ ëª¨ë“ íŒì—… 닫기
$(document).click(function () {
$(".popup").fadeOut(200);
});
function initializeSlickSliders() {
$('.gall_mbgtxt').slick({
slidesToShow: 4,
arrows: true,
autoplay: true,
autoplaySpeed: 2000,
responsive: [
{ breakpoint: 1279, settings: { slidesToShow: 3 } },
{ breakpoint: 1024, settings: { slidesToShow: 2 } },
{ breakpoint: 767, settings: { slidesToShow: 1 } }
]
});
$('.menu_big').slick({
infinite: true,
slidesToShow: 5,
arrows: true,
autoplay: false,
autoplaySpeed: 2000,
responsive: [
{ breakpoint: 1600, settings: { slidesToShow: 4 } },
{ breakpoint: 1279, settings: { slidesToShow: 3 } },
{ breakpoint: 1024, settings: { slidesToShow: 2 } },
{ breakpoint: 767, settings: { slidesToShow: 1 } }
]
});
$('.menu_small').slick({
infinite: true,
rows: 2,
slidesPerRow: 5,
slidesToShow: 1,
arrows: true,
autoplay: false,
autoplaySpeed: 2000,
responsive: [
{ breakpoint: 1600, settings: { slidesPerRow: 4 } },
{ breakpoint: 1279, settings: { slidesPerRow: 3 } },
{ breakpoint: 1024, settings: { rows: 1, slidesPerRow: 2 } },
{ breakpoint: 767, settings: { rows: 1, slidesPerRow: 1 } }
]
});
}
// 슬ë¼ì´ë” 초기화
initializeSlickSliders();
// **Slick ë°˜ì‘형 변경 시 ì´ë²¤íЏ 재등ë¡**
$('.gall_mbgtxt, .menu_big, .menu_small').on('setPosition', function () {
attachPopupEvents(); // 다시 ì´ë²¤íЏ 등ë¡
});
attachPopupEvents(); // 초기 íŒì—… ì´ë²¤íЏ 등ë¡
});