$(function(){ /*인덱스 기본 셋팅*/ $(window).load(function(){ wh = $(window).height(); ww = $(window).width(); if(ww > 1262){ $("#nav").height(wh); $("#contents").height(wh); } if(ww < 1263 && ww > 767){ $("#contents").height(wh-60); } if(ww < 768){ $("#contents").height(wh-50); } }); bchk = 0; $(window).resize(function(){ wh = $(window).height(); ww = $(window).width(); if(bchk == 0){ $(".tablet .gnb .head,.mobile .gnb .head").css("border-bottom","1px solid #ddd") }else{ $(".tablet .gnb .head,.mobile .gnb .head").css("border-bottom","0") } }).resize() $(window).bind("resize",function(){ wh = $(window).height(); ww = $(window).width(); if(ww > 1262){ $("body").removeClass().addClass("pc"); $("#nav").height(wh); $("#contents").height(wh); $(".swiper2,.swiper3").css("display","none"); $('.pc .btn_search').stop().animate({top:wh-53+"px"},0); $(".gnb .head").css("border-bottom","0"); } if(ww < 1263 && ww > 750){ $("body").removeClass().addClass("tablet"); $("#nav").height(60); $("#contents").height(wh-60); $(".swiper2,.swiper3").css("display","block"); $('.tablet .btn_search').css("top","17px"); } if(ww < 751){ $("body").removeClass().addClass("mobile"); $("#nav").height(50); $("#contents").height(wh-50); //$('.btn_search').css("top","17px"); } //$(".gnb").addClass("onlayer").height(wh+60); }).resize(); /* 어바웃 페이지 리사이징 */ about_resize = function(){ $(window).bind("resize",function(){ wh = $(window).height(); $(".pc .section").height(wh); $(".tablet .section").height(wh-60); $(".mobile .section").height(wh-50); $(".mobile .moredetail").height("auto"); ctrH = $(".about_ctr").height()/2; $(".about_ctr").css("margin-top",-ctrH) visiontextH = $(".vision_textbox").height()/2; $(".vision_textbox").css("margin-top",-visiontextH) proundW = $(".philosophy .p_rounds").width()/2; proundH = $(".philosophy .p_rounds").height()/2; $(".philosophy .p_rounds").css("margin-left",-proundW) $(".philosophy .p_rounds").css("margin-top",-proundH); wh_wrapW = $(".wh_wrap").width()/2; wh_wrapH = $(".wh_wrap").height()/2; $(".wh_wrap").css("margin-left",-wh_wrapW) $(".wh_wrap").css("margin-top",-wh_wrapH); wh_wrapH = $(".history_wrap").height()/2; $(".history_wrap").css("margin-top",-wh_wrapH); if(ww < 751){ $(".md_wrap").height("auto"); }else{ mth = $(".moredetail .this_title").height(); mdh = $(".about_foot").height(); mm = mdh + mth; sh = $(".section").height(); $(".moredetail .md_wrap").height(sh-mm) //alert(sh-mdh) //alert(mth) } h_wrap2 = $(".h_wrap2").height()/2; $(".h_wrap2").css("margin-top",-h_wrap2+36); $(".tablet .gnb .head,.mobile .gnb .head").css("border-bottom","1px solid #ddd") $(".btn_search").hide(); }).resize(); } /* 워크 페이지 리사이징 */ work_resize = function(){ $(window).resize(function(){ wliH = $(".work_lists ul li").width(); $(".work_lists ul li").height(wliH); $(".work_lists ul li a").height(wliH); imgW = $(".work_lists ul li .imgarea").width()/2; imgH = $(".work_lists ul li .imgarea").height()/2; //$(".work_lists ul li .imgarea").css("margin-left",-imgW); //$(".work_lists ul li .imgarea").css("margin-top",-imgH); $(".tablet .gnb .head,.mobile .gnb .head").css("border-bottom","0"); $(".btn_search").hide(); }).resize(); } /* 워크 페이지 리사이징 */ mlab_resize = function(){ $(window).resize(function(){ $("#mlab").css("cursor","default") $(".btn_search").css("display","block").css("z-index","1100"); $(".pc .mlab .projects").show(); $(".tablet .mlab .projects").show(); $(".mobile .mlab .projects").hide(); $(".tablet .gnb .head,.mobile .gnb .head").css("border-bottom","0") imgH = $(".mlab_lists .imgarea:eq(0) img").height(); $(".mlab_lists .imgarea").height(imgH); if($(".mlab_searcharea").css("display")=="block"){ $(".btn_search").hide(); }else{ $(".btn_search").show(); } }).resize(); } $(window).scroll(function(){ sT = $(this).scrollTop(); if(sT > 0){ $(".swiperwrap").css("box-shadow","0 1px 3px rgba(0,0,0,0.4)"); }else{ $(".swiperwrap").css("box-shadow","0 0px 0px rgba(0,0,0,0.4)"); } wh = $(window).height(); }) })