$(function(){
$("body").addClass("on");
// 레이어팝업
var bg = $("#bg");
$(document).on('click',' #bg, .close ', function () {
bg.fadeOut();
$('#video-popup div.inner').html('');
$('#video-popup').hide();
});
$('.play_btn').on('click', function(){
var dataUrl = $(this).attr('data-url');
if(dataUrl){
bg.show();
$('#video-popup').show();
$('#video-popup').html(
'
'+
''+
'
'
);
$('#video-popup div.inner').html(dataUrl);
}else {
alert('준비중 입니다.');
}
});
var fullSwiper = new Swiper('.full_slider', {
slidesPerView:'auto',
direction: "vertical",
effect: "slide",
autoplay: false,
speed: 800,
//parallax: true,
allowTouchMove:false,
simulateTouch:false,
grabCursor: false,
touchStartPreventDefault:false,
watchSlidesProgress: true,
watchSlidesVisibility: true,
mousewheel: {
releaseOnEdges: true
},
mousewheelControl: true,
pagination: {
el: '.full_pagination',
clickable: true,
},
on: {
init: function(){
$(".full_slider .scroll").addClass("top");
},
transitionStart: function(){
if(this.activeIndex >= 1){
$("header").addClass("wht");
$("header .gnb").mouseleave(function(){
$("header").addClass("wht");
});
$(".full_slider .scroll").addClass("bot");
$(".full_slider .scroll").removeClass("top");
}else{
$("header").removeClass("wht");
$("header .gnb").mouseleave(function(){
$("header").removeClass("wht");
});
$(".full_slider .scroll").removeClass("bot");
$(".full_slider .scroll").addClass("top");
}
var Idx = this.activeIndex;
if($(".section:eq("+Idx+")").hasClass("swiper-slide-active")){
$(".section:eq("+Idx+")").addClass("on");
}
},
},
breakpoints: {
1279: {
allowTouchMove:true,
simulateTouch:true,
grabCursor: true,
touchStartPreventDefault:true,
},
},
});
$(".full_slider .scroll").click(function(){
if($(this).hasClass("top")){
fullSwiper.slideTo(1,300);
}else {
fullSwiper.slideTo(0,300);
}
});
var mainSwiper = new Swiper('.main_slider', {
effect:'fade',
pagination: {
el: '.main_pagination',
},
autoplay: {
delay: 5000,
disableOnInteraction: false,
},
navigation: {
nextEl: ".main_next",
prevEl: ".main_prev",
},
});
var techSwiper = new Swiper('.tech_slider', {
slidesPerView:'auto',
allowTouchMove:false,
breakpoints: {
1279: {
allowTouchMove:true,
},
},
});
var noticeSwiper = new Swiper('.notice_slider', {
slidesPerView:'auto',
pagination: {
el: '.notice_pagination',
type:'progressbar',
},
navigation: {
nextEl: ".notice_next",
prevEl: ".notice_prev",
},
});
});