/********************************************************************************************************* ## Common Script ## * º» ½ºÅ©¸³Æ®ÀÇ ÀúÀÛ±ÇÀº (ÁÖ)À¥½º¸®ÆÛºí¸¯¿¡ ÀÖ½À´Ï´Ù. * º» ½ºÅ©¸³Æ®¸¦ ¹«´ÜÀ¸·Î ÀÌ¿ë(¶Ç´Â µµ¿ë)Çϰųª º¹Á¦ ¶Ç´Â ¼öÁ¤ »ç¿ë½Ã ÀúÀ۱ǹý¿¡ ÀǰŠó¹ú¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. * ±¸¸Å ÈÄ¿¡µµ Á¦ 2Â÷ »çÀÌÆ® µî ¶óÀ̼±½º°¡ Àû¿ëµÇÁö ¾Ê´Â »çÀÌÆ®¿¡ ´ëÇÏ¿© »ç¿ëÀº ±ÝÁöµÇ¾î ÀÖ½À´Ï´Ù. * À§ »çÇ׿¡ ´ëÇÏ¿© À§¹Ý½Ã Àý´ë ÇÕÀÇ´Â ¾ø½À´Ï´Ù ! * date : 2017-03-15 * author : Park Soo Hyun (shpark7502@naver.com) *********************************************************************************************************/ function isPC(){var e=$(window).width();return e>1024?!0:!1}var getUrlParameter=function(e){var t,s,o=decodeURIComponent(window.location.search.substring(1)),i=o.split("&");for(s=0;s li").removeClass("open"),$("#gnb > li > ul").removeAttr("style"),s.removeClass("open"),$("body").removeClass("lock")}var t=$("#gnbWrapper"),s=$("#gnbTrigger"),o=$("#logo");$("#gnb > li").each(function(){var e=getUrlParameter("top")-1;$(this).index()==e&&$(this).addClass("open")}),$("#gnb > li").mouseenter(function(){var e={display:"block",top:"80px",opacity:"0"};isPC()===!0&&($(this).hasClass("on")||($(this).addClass("on"),$(this).find("ul").length>0&&($(this).find("ul").css(e),TweenMax.to($(this).find("ul"),.25,{opacity:1,top:"67px"}))))}),$("#gnb > li").mouseleave(function(){var e=$(this).index(),t={display:"",top:"",opacity:""};isPC()===!0&&($(this).removeClass("on"),$(this).find("ul").length>0&&TweenMax.to($(this).find("ul"),.25,{opacity:0,top:"80px",onComplete:function(){$("#gnb > li").eq(e).find("ul").css(t)}}))}),$("#gnb > li > a").click(function(e){isPC()===!1&&($(this).parent().hasClass("open")?$(this).next("ul").length>0&&(e.preventDefault(),$(this).parent().removeClass("open"),$(this).next("ul").stop().slideUp(250)):$(this).next("ul").length>0&&(e.preventDefault(),$("#gnb > li > ul").stop().slideUp(250),$("#gnb > li").removeClass("open"),$(this).parent().addClass("open"),$(this).next("ul").stop().slideDown(350,"easeInOutExpo")))}),s.click(function(){TweenMax.isTweening(t)||($(this).hasClass("open")?($(this).removeClass("open"),$("body").removeClass("lock"),TweenMax.to(t,.5,{left:"-100%",ease:Expo.easeInOut}),o.stop().fadeOut(100)):($(this).addClass("open"),$("body").addClass("lock"),TweenMax.to(t,.5,{left:0,ease:Expo.easeInOut,onComplete:function(){o.stop().fadeIn(200)}})))}),$(window).bind("resize",function(){var i=$(this).width();i>1024?(o.removeAttr("style"),t.removeAttr("style"),e()):s.hasClass("open")||o.removeAttr("style")})}),$(window).load(function(){var e=$(".scrollreveal"),t={opacity:"0",transition:"none"};e.css(t),$("html, body").animate({scrollTop:"10"},10,function(){$("html, body").animate({scrollTop:"0"},0)}),$(window).bind("scroll",function(){var t=$(this).width(),s=$(this).scrollTop(),o=$(this).height(),i=($(document).height(),$("#header").height()),n=0;t>1024&&(s>=i?$("#header").hasClass("fixed")||($("#header").addClass("fixed"),$("#scrollTop").stop(!0,!1).fadeIn(300)):($("#header").removeClass("fixed"),$("#scrollTop").stop(!0,!1).fadeOut(300))),e.each(function(){var e=$(this).offset().top,t=($(this).height(),$(this).data("delay"));if(null==t&&(t=100),s>=e-o&&!$(this).hasClass("animated")){var i,a={position:"relative",top:"30px"},l={top:"30px"};"static"==$(this).css("position")?(i={opacity:"1",top:"0"},$(this).css(a)):"absolute"==$(this).css("position")?i={opacity:"1"}:(i={opacity:"1",top:"0"},$(this).css(l)),n+=t,$(this).stop().delay(n).animate(i,500,function(){var e={position:"",top:"",opacity:"",transition:""};$(this).css(e)}),$(this).addClass("animated")}})})}),$(window).load(function(){$("#page-loader").fadeOut(600,function(){$("#page-loader").delay(100).remove()})}),$(function(){$("#scrollTop").bind("mouseenter mouseleave click",function(e){"mouseenter"===e.type?$(this).hasClass("on")||$(this).addClass("on"):"click"===e.type?$("html, body").stop().animate({scrollTop:"0"},500,"easeInOutExpo"):$(this).removeClass("on")})}),$(function(){if($(".tbl_formmail").length>0){var e=$(".tbl_formmail");e.find("input[name=name]").attr("placeholder","Name"),e.find("input[name=receiver_email]").attr("placeholder","Email"),e.find("textarea[name=description]").attr("placeholder","Message"),e.find("input[name=add8]").attr("placeholder","Tel"),e.find("input[name=add9]").attr("placeholder","ÁÖ¼Ò")}});