$(document).on('click', 'a[href="#none"]', function(e) {
e.preventDefault();
});
//기본js
function startJs(){
$(document).on('click', 'a[href="#none"]', function(e) {e.preventDefault()});
if($('html').is('.ie67, .ie7, .ie8, .ie9')) {
$('div.ie_alert_text').show().html('현재 사이트는 IE9 미만의 하위브라우저를 지원하지 않습니다.
브라우저를 최신 버전으로 업데이트해 주세요.');
}
WebFont.load({google: {families: ['Noto Sans KR', 'Montserrat']}});
}
function popup() {
//레이어팝업
var bg = $("#bg");
$(document).on('click',' #bg, .close ', function () {
bg.fadeOut();
$('div[id*="-popup"] div.inner').html('');
$('div[id*="-popup"]').hide();
});
$(document).on('click','.layer-',
function () {
var ClassName = $(this).data('link');
bg.show();
$('#layer-popup').show();
$('#layer-popup').html(
'
'+
''+
'
'
);
//foot 메뉴 클릭시
switch (ClassName) {
case "privacy1":
$("#layer-popup div.inner").load("/_privacy1.php");
break;
case "terms":
$("#layer-popup div.inner").load("/_terms.php");
break;
}
}); //click
}
$(function(){
startJs();
popup();
headerJS();
});
function headerJS(){
let $header = $("#wrap header");
let $allmenu = $("#allmenu");
let $depth1 = $("#wrap header #nav .gnb > li");
let $menuBtn = $("#wrap header .menu");
let $closeBtn = $("#allmenu .close");
$depth1.mouseover(function(){
$header.addClass("on");
if($(this).hasClass("hv_n")){
$(".lnb_bg").removeClass("on");
}else {
$(".lnb_bg").addClass("on");
}
});
$depth1.mouseleave(function(){
$header.removeClass("on");
$(".lnb_bg").removeClass("on");
});
$menuBtn.click(function(){
$allmenu.fadeIn(300);
});
$closeBtn.click(function(){
$allmenu.fadeOut(300);
});
$("#allmenu .inner .gnb > li > a").click(function(){
$(this).parent().addClass("on");
$(this).parent().siblings().removeClass("on");
});
}