$(function(){ var page = ""; /* gnb ÇÏ´Ü¿µ¿ª Á¦¾î */ var quickLink = $("#gnb .menu").height() + 460; if ($(window).height() < quickLink) { $('#gnb .btm-cnt').css({'top' : '550px','bottom' : '0'}); } else { $('#gnb .btm-cnt').css({'top' : 'auto','bottom' : '11px'}); } $(window).resize(function() { var quickLink = $("#gnb .menu").height() + 460; if ($(window).height() < quickLink) { $('#gnb .btm-cnt').css({'top' : '550px','bottom' : '0'}); } else { $('#gnb .btm-cnt').css({'top' : 'auto','bottom' : '11px'}); } }); /* culture Åä±Û ¹öÆ° Á¦¾î */ var openCulture = function(isAnimation) { $('div#culture button.toggle.on').css({'display' : 'none'}); $('div#culture button.toggle.off').css({'display' : 'block'}); if(isAnimation == true) { $("#culture").animate({"left":"1000px"},500); } else { $("#culture").css({"left":"1000px"}); } $("#mainContents").show(); $(this).css({'display' : 'none'}); $('#culture .off').css({'display' : 'block'}); $("#culture ul.culture-list").removeClass('on').addClass('off'); if($('#culture button.toggle').hasClass("off")) { $('.culture-bg').css({'display' : 'block'}); $("#culture ul.culture-list li a").bind('focusin mouseenter',function() { $(this).children('.culture-cnt').css({'display' : 'none'}); }); } $('#culture').delay(500) .queue( function(next){ $(this).css({'width' : '903px'}); next(); }); }; var closeCulture = function(isAnimation) { $('#culture').css({'width':(($(document).width()))+'px'}); if(isAnimation == true) { $("#culture").animate({"left":"157px"},500); $("#mainContents").fadeOut(); } else { $("#culture").css({"left":"157px"}); $("#mainContents").hide(); } $('div#culture button.toggle.off').css({'display' : 'none'}); $('#culture .on').css({'display' : 'block'}); $("#culture ul.culture-list").removeClass('off').addClass('on'); if($('#culture button.toggle').hasClass("on")) { $('.culture-bg').css({'display' : 'none'}); $("#culture ul.culture-list li a").bind('focusin mouseenter',function() { $(this).addClass('on'); $(this).children('.culture-cnt').css({'display' : 'block'}); }); $("#culture ul.culture-list li a").bind('focusout mouseleave',function() { $(this).removeClass('on'); $(this).children('.culture-cnt').css({'display' : 'none'}); }); } $( "#culture ul.culture-list li:first-child a" ).focus(); $(window).resize(function() { $('#culture').css({'width':(($(document).width()))+'px'}); }); }; if(page != '') { closeCulture(false); } else { $('div#culture button.toggle.on').css({'display' : 'none'}); openCulture(false); } $('div#culture button.toggle.on').click(function() { openCulture(true); }); $('div#culture button.toggle.off').click(function() { closeCulture(true); }); /* top ¹öÆ° Á¦¾î */ $('#culture .top').click( function() { $('html, body').animate({scrollTop: '0px'}, 300); return false; } ); }); /* gnb ¸Þ´º Á¦¾î */ function gnbMenu(depth1,depth2){ $("#gnb .menu li a").bind('focusin mouseenter',function() { $(this).parent().find("ul").css("display", "block"); $(this).addClass('on'); $(this).parent().siblings().find("ul").css("display", "none"); $(this).parent().siblings().find("a").removeClass('on'); }); $("#gnb .menu").bind('mouseleave',function() { $(this).children('li').find('ul').css("display", "none"); $(this).children('li').find("a").removeClass('on'); $('#gnb .menu > li:eq('+depth1+') > a').addClass("on") $('#gnb .menu > li:eq('+depth1+') > a').parent().find("ul").css("display", "block"); $('#gnb .menu > li:eq('+depth1+') ul li:eq('+depth2+') > a').addClass("on") }); if ( $('#gnb .menu > li').size() > depth1){ $('#gnb .menu > li:eq('+depth1+') > a').addClass("on") $('#gnb .menu > li:eq('+depth1+') > a').parent().find("ul").css("display", "block"); $('#gnb .menu > li:eq('+depth1+') ul li:eq('+depth2+') > a').addClass("on") } $("#gnb .menu li.recruit ul li:last-child a").bind('focusout',function() { $(this).parents('.menu ul').css("display", "none"); $(this).parents('#gnb .menu li').find("a").removeClass('on'); $('#gnb .menu > li:eq('+depth1+') > a').addClass("on") $('#gnb .menu > li:eq('+depth1+') > a').parent().find("ul").css("display", "block"); $('#gnb .menu > li:eq('+depth1+') ul li:eq('+depth2+') > a').addClass("on") }); $('#gnb .menu ul').css({'height':(($(document).height()))+'px'}); $(window).resize(function() { $('#gnb .menu ul').css({'height':(($(document).height()))+'px'}); }); }