(function ($) {
    $(function(){
    
    
              $("#header nav ul.main_m>li").hover(function () {
                $(this).addClass("hover")
            }, function () {
                $(this).removeClass("hover")
            })

            $("#header nav ul.sub_m1>li").hover(function () {
                $(this).addClass("hover")
            }, function () {
                $(this).removeClass("hover")
            })



$(".asi_btm ul>li>a:has(span)").click(function(){
                $(this).toggleClass("clicked")
                $(this).next("ul").toggle()
            })           
            $("#asi ul.main_m>li>a span").each(function(){
                if(!$(this).parent("a").siblings(".sub_m").length>0||!$(this).parent("a").siblings(".sub_m").children("li").length>0){
                    $(this).remove()
                }
            }) 
            
            

            //½ºÅ©·Ñ ÃÖ±Ù º» »óÇ° ¿µ¿ª -> »ó´ÜÀ¸·Î ÀÌµ¿
            
            
            let clone_recent=$("#blk_scroll_wings .recent").clone();
            
            clone_recent.appendTo("#header .head_bottom .hB_recent_area");

(function($) {
$(document).ready(function(){

                $(window).scroll(function(){
                const WST = $(this).scrollTop();
                if(WST>200){
                    $(".fix_m").addClass("show")
                }else{
                    $(".fix_m").removeClass("show")
                }
            })//window scroll - > fix m show
})
})(jQuery);






                    $(".gotoTop").click(function(e){
                e.preventDefault();
                $("html, body").animate({scrollTop: '0'}, 1000);

            })//gototop
    
    
    
    
        var _right_width = $('.all-finder-layer .finder-body').outerWidth() + 'px';
        $('.all-finder-layer .finder-body').css('right', '-' + _right_width);

        // ´ÙÃ£´Ù ·¹ÀÌ¾î ¿­±â/´Ý±â
        $('#allfinder-ctr a').on('click', function(e) {
            e.preventDefault();
	    $(this).toggleClass('open');

            if ($(this).hasClass('open')) {
                $('.all-finder-layer .finder-body').show();
                $('.all-finder-layer .finder-body').stop(true, true).animate({ right: 0 }, 500);
            } else {
                $('.all-finder-layer .finder-body').stop(true, true).animate({ right: '-=' + _right_width }, 500, function() { $(this).hide(); });
            }
        });
        // ´ÙÃ£´Ù ·¹ÀÌ¾î ´Ý±â
        $('.all-finder-layer .finder-body a.finder-close').on('click', function(e) {
            e.preventDefault();
            $('.all-finder-layer .finder-body').stop(true, true).animate({ right: '-=' + _right_width }, 500, function() { $(this).hide(); });
			$('#allfinder-ctr a').removeClass('open');
        });
		
        // ´ÙÃ£´Ù ·¹¸®¾î - Ä«Å×°í¸® ¿­±â ´Ý±â
	$('.all-finder-layer .category-toggle').click(function(e){
	    e.preventDefault();
	    $(this).toggleClass('fa-minus');
	    $('.all-finder-layer .finder-category').toggleClass('open');
	});
    });
    
})(jQuery);