$(function () { page.init(); }); var page = { init: function () { page.common(); }, common: function () { //bg cover $(".bg_cover > .bg_img").each(function () { $(this).parent().css("background-image", "url(" + $(this).attr("src") + ")"); }); //gnb hover var gnbHeader = $("#header .header_main"); $("#gnb").hover( function () { gnbHeader.addClass("active").stop(true, true).animate({ height: 300 }, 200); }, function () { gnbHeader.stop(true, true).animate({ height: 80 }, 200, function () { $(this).removeClass("active"); }); } ); $("#gnb .menu").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); //gnb mobile �޴� var headerGnbWrap = $("#header .gnb_wrap"); var headerGnb = $("#gnb"); $("#header .btn_menu").on("click", function () { headerGnbWrap.stop(true, true).css("opacity", 0).show().animate({ opacity: 1 }, 200); headerGnb.stop(true, true).animate({ right: 0 }, 200); return false; }); var headerClose = $("#header .btn_close").on("click", function () { headerGnbWrap.stop(true, true).animate({ opacity: 0 }, 200, function () { $(this).hide(); }); headerGnb.stop(true, true).animate({ right: -270 }, 200); return false; }); $("#gnb .link").on("click", function () { if (headerClose.is(":visible")) { var getMenu = $(this).parent(); if (getMenu.hasClass("active")) { getMenu.removeClass("active").find(".sub_menu").stop(true, true).slideUp(200); } else { $("#gnb .menu.active").removeClass("active").find(".sub_menu").stop(true, true).slideUp(200); getMenu.addClass("active").find(".sub_menu").stop(true, true).slideDown(200); } return false; } }); } } $(document).ready(function () { $(".en-main-tap>article").mouseover(function () { $(this).children('section').css('display', 'block') }) $(".en-main-tap>article").mouseleave(function () { $(this).children('section').css('display', 'none') }) $(".en-main-tap>article:nth-child(1)").mouseover(function () { $(this).children('a').children('section').css('display', 'block') }) $(".en-main-tap>article:nth-child(1)").mouseleave(function () { $(this).children('a').children('section').css('display', 'none') }) $('.en .sul_menu a:nth-child(2) b').text('All'); $('.en .sul_menu a:nth-child(1) b').text('All'); });