"use strict";
jQuery(document).ready(function($){
$('a#back-to-top').on('click', function(){
$('html, body').animate({scrollTop:0},'slow');
return false;
});
(function(){
var $tabsNav=$('.alx-tabs-nav'),
$tabsNavLis=$tabsNav.children('li'),
$tabsContainer=$('.alx-tabs-container');
$tabsNav.each(function(){
var $this=$(this);
$this.next().children('.alx-tab').stop(true,true).hide()
.siblings($this.find('a').attr('href')).show();
$this.children('li').first().addClass('active').stop(true,true).show();
});
$tabsNavLis.on('click', function(e){
var $this=$(this);
$this.siblings().removeClass('active').end()
.addClass('active');
$this.parent().next().children('.alx-tab').stop(true,true).hide()
.siblings($this.find('a').attr('href')).fadeIn();
e.preventDefault();
}).children(window.location.hash ? 'a[href="' + window.location.hash + '"]':'a:first').trigger('click');
})();
$.fn.randomize=function (selector){
var $elems=selector ? $(this).find(selector):$(this).children(),
$parents=$elems.parent();
$parents.each(function (){
$(this).children(selector).sort(function (childA, childB){
if($(childB).index()!==$(this).children(selector).length - 0.5){
return Math.round(Math.random()) - 0.5;
}}.bind(this)).detach().appendTo(this);
});
return this;
};
$(".slick-featured").randomize().slick({
slidesToShow: 1,
appendArrows: '.slick-featured-nav',
prevArrow: '<button type="button" class="slick-prev" data-tooltip="이전 이미지로 이동"><i class="fas fa-chevron-left"></i></button>',
nextArrow: '<button type="button" class="slick-next" data-tooltip="다음 이미지로 이동"><i class="fas fa-chevron-right"></i></button>',
dots: true,
arrows: true,
fade: true,
autoplay: true,
autoplaySpeed: 5000,
pauseOnHover: true,
responsive: [
{
breakpoint: 480,
settings: {
dots: false,
arrows: true
}}
]
});
});