$(function () { function webHeight() { var winHeight = $(window).height(); if (winHeight > 644) { $("#slidemenu").css("height", winHeight - 167) } else { $("#slidemenu").css("height", "480px") } var winWidth = $(window).width(); if (winWidth > 1179) { var boxHeight = $(window).height() / 4; var arrowTop = boxHeight / 2 - 20; if (boxHeight > 200) { $(".box").css("height", boxHeight); $(".arrow").css("top", arrowTop); $(".notice").css("height", boxHeight - 1); var minboxtop = boxHeight - 190; if (minboxtop < 24) { $(".box").find("h2").css("margin-top", "24px") } else { $(".box").find("h2").css("margin-top", minboxtop) } var sheetTop = (boxHeight - 200) / 2; $(".sheet a").css("top", sheetTop); $(".sheet2 a").css("top", sheetTop); $(".sheet3 a").css("top", sheetTop) $(".play").css("top", sheetTop) } else { if (winWidth > 760) { $(".box").css("height", "200px"); $(".arrow").css("top", "80px"); $(".notice").css("height", "199px"); $(".box").find("h2").css("margin-top", "24px") } else { $(".box").css("height", "164px"); $(".arrow").css("top", "61px"); $(".notice").css("height", "163px"); $(".box").find("h2").css("margin-top", "15px") } } } else { if (winWidth > 1179) { $(".box").css("height", "200px"); $(".arrow").css("top", "80px"); $(".notice").css("height", "199px"); $(".box").find("h2").css("margin-top", "24px"); } else { $(".box").css("height", "164px"); $(".arrow").css("top", "61px"); $(".notice").css("height", "163px"); $(".box").find("h2").css("margin-top", "15px"); $(".sheet a").css("top", "0"); $(".sheet2 a").css("top", "0"); $(".sheet3 a").css("top", "0"); $(".play").css("top", "0"); } } } function check() { var winWidth = $(window).width(); var winHeight = $(window).height(); var allwrapHeight = $("#allwrap").height(); $("#mNavi").css("height", allwrapHeight); if (winWidth > 1179) {} else if (winWidth < 1180 && winWidth > 767) { var menuRight = 436; } else if (winWidth < 768 && winWidth > 319) { var menuRight = 228; } $("#menuOpen").click(function () { var allwrapHeight = $("#allwrap").height(); $("#mNavi").css("display", "block"); $("#mNavi").css("height", allwrapHeight); $("#mNavi").stop().animate({ "left": "0" }, 300) }); $("#mtitle a").click(function () { $("#mNavi").stop().animate({ "left": -menuRight + "px" }, 300) }); $(".dep").click(function () { $("#mgnb ul li ul").hide(); $(this).siblings("ul").show() }); } $(window).resize(function () { var winWidth = $(window).width(); var winHeight = $(window).height(); if (winWidth > 1190) { $('html').animate({ scrollTop: 0 }, 0); $('body').animate({ scrollTop: 0 }, 0); } check(); webHeight(); $("#mNavi").css("display", "block"); }); check(); webHeight() }); function gnbController1(mainClass, subClass){ var mainChk = $("#tab>ul>li>a"); // 1st for ¹®¿¡¼­ length ¸¦ üũÇÒ Ç׸ñ ±âÁØ. for(var i = 0; i < mainChk.length ; i++){ var subChk = $("#tab>ul>li").eq(i); //º¯¼ö i ¿¡ µû¶ó ´ëºÐ·ù li°¡ ´Þ¶óÁø´Ù if(subChk.find("a").eq(0).text() == mainClass) { //üũÇÒ Ç׸ñ "ÅõÀÚÁ¤º¸" ¿¡ µµ´ÞÇϸé Á¶°ÇÀ» °Ç´Ù subChk.eq(0).addClass("on"); for (var z = 0; z < subChk.find("li>a").length; z++){ // ´ëºÐ·ùiÀÇ À§Ä¡¿¡ µû¸¥ ¼ÒºÐ·ù length if(subChk.find("li>a").eq(z).text() == subClass){ subChk.find("li").eq(z).addClass("on"); } }; }; }; };