PageSourceSearch

https://kostech.co.kr/compnay

html kostech.co.kr collected 2026-10-09 03:00:23 UTC 308,642 bytes, 6,112 lines download raw bytes

1
2
3
4<!DOCTYPE html>
5<html lang="ko">
6<head>
7    <meta charset="utf-8">
8    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
9    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
10        <meta name="viewport" content="width=device-width, initial-scale=1.0">
11        <meta name="generator" content="QUV Homepage Builder"/>
12    <meta name="language" content="kr"/>
13    <meta name="referrer" content="always">
14    <title>KOSTECH - 인사말 </title>
15    <meta name="keywords" content="충돌 해석, 구조 해석, 유동 해석, 최적화, LS-DYNA, DYNA, CAE, Explicit, Implicit, 해석, 시뮬레이션, 비선형, Non-linear, 선형, Linear, NVH, 가상실험, LS-DYNA 교육, Ansys, 앤시스, Abaqus, 아바쿠스, Nastran, 나스트란, digital twin, 디지털 트윈, digital"/>
16    <meta name="description" content="KOSTECH는 다양한 산업에 최적화된 CAE 솔루션, 엔지니어링 컨설팅, 기술 교육을 제공하는 엔지니어링 전문 기업입니다."/>
17    <meta property="og:title" content="KOSTECH - 인사말"/>
18    <meta property="og:description" content="KOSTECH는 다양한 산업에 최적화된 CAE 솔루션, 엔지니어링 컨설팅, 기술 교육을 제공하는 엔지니어링 전문 기업입니다."/>
19    <meta property="og:url" content="https://kostech.co.kr/compnay"/>
20    
21    <meta name="google-site-verification" content="tH70y0ThiQnKoWiUilNg2xSXQ2HuFsxZ19o1gdcyhms" />
22<meta name="naver-site-verification" content="cfe9e0580db16a15d3ea34962e6a39eb32d54097" />
23    <!--favicon-->
24            <link rel="shortcut icon" href="https://quv.kr/img/ico/qv_favicon.ico">
25        <link rel="canonical" href="https://kostech.co.kr/compnay" />
26            <meta name="robots" content="index,follow">
27    
28    <link href="/css/bootstrap.css?v=260904" rel="stylesheet">
29    <link href="/css/font-awesome.min.css?v=260904" rel="stylesheet">
30    <link href="/css/material-icons.min.css?v=260904" rel="stylesheet">
31    <link href="/css/simple-line-icons.css?v=260904" rel="stylesheet">
32    <link href="/css/style.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
33    <link href="/css/mobile.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
34    <link href="/css/header.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
35    <link href="/css/uploadfile.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
36    <link href="/css/font.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
37    <link href="/css/form.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
38    <link href="/css/table.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
39    <link href="/css/jquery-ui.1.12.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
40    <!--pagespeed <link href="/css/bootstrap-colorpicker.css?v=260904" rel="stylesheet" type="text/css" media="all"/>-->
41    <link href="/css/slider.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
42    <link href="/css/animate.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
43    <link href="/css/jquery.scrollbar.css?v=260904" rel="stylesheet" type="text/css" media="all"/> <!--page-->
44    <!--pagespeed <link href="/css/jquery.mCustomScrollbar.css?v=260904" rel="stylesheet" type="text/css" media="all">-->
45    <link href="/css/default.less?t=1791514822" rel="stylesheet/less" type="text/css"/>
46    <!--<link href="/live/s/site.less?t=1791514822" rel="stylesheet/less" type="text/css"/>-->
47    <!--    <link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-grid.css">-->
48    <!--    <link rel="stylesheet" href="/css/ag-theme-material.css">-->
49    <link rel="stylesheet" href="/css/ag-grid.css">
50    <link rel="stylesheet" href="/css/ag-theme-material.css">
51
52    <link href="/css/bootstrap-datepicker3.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
53    <link href="/css/bootstrap-timepicker.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
54    <!--pagespeed <link href="/css/tablecellsselection.css?v=260904" rel="stylesheet" type="text/css" media="all"/>-->
55    <!--<link href="/css/ScrollTrigger.css?v=--><!--" rel="stylesheet" type="text/css" media="all"/>-->
56    <link href="/css/fullcalendar.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
57    <link href="/css/fullcalendar.min.css?v=260904" rel="stylesheet" type="text/css" media="all"/>
58    <link href="/css/fullcalendar.print.min.css?v=260904" rel="stylesheet" type="text/css" media="print"/>
59
60    <!-- ionicons -->
61    <link href="/css/ionicons/ionicons.css?v=260904" rel="stylesheet">
62    <link href="https://unpkg.com/[email protected]/dist/css/ionicons.min.css" rel="stylesheet">
63
64    
65    
65<script>
66        var qvDebug={}; qvDebug.drag=1;//1:debug on
67        var STID="eshux9ze9"; var SVID="1"; var SPID="56"; var MSID="eshux9"; var SITE_NAME="한국시뮬레이션기술(주)"; var USE_APP="0"; var LANG="ko"; var SITE_URL="compnay";
68        var QV_BASE_OBJ={'sskey':"", 'token':"68f3c4654b64e3d9ce3417bbd308e760", 'stid':STID, 'svid':SVID, 'spid':SPID, 'msid':MSID, 'site_name':SITE_NAME, 'use_app':USE_APP, 'eng_domain':'kostech.co.kr', 'member_account_type':"1",'is_free_version':'0', 'dev':""};
69        var CKEDITOR_BASEPATH = "/js/ck3/";
70        var IS_LOGINED="0";
71        less = {
72            //env: "production", //development,production-으로 하면 캐싱 오류남
73            env: "production",
74            logLevel: 2,
75            async: false,
76            fileAsync: false,
77            poll: 1000,
78            functions: {},
79            dumpLineNumbers: "comments",
80            relativeUrls: false
81        };
82        var account = "";
83        var auth = "";
84        var group = "";
85        var isAdmin = "0";
86
87        if (QV_BASE_OBJ.is_free_version==1 && self !== top) {
88            //12.6
89            alert('도메인으로 이용하시려면\n큐브 프리미엄 버전으로 업그레이드 해주세요.\n큐브 사이트로 이동합니다');
90            location.href='https://www.quv.kr';
91        }
92    </script>
92
93    
93<script src="/js/less.min.js?v=260904" type="text/javascript"></script>
93
94    
94<script>//less.watch();</script>
94
95
96    <!--[if lt IE 9]>
97    
97<script type="text/javascript" src="/js/html5shiv.js?v=260904"></script>
97 <![endif]-->
98    
98<script type="text/javascript" src="/js/jquery.2.2.4.min.js?v=260904"></script>
98
99    
99<script type="text/javascript" src="/js/bootstrap.js?v=260904"></script>
99
100    
100<script>$.fn.bootstrapBtn = $.fn.button.noConflict();</script>
100 <!--반드시 bootsrap - jquery-ui 사이에 위치-->
101    
101<script type="text/javascript" src="/js/jquery-ui.1.12.min.js?v=260904"></script>
101
102    
102<script type="text/javascript" src="/js/jquery.lazyload.js?v=260904"></script>
102
103    
103<script type="text/javascript" src="/js/jquery-migrate-1.2.1.min.js?v=260904"></script>
103
104    
104<script type="text/javascript" src="/js/jquery.ui.touch-punch.min.js?v=260904"></script>
104
105    <!--
105<script type="text/javascript" src="/js/jquery.htmlClean.js?v=260904"></script>
105-->
106    
106<script type="text/javascript" src="/js/global.js?v=260904" charset="utf-8"></script>
106
107    
107<script type="text/javascript" src="/js/script.js?v=260904" charset="utf-8"></script>
107
108    
108<script type="text/javascript" src="/js/jquery.uploadfile.js?v=260904"></script>
108
109    <!--
109<script type="text/javascript" src="/js/ck3/ckeditor.js?v=--><!--" charset="utf-8"></script>
109-->
110    <!--pagespeed 
110<script type="text/javascript" src="/js/bootstrap-colorpicker.new.js?v=260904" charset="utf-8"></script>
110-->
111    
111<script type="text/javascript" src="/js/jquery.scrollbar.js?v=260904" charset="utf-8"></script>
111
112    <!--pagespeed 
112<script type="text/javascript" src="/js/jquery.mCustomScrollbar.concat.min.js?v=260904"></script>
112-->
113    
113<script type="text/javascript" src="/js/bootstrap-datepicker.min.js?v=260904"></script>
113
114    
114<script type="text/javascript" src="/js/bootstrap-timepicker.min.js?v=260904"></script>
114
115    <!--pagespeed 
115<script type="text/javascript" src="/js/tablecellsselection.js?v=260904"></script>
115-->
116    
116<script type="text/javascript" src="/js/carousel-swipe.js?v=260904"></script>
116
117    
117<script type="text/javascript" src="/js/jquerymobile-swipeupdown.js?v=260904"></script>
117
118    <!--
118<script type="text/javascript" src="/js/ScrollTrigger.min.js?v=--><!--"></script>
118-->
119    <!--
119<script type="text/javascript" src="/js/webfont.js?v=--><!--"></script>
119-->
120
121    
121<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
121
122    
122<script type="text/javascript">
123        var webfontJson_Header = '{"google":[],"custom":["Noto Sans KR"]}';
124        var webfontJson_Body = '{"google":[],"custom":["Noto Sans KR"]}';
125        var webfontJson_Footer = '{"google":[],"custom":["Noto Sans KR"]}';
126        var webfontJson_Fixed = '{"google":[],"custom":["Noto Sans KR"]}';
127        var webfontJson_Popup = '[]';
128
129        var webfontArray = [];
130        webfontArray.push($.parseJSON(webfontJson_Header));
131        webfontArray.push($.parseJSON(webfontJson_Body));
132        webfontArray.push($.parseJSON(webfontJson_Footer));
133        webfontArray.push($.parseJSON(webfontJson_Fixed));
134        webfontArray = $.merge(webfontArray, $.parseJSON(webfontJson_Popup.replace(/"{/g, "{").replace(/}"/g, "}")));
135
136        var webfont_google = [];
137        var webfont_custom = [];
138        var webfont_custom_url = 'css/font.css.php?family=';
139        var webfont_exclude = ['agGridMaterial'];
140        $.each(webfontArray, function(index, value) {
141            if (this.google != undefined && value != null) {
142                $.each(value.google, function() {
143                    var font = String(this) + ':300,400,700';
144                    if (String(this) == '' || webfont_exclude.indexOf(String(this)) > -1) return;
145                    if ($.inArray(font, webfont_google) == -1) {
146                        webfont_google.push(font);
147                    }
148                });
149            }
150            if (this.custom != undefined  && value != null) {
151                $.each(value.custom, function() {
152                    if ($.inArray(String(this), webfont_custom) == -1) {
153                        webfont_custom.push(String(this));
154                        webfont_custom_url += String(this).replace(/ /g,'+');
155                        webfont_custom_url += '|';
156                    }
157                });
158            }
159        });
160
161        var webfont = new Object();
162        webfont.google = webfont_google;
163        webfont.custom = webfont_custom;
164        webfont.custom_url = ['/' + webfont_custom_url.slice(0, -1)];
165
166        var webfontconfig = new Object();
167        // if (webfont.google.length > 0) { webfontconfig.google = { 'families' : webfont.google } }
168        if (webfont.custom.length > 0) { webfontconfig.custom = { 'families' : webfont.custom, 'urls' : webfont.custom_url } }
169
170        /* 2020.01.31 재헌
171             * 묶어서 호출했을 때 하나라도 지원하지 않는 폰트가 있으면 그 하위로 모두 호출하지 않는 문제가 있음.
172             * 위 이유로 구글 폰트는 개별 호출한다.
173             */
174        $.each(webfont.google, function() {
175            var webfontconfig_re = new Object();
176            webfontconfig_re.google = { 'families' : [ this ] };
177            WebFont.load(webfontconfig_re);
178        });
179
180        if (!$.isEmptyObject(webfontconfig)) {
181            WebFontConfig = webfontconfig;
182//            WebFontConfig = {
183//                google: {
184//                    families: ['Abel','Abril Fatface','Alegreya','Barlow','Cardo','Cookie','Dancing Script','Dosis','Droid Sans','Droid Serif','EB Garamond','Great Vibes','Lato','Libre Baskerville','Lora','Mada','Montserrat','Muli','Nixie One','Noto Sans','Noto Serif','Open Sans','Oswald','Playball','Playfair Display','PT Sans','PT Serif','Questrial','Quicksand','Raleway','Roboto','Stalemate','Ubuntu','Indie Flower']
185//                }
186//            };
187
188            // https://github.com/typekit/webfontloader
189            // v1.0 -> v1.6.26
190            (function() {
191                var wf = document.createElement('script');
192                wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
193                wf.type = 'text/javascript';
194                wf.async = 'true';
195                var s = document.getElementsByTagName('script')[0];
196                s.parentNode.insertBefore(wf, s);
197            })();
198        }
199    </script>
199
200    
200<script type="text/javascript" src="//log1.quv.kr/log/qa.js"></script>
200
201
202    <!-- 다음 우편번호 검색 -->
203    
203<script src="https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
203
204
205    <!-- 다국어 -->
206        
206<script type="text/javascript" src="/module/language/lang.ko.js?v=260904"></script>
vendor: 71 bytes, lines 206-208
206
207    
208<script async src="https://www.googletagmanager.com/gtag/js?id=
208UA-157729557-2
vendor: 12 bytes, line 208
208"></script>
209<script>
210  
vendor: 134 bytes, lines 210-214
210window.dataLayer = window.dataLayer || [];
211  function gtag(){dataLayer.push(arguments);}
212  gtag('js', new Date());
213
214  gtag('config', '
214UA-157729557-2
vendor: 4 bytes, line 214
214');
215</script>
vendor: 65 bytes, lines 215-217
215
216
217<script async src="https://www.googletagmanager.com/gtag/js?id=
217G-TT01PT9YK5
vendor: 12 bytes, line 217
217"></script>
218<script>
219  
vendor: 134 bytes, lines 219-223
219window.dataLayer = window.dataLayer || [];
220  function gtag(){dataLayer.push(arguments);}
221  gtag('js', new Date());
222
223  gtag('config', '
223G-TT01PT9YK5
vendor: 4 bytes, line 223
223');
224</script>
224
225
226    </head>
227
228<body class="live transform" style="display: none;">
229<div id="main_container" class="56">
230    <div class="header hl1-3 transform useFixed">
231   <div class="header1 sub-mn-text-align-center sub-mn-align-vertical sub-mn-type-2" data-hei="50" data-scr-hei="50" style="border-bottom: 0px solid transparent; height: 50px;">
232      <div class="header-contents boxing" style="height: 50px;">
233         <div class="col-xs-12" style="height: auto;" pp_grid="12">
234            <div class="al-box column al-c">
235            <div class="box tc hsync-nlh imgBox tc_drag" id="bzmhmt" style="display: table-cell; height: 50px; padding: 0px;">
236				<div class="view img-view tb-c va-m" style="text-align: center; height: 50px;">
237					<a class="preview-layer" href="#" data-target="#ImgModal" data-toggle="modal" data-obj="img" data-mode="he"></a>
238					<a id="ius83W" class="image-area" style="width: auto;" href="http://kostech.co.kr">
239						<div class="img-core" style="background: url(&quot;https://cdn.quv.kr/eshux9ze9%2Fup%2F606271fc5cf9f_800.jpg&quot;) 40% 47% / contain no-repeat; width: 180px; height: 50px; border-radius: 0px; max-height: 50px;">
240						</div>
241						<div class="img-op" style="width: 180px; left: 0px; height: auto; top: 0px; background-color: rgba(0, 0, 0, 0); border: 0px solid transparent; border-radius: 0px; max-height: 50px;">
242							<div class="caption-txt"><p><br></p></div>
243						</div>
244					<style>#ius83W:hover .img-op{background-color:transparent !important;}</style></a>
245				</div>
246			</div><ul class="mn-ul tc box hsync tc_drag mn-sty-1" style="height: 50px; line-height: 50px; display: table-cell;" id="bUbCKS"><headerstart></headerstart><li class="mn-item"> <a class="mn-link" href="/compnay">기업소개</a><span class="mn-dropdown"></span>
247<ul class="sub-mn">
248<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/compnay">인사말</a></li>
249<li class="mn-item"> <a class="mn-link" href="/ansys">Ansys 솔루션</a></li>
250<li class="mn-item"> <a class="mn-link" href="/map">오시는 길</a></li>
251</ul></li>
252<li class="mn-item"> <a class="mn-link" href="/automotive">산업군</a><span class="mn-dropdown"></span>
253<ul class="sub-mn">
254<li class="mn-item"> <a class="mn-link" href="https://kostech.co.kr/automotive">Automotive</a></li>
255<li class="mn-item"> <a class="mn-link" href="/aerospace-defense">Aerospace &amp; Defense</a></li>
256<li class="mn-item"> <a class="mn-link" href="/battery">Battery</a></li>
257<li class="mn-item"> <a class="mn-link" href="/industrialequipment">Industrial Equipment</a></li>
258<li class="mn-item"> <a class="mn-link" href="/turbomachinery">Turbomachinery</a></li>
259<li class="mn-item"> <a class="mn-link" href="/materials">Materials &amp; Chemicals</a></li>
260</ul></li>
261<li class="mn-item"> <a class="mn-link" href="/lsdyna">제품소개</a><span class="mn-dropdown"></span>
262<ul class="sub-mn">
263<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/lsdyna">LS-DYNA</a></li>
264<li class="mn-item"> <a class="mn-link" href="/ls-opt">LS-OPT</a></li>
265<li class="mn-item"> <a class="mn-link" href="/lamp">LAMP</a></li>
266<li class="mn-item"> <a class="mn-link" href="/structure">Ansys 구조해석</a></li>
267<li class="mn-item"> <a class="mn-link" href="/fluids">Ansys 유동해석</a></li>
268<li class="mn-item"> <a class="mn-link" href="/electronics">Ansys 전자기장해석</a></li>
269<li class="mn-item"> <a class="mn-link" href="/motion">Ansys Motion</a></li>
270<li class="mn-item"> <a class="mn-link" href="/discovery">Ansys Discovery</a></li>
271<li class="mn-item"> <a class="mn-link" href="/granta">Ansys Granta</a></li>
272<li class="mn-item"> <a class="mn-link" href="/simpleware">Simpleware</a></li>
273<li class="mn-item"> <a class="mn-link" href="/j-octa">J-OCTA</a></li>
274<li class="mn-item"> <a class="mn-link" href="/jstamp">JSTAMP</a></li>
275<li class="mn-item"> <a class="mn-link" href="/dynaform">Dynaform</a></li>
276<li class="mn-item"> <a class="mn-link" href="/presys">PreSys</a></li>
277<li class="mn-item"> <a class="mn-link" href="/swiftcomp">SwiftComp</a></li>
278<li class="mn-item"> <a class="mn-link" href="/vabs">VABS</a></li>
279<li class="mn-item"> <a class="mn-link" href="/asap">ASAP</a></li>
280<li class="mn-item"> <a class="mn-link" href="/digimat">Digimat</a></li>
281<li class="mn-item"> <a class="mn-link" href="/odyssee">ODYSSEE</a></li>
282<li class="mn-item"> <a class="mn-link" href="/thums">THUMS</a></li>
283</ul></li>
284<li class="mn-item"> <a class="mn-link" href="/consulting">컨설팅</a><span class="mn-dropdown"></span>
285<ul class="sub-mn">
286<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/consulting">컨설팅 안내</a></li>
287<li class="mn-item"> <a class="mn-link" href="/c-multiphysics">컨설팅 분야</a></li>
288<li class="mn-item"> <a class="mn-link" href="/askconsulting">컨설팅 문의</a></li>
289</ul></li>
290<li class="mn-item"> <a class="mn-link" href="/brochure">고객지원</a><span class="mn-dropdown"></span>
291<ul class="sub-mn">
292<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/brochure">브로셔</a></li>
293<li class="mn-item"> <a class="mn-link" href="/data">자료실</a></li>
294<li class="mn-item"> <a class="mn-link" href="/videos">동영상 자료</a></li>
295<li class="mn-item"> <a class="mn-link" href="/estimate">견적 문의</a></li>
296<li class="mn-item"> <a class="mn-link" href="/support">기술 문의</a></li>
297<li class="mn-item"> <a class="mn-link" href="/faq">자주 묻는 질문</a></li>
298</ul></li>
299<li class="mn-item"> <a class="mn-link" href="/education">교육</a><span class="mn-dropdown"></span>
300<ul class="sub-mn">
301<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/education">교육 안내</a></li>
302<li class="mn-item"> <a class="mn-link" href="/specialized">전문가 교육 안내</a></li>
303<li class="mn-item"> <a class="mn-link" href="/request">정기 교육 신청</a></li>
304<li class="mn-item"> <a class="mn-link" href="/specialized-request">전문가 교육 신청</a></li>
305<li class="mn-item"> <a class="mn-link" href="/conference">컨퍼런스</a></li>
306<li class="mn-item"> <a class="mn-link" href="/seminar">세미나</a></li>
307<li class="mn-item"> <a class="mn-link" href="/webinar">웨비나</a></li>
308<li class="mn-item"> <a class="mn-link" href="/cultivation">인재양성 사업</a></li>
309</ul></li>
310<li class="mn-item"> <a class="mn-link" href="/board">공지사항</a><span class="mn-dropdown"></span>
311<ul class="sub-mn">
312<li class="mn-item"> <a class="mn-link" href="/newsletter">KOSTECH 뉴스레터</a></li>
313<li class="mn-item"> <a class="mn-link" href="/events">행사안내</a></li>
314<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/board">공지사항</a></li>
315</ul></li>
316<li class="mn-item"> <a class="mn-link" href="/recruit">인재채용</a><span class="mn-dropdown"></span>
317<ul class="sub-mn">
318<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/recruit">인재채용</a></li>
319<li class="mn-item"> <a class="mn-link" href="/welfare">복리후생</a></li>
320</ul></li>
321<headerend></headerend>
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349               </ul></div>
350         </div>
351      </div>
352      <div class="header-op"></div>
353   </div>
354<logo>{"type":"txt","text":"","font_size":38,"font_weight":"normal","font_family_ko":"sans-serif","font_family_en":"sans-serif","color":"#000000","letter_spacing":0}</logo><menuitems><li class="mn-item"> <a class="mn-link" href="/compnay">기업소개</a><span class="mn-dropdown"></span>
355<ul class="sub-mn">
356<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/compnay">인사말</a></li>
357<li class="mn-item"> <a class="mn-link" href="/ansys">Ansys 솔루션</a></li>
358<li class="mn-item"> <a class="mn-link" href="/map">오시는 길</a></li>
359</ul></li>
360<li class="mn-item"> <a class="mn-link" href="/automotive">
360산업군</a><span class="mn-dropdown"></span>
361<ul class="sub-mn">
362<li class="mn-item"> <a class="mn-link" href="https://kostech.co.kr/automotive">Automotive</a></li>
363<li class="mn-item"> <a class="mn-link" href="/aerospace-defense">Aerospace &amp; Defense</a></li>
364<li class="mn-item"> <a class="mn-link" href="/battery">Battery</a></li>
365<li class="mn-item"> <a class="mn-link" href="/industrialequipment">Industrial Equipment</a></li>
366<li class="mn-item"> <a class="mn-link" href="/turbomachinery">Turbomachinery</a></li>
367<li class="mn-item"> <a class="mn-link" href="/materials">Materials &amp; Chemicals</a></li>
368</ul></li>
369<li class="mn-item"> <a class="mn-link" href="/lsdyna">제품소개</a><span class="mn-dropdown"></span>
370<ul class="sub-mn">
371<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/lsdyna">LS-DYNA</a></li>
372<li class="mn-item"> <a class="mn-link" href="/ls-opt">LS-OPT</a></li>
373<li class="mn-item"> <a class="mn-link" href="/lamp">LAMP</a></li>
374<li class="mn-item"> <a class="mn-link" href="/structure">Ansys 구조해석</a></li>
375<li class="mn-item"> <a class="mn-link" href="/fluids">Ansys 유동해석</a></li>
376<li class="mn-item"> <a class="mn-link" href="/electronics">Ansys 전자기장해석</a></li>
377<li class="mn-item"> <a class="mn-link" href="/motion">Ansys Motion</a></li>
378<li class="mn-item"> <a class="mn-link" href="/discovery">Ansys Discovery</a></li>
379<li class="mn-item"> <a class="mn-link" href="/granta">Ansys Granta</a></li>
380<li class="mn-item"> <a class="mn-link" href="/axstream">AxSTREAM</a></li>
381<li class="mn-item"> <a class="mn-link" href="/systemsimulation">System Simulation</a></li>
382<li class="mn-item"> <a class="mn-link" href="/simpleware">Simpleware</a></li>
383<li class="mn-item"> <a class="mn-link" href="/j-octa">J-OCTA</a></li>
384<li class="mn-item"> <a class="mn-link" href="/jstamp">JSTAMP</a></li>
385<li class="mn-item"> <a class="mn-link" href="/digimat">Digimat</a></li>
386<li class="mn-item"> <a class="mn-link" href="/odyssee">ODYSSEE</a></li>
387<li class="mn-item"> <a class="mn-link" href="/dynaform">Dynaform</a></li>
388<li class="mn-item"> <a class="mn-link" href="/presys">PreSys</a></li>
389<li class="mn-item"> <a class="mn-link" href="/swiftcomp">SwiftComp</a></li>
390<li class="mn-item"> <a class="mn-link" href="/vabs">VABS</a></li>
391<li class="mn-item"> <a class="mn-link" href="/asap">ASAP</a></li>
392<li class="mn-item"> <a class="mn-link" href="/thums">THUMS</a></li>
393</ul></li>
394<li class="mn-item"> <a class="mn-link" href="/consulting">컨설팅</a><span class="mn-dropdown"></span>
395<ul class="sub-mn">
396<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/consulting">컨설팅 안내</a></li>
397<li class="mn-item"> <a class="mn-link" href="/c-multiphysics">컨설팅 분야</a></li>
398<li class="mn-item"> <a class="mn-link" href="/askconsulting">컨설팅 문의</a></li>
399</ul></li>
400<li class="mn-item"> <a class="mn-link" href="/brochure">고객지원</a><span class="mn-dropdown"></span>
401<ul class="sub-mn">
402<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/brochure">브로셔</a></li>
403<li class="mn-item"> <a class="mn-link" href="/data">자료실</a></li>
404<li class="mn-item"> <a class="mn-link" href="/videos">동영상 자료</a></li>
405<li class="mn-item"> <a class="mn-link" href="/estimate">견적 문의</a></li>
406<li class="mn-item"> <a class="mn-link" href="/support">기술 문의</a></li>
407<li class="mn-item"> <a class="mn-link" href="/faq">자주 묻는 질문</a></li>
408</ul></li>
409<li class="mn-item"> <a class="mn-link" href="/education">교육</a><span class="mn-dropdown"></span>
410<ul class="sub-mn">
411<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/education">교육 안내</a></li>
412<li class="mn-item"> <a class="mn-link" href="/specialized">전문가 교육 안내</a></li>
413<li class="mn-item"> <a class="mn-link" href="/request">정기 교육 신청</a></li>
414<li class="mn-item"> <a class="mn-link" href="/specialized-request">전문가 교육 신청</a></li>
415<li class="mn-item"> <a class="mn-link" href="/conference">컨퍼런스</a></li>
416<li class="mn-item"> <a class="mn-link" href="/seminar">세미나</a></li>
417<li class="mn-item"> <a class="mn-link" href="/webinar">웨비나</a></li>
418<li class="mn-item"> <a class="mn-link" href="/cultivation">인재양성 사업</a></li>
419</ul></li>
420<li class="mn-item"> <a class="mn-link" href="/board">공지사항</a><span class="mn-dropdown"></span>
421<ul class="sub-mn">
422<li class="mn-item"> <a class="mn-link" href="/newsletter">KOSTECH 뉴스레터</a></li>
423<li class="mn-item"> <a class="mn-link" href="/events">행사안내</a></li>
424<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/board">공지사항</a></li>
425</ul></li>
426<li class="mn-item"> <a class="mn-link" href="/recruit">인재채용</a><span class="mn-dropdown"></span>
427<ul class="sub-mn">
428<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/recruit">인재채용</a></li>
429<li class="mn-item"> <a class="mn-link" href="/welfare">복리후생</a></li>
430</ul></li>
431</menuitems><webfont>
431{"google":[],"custom":["Noto Sans KR"]}</webfont></div>
432<div class="header-mobile hl1-1 transform">
433   <div class="header1" style="top: 0px; position: absolute;" data-top="0" data-hei="50">
434      <div class="header-contents boxing" style="">
435         <div class="col-xs-2" style="height: auto;">
436            <div class="al-box column al-c"><div class="box tc sideNavBox hsync-nlh tc_drag" id="bW3JFW"><div class="view tb-c va-m"><a class="preview-layer" href="#" data-target="#header_side_nav" data-toggle="modal"></a><div class="header-side-nav-button" data-width="22" data-height="2" data-margin="3" data-radius="5" data-border-width="0" data-padding="16" data-background="#ffffff" data-color="#494949" data-border-color="#ffffff" data-border-radius="0"><div class="line-1"></div><div class="line-2"></div><div class="line-3"></div><style class="header-side-nav-button-style">.header-mobile .header-side-nav-button > div {width:22px !important;}.header-mobile .header-side-nav-button > div {height:2px !important;}.header-mobile .header-side-nav-button > div {margin:3px auto !important;}.header-mobile .header-side-nav-button > div {border-radius:5px !important;}.header-mobile .header-side-nav-button > div {background-color:#494949 !important;}.header-mobile .header-side-nav-button {border-width:0px !important;}.header-mobile .header-side-nav-button {padding:15px !important;}.header-mobile .header-side-nav-button {border-radius:0px !important;}.header-mobile .header-side-nav-button {background:#ffffff !important;}.header-mobile .header-side-nav-button {border-color:#ffffff !important;}<style></style></div><div class="header-side-nav hsl-1" data-width="300" data-padding="15" data-letter-spacing="1" data-font-weight-1="400" data-font-weight-2="400" data-background-1="#ffffff" data-background-2="transparent" data-color-1="#000000" data-color-2="#000000" data-border="transparent" data-color-close="#000000" data-logo="false" data-login="false" data-font-size-1="14" data-font-size-2="14" data-font-family-ko="Noto Sans KR" data-font-family-en="Noto Sans KR" data-direction="left-to-right"><div class="logo_container"><div class="logo-text hide"><a href="/">LOGO</a></div><div class="logo-img"><a href="/"><img class="logo-img-core" src="https://cdn.quv.kr/eshux9ze9%2Fup%2F60627f2d1e90f_1920.jpg" style="max-height:40px; height:40px;"></a></div></div><div id="header-mobile-ml-area" class="notuse"><div class="login-before"><div class="ml-item login-link"><a href="#" data-target="#LoginModal" role="button" data-toggle="modal">로그인</a></div><div class="ml-item join-link"><a href="/join">회원가입</a></div></div><div class="login-after active"><div class="ml-item logout-link"><a id="LogOutBtn" href="#">로그아웃</a></div><div class="ml-item mypage-link"><a href="/mypage">정보수정</a></div></div></div><div class="mn-ul-container"><ul class="mn-ul tc box hsync tc_drag" style="height: 100px; line-height: 100px;" id="bWyvRl"><headerstart></headerstart><li class="mn-item"> <a class="mn-link" href="/compnay">기업소개</a><span class="mn-dropdown"></span>
437<ul class="sub-mn">
438<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/compnay">인사말</a></li>
439<li class="mn-item"> <a class="mn-link" href="/ansys">Ansys 솔루션</a></li>
440<li class="mn-item"> <a class="mn-link" href="/map">오시는 길</a></li>
441</ul></li>
442<li class="mn-item"> <a class="mn-link" href="/automotive">산업군</a><span class="mn-dropdown"></span>
443<ul class="sub-mn">
444<li class="mn-item"> <a class="mn-link" href="https://kostech.co.kr/automotive">Automotive</a></li>
445<li class="mn-item"> <a class="mn-link" href="/aerospace-defense">Aerospace &amp; Defense</a></li>
446<li class="mn-item"> <a class="mn-link" href="/battery">Battery</a></li>
447<li class="mn-item"> <a class="mn-link" href="/industrialequipment">Industrial Equipment</a></li>
448<li class="mn-item"> <a class="mn-link" href="/turbomachinery">Turbomachinery</a></li>
449<li class="mn-item"> <a class="mn-link" href="/materials">Materials &amp; Chemicals</a></li>
450</ul></li>
451<li class="mn-item"> <a class="mn-link" href="/lsdyna">제품소개</a><span class="mn-dropdown"></span>
452<ul class="sub-mn">
453<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/lsdyna">LS-DYNA</a></li>
454<li class="mn-item"> <a class="mn-link" href="/ls-opt">LS-OPT</a></li>
455<li class="mn-item"> <a class="mn-link" href="/lamp">LAMP</a></li>
456<li class="mn-item"> <a class="mn-link" href="/structure">Ansys 구조해석</a></li>
457<li class="mn-item"> <a class="mn-link" href="/fluids">Ansys 유동해석</a></li>
458<li class="mn-item"> <a class="mn-link" href="/electronics">Ansys 전자기장해석</a></li>
459<li class="mn-item"> <a class="mn-link" href="/motion">Ansys Motion</a></li>
460<li class="mn-item"> <a class="mn-link" href="/discovery">Ansys Discovery</a></li>
461<li class="mn-item"> <a class="mn-link" href="/granta">Ansys Granta</a></li>
462<li class="mn-item"> <a class="mn-link" href="/simpleware">Simpleware</a></li>
463<li class="mn-item"> <a class="mn-link" href="/j-octa">J-OCTA</a></li>
464<li class="mn-item"> <a class="mn-link" href="/jstamp">JSTAMP</a></li>
465<li class="mn-item"> <a class="mn-link" href="/dynaform">Dynaform</a></li>
466<li class="mn-item"> <a class="mn-link" href="/presys">PreSys</a></li>
467<li class="mn-item"> <a class="mn-link" href="/swiftcomp">SwiftComp</a></li>
468<li class="mn-item"> <a class="mn-link" href="/vabs">VABS</a></li>
469<li class="mn-item"> <a class="mn-link" href="/asap">ASAP</a></li>
470<li class="mn-item"> <a class="mn-link" href="/digimat">Digimat</a></li>
471<li class="mn-item"> <a class="mn-link" href="/odyssee">ODYSSEE</a></li>
472<li class="mn-item"> <a class="mn-link" href="/thums">THUMS</a></li>
473</ul></li>
474<li class="mn-item"> <a class="mn-link" href="/consulting">컨설팅</a><span class="mn-dropdown"></span>
475<ul class="sub-mn">
476<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/consulting">컨설팅 안내</a></li>
477<li class="mn-item"> <a class="mn-link" href="/c-multiphysics">컨설팅 분야</a></li>
478<li class="mn-item"> <a class="mn-link" href="/askconsulting">컨설팅 문의</a></li>
479</ul></li>
480<li class="mn-item"> <a class="mn-link" href="/brochure">고객지원</a><span class="mn-dropdown"></span>
481<ul class="sub-mn">
482<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/brochure">브로셔</a></li>
483<li class="mn-item"> <a class="mn-link" href="/data">자료실</a></li>
484<li class="mn-item"> <a class="mn-link" href="/videos">동영상 자료</a></li>
485<li class="mn-item"> <a class="mn-link" href="/estimate">견적 문의</a></li>
486<li class="mn-item"> <a class="mn-link" href="/support">기술 문의</a></li>
487<li class="mn-item"> <a class="mn-link" href="/faq">자주 묻는 질문</a></li>
488</ul></li>
489<li class="mn-item"> <a class="mn-link" href="/education">교육</a><span class="mn-dropdown"></span>
490<ul class="sub-mn">
491<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/education">교육 안내</a></li>
492<li class="mn-item"> <a class="mn-link" href="/specialized">전문가 교육 안내</a></li>
493<li class="mn-item"> <a class="mn-link" href="/request">정기 교육 신청</a></li>
494<li class="mn-item"> <a class="mn-link" href="/specialized-request">전문가 교육 신청</a></li>
495<li class="mn-item"> <a class="mn-link" href="/conference">컨퍼런스</a></li>
496<li class="mn-item"> <a class="mn-link" href="/seminar">세미나</a></li>
497<li class="mn-item"> <a class="mn-link" href="/webinar">웨비나</a></li>
498<li class="mn-item"> <a class="mn-link" href="/cultivation">인재양성 사업</a></li>
499</ul></li>
500<li class="mn-item"> <a class="mn-link" href="/board">공지사항</a><span class="mn-dropdown"></span>
501<ul class="sub-mn">
502<li class="mn-item"> <a class="mn-link" href="/newsletter">KOSTECH 뉴스레터</a></li>
503<li class="mn-item"> <a class="mn-link" href="/events">행사안내</a></li>
504<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/board">공지사항</a></li>
505</ul></li>
506<li class="mn-item"> <a class="mn-link" href="/recruit">인재채용</a><span class="mn-dropdown"></span>
507<ul class="sub-mn">
508<li class="mn-item"> <a class="mn-link" href="http://www.kostech.co.kr/recruit">인재채용</a></li>
509<li class="mn-item"> <a class="mn-link" href="/welfare">복리후생</a></li>
510</ul></li>
511<headerend></headerend>
512</ul></div><div class="header-side-nav-close">×</div><style class="header-side-nav-style">.header-mobile .header-side-nav {width:300px !important;}.header-mobile .header-side-nav {background-color:#ffffff !important;}.header-mobile .header-side-nav .logo_container {padding-top:0px !important;}.header-mobile .header-side-nav .mn-ul > li.mn-item > ul.sub-mn {padding:0 0 0 15px !important;font-family:"Noto Sans KR", "Noto Sans KR" !important;}.header-mobile .header-side-nav .mn-ul > li.mn-item > ul.sub-mn > li a {padding:7.5px 7.5px 15px !important;}.header-mobile .header-side-nav .mn-ul > li.mn-item > a.mn-link {padding:15px !important;letter-spacing:1px !important;font-size:14px !important;font-weight:400 !important;font-family:"Noto Sans KR", "Noto Sans KR" !important;color:#000000 !important;}.header-mobile .header-side-nav .mn-ul li.mn-item:hover { background-color:transparent !important;}.header-mobile .header-side-nav .mn-ul li.mn-item:hover > a.mn-link {color:#000000 !important;}.header-mobile .header-side-nav ul.sub-mn > li a {font-size:14px !important;font-weight:400 !important;font-family:"Noto Sans KR", "Noto Sans KR" !important;color:#000000 !important;}.header-mobile .header-side-nav ul.sub-mn > li:hover a {color:#000000 !important;}.header-mobile .header-side-nav > .mn-ul-container > ul > li > .mn-dropdown:after {border-color:#000000 !important; top:15px !important; width:7px!important; height:7px!important;}.header-mobile .header-side-nav > .mn-ul-container > ul > li > .mn-dropdown:hover:after {border-color:#000000 !important;}.header-mobile .header-side-nav > .header-side-nav-close {color:#000000 !important;}.header-mobile .header-side-nav > .logo_container {display:none !important;}.header-mobile .header-side-nav > #header-mobile-ml-area {display:none !important;}.header-mobile .header-side-nav > #header-mobile-ml-area .login-before > div {border-color:#000000 !important;}.header-mobile .header-side-nav > #header-mobile-ml-area .login-before > div > a {color:#000000 !important;}.header-mobile .header-side-nav > #header-mobile-ml-area .login-after > div {border-color:#000000 !important;}.header-mobile .header-side-nav > #header-mobile-ml-area .login-after > div > a {color:#000000 !important;}</style></div></div></div>
513               <div class="tc box hsync-nlh tc_drag" id="bPAzuu">
514                  <div class="view">
515                  </div>
516               </div>
517            </div>
518         </div>
519         <div class="col-xs-8" style="height: auto;">
520            <div class="al-box column al-c">
521               <div class="tc box hsync-nlh logoBox tc_drag" id="bQ6GEr">
522                  <div class="view logo_container"><div class="logo-text hide"><a href="/">LOGO</a></div><div class="logo-img"><a href="/"><img class="logo-img-core" src="https://cdn.quv.kr/eshux9ze9%2Fup%2F60627f2d1e90f_1920.jpg" style="max-height: 50px; height: 44px;"></a></div></div>
523               </div>
524            </div>
525         </div>
526         <div class="col-xs-2" style="height: auto;">
527            <div class="al-box column al-c">
528               <div class="box tc hsync-nlh tc_drag" id="bdz1Z2">
529                  <div class="view">
530                  </div>
531               </div>
532            </div>
533         </div>
534      </div>
535      <div class="header-op">
536      </div>
537   <div class="header-mobile-config"><div class="header-mobile-config-section-insert">&nbsp;</div><div class="header-mobile-config-section-delete">&nbsp;</div><div class="header-mobile-config-section-detail">섹션 설정</div></div></div>
538<logo>{"type":"img","src":"https://cdn.quv.kr/eshux9ze9%2Fup%2F60627f2d1e90f_1920.jpg","height":"40"}</logo><menuitems><li class="mn-item"> <a class="mn-link" href="/compnay">기업소개</a><span class="mn-dropdown"></span>
539<ul class="sub-mn">
540<li class="mn-item"> <a class="mn-link" href="/56">인사말</a></li>
541<li class="mn-item"> <a class="mn-link" href="/map">오시는 길</a></li>
542</ul></li>
543<li class="mn-item"> <a class="mn-link" href="/products">제품소개</a><span class="mn-dropdown"></span>
544<ul class="sub-mn">
545<li class="mn-item"> <a class="mn-link" href="/5">LS-DYNA</a></li>
546<li class="mn-item"> <a class="mn-link" href="/ls-opt">LS-OPT</a></li>
547<li class="mn-item"> <a class="mn-link" href="/dynaform">DYNAFORM</a></li>
548<li class="mn-item"> <a class="mn-link" href="/digimat">DIGIMAT</a></li>
549<li class="mn-item"> <a class="mn-link" href="/axstream">AxSTREAM</a></li>
550<li class="mn-item"> <a class="mn-link" href="/axcycle">AxCYCLE</a></li>
551<li class="mn-item"> <a class="mn-link" href="/fcm">FCM</a></li>
552<li class="mn-item"> <a class="mn-link" href="/thums">THUMS</a></li>
553<li class="mn-item"> <a class="mn-link" href="/simpack">SIMPACK</a></li>
554<li class="mn-item"> <a class="mn-link" href="/j-octa">J-OCTA</a></li>
555<li class="mn-item"> <a class="mn-link" href="/presys">PreSys</a></li>
556</ul></li>
557<li class="mn-item"> <a class="mn-link" href="/consulting">컨설팅</a><span class="mn-dropdown"></span>
558<ul class="sub-mn">
559<li class="mn-item"> <a class="mn-link" href="/3">컨설팅 안내</a></li>
560<li class="mn-item"> <a class="mn-link" href="/consultingarea">컨설팅 분야</a></li>
561<li class="mn-item"> <a class="mn-link" href="/askconsulting">컨설팅 문의</a></li>
562</ul></li>
563<li class="mn-item"> <a class="mn-link" href="/customer">고객지원</a><span class="mn-dropdown"></span>
564<ul class="sub-mn">
565<li class="mn-item"> <a class="mn-link" href="/24">브로셔</a></li>
566<li class="mn-item"> <a class="mn-link" href="/data">자료실</a></li>
567<li class="mn-item"> <a class="mn-link" href="/videos">동영상 자료</a></li>
568<li class="mn-item"> <a class="mn-link" href="/estimate">견적 문의</a></li>
569<li class="mn-item"> <a class="mn-link" href="/support">기술 문의</a></li>
570<li class="mn-item"> <a class="mn-link" href="/faq">자주 묻는 질문</a></li>
571</ul></li>
572<li class="mn-item"> <a class="mn-link" href="/education">교육</a><span class="mn-dropdown"></span>
573<ul class="sub-mn">
574<li class="mn-item"> <a class="mn-link" href="/33">교육안내</a></li>
575<li class="mn-item"> <a class="mn-link" href="/specialized">전문가 교육 안내</a></li>
576<li class="mn-item"> <a class="mn-link" href="/request">정기 교육 신청</a></li>
577<li class="mn-item"> <a class="mn-link" href="/48">전문가 교육 신청</a></li>
578<li class="mn-item"> <a class="mn-link" href="/conference">컨퍼런스</a></li>
579</ul></li>
580<li class="mn-item"> <a class="mn-link" href="/board">공지사항</a><span class="mn-dropdown"></span>
581<ul class="sub-mn">
582<li class="mn-item"> <a class="mn-link" href="/6">공지사항</a></li>
583<li class="mn-item"> <a class="mn-link" href="/events">행사안내</a></li>
584<li class="mn-item"> <a class="mn-link" href="/newsletter">KOSTECH 뉴스레터</a></li>
585<li class="mn-item"> <a class="mn-link" href="/fea">FEA 뉴스레터</a></li>
586</ul></li>
587<li class="mn-item"> <a class="mn-link" href="/recruit">인재채용</a><span class="mn-dropdown"></span>
588<ul class="sub-mn">
589<li class="mn-item"> <a class="mn-link" href="/89">인재채용</a></li>
590</ul></li>
591</menuitems></div>    <div class="body  pl-n">
592        <!-- container --><div class="frm m-pd-v-0 mobile-font-scale-2 m-pd-h-0" style="text-align: center; display: block; margin: 0px; padding: 100px 0px 0px; background: url(&quot;//cdn.quv.kr/eshux9ze9%2Fus%2FZGjbiukp_-A_1920.jpg&quot;) 48% 30% / cover no-repeat scroll transparent; border: none; border-radius: 0px;" id="fFbiz6" data-hei="230px" data-cwid="b" data-m-hei="100px"><div class="preview"></div>      <div class="view ha-c boxing" style="">      <div class="tb tbu" style="height: auto;">         <div class="row clearfix tb-c va-m" style="display: table-cell; transform: none; height: 130px;">            <div class="col-sm-12 column" style="height: auto;">                              <div class="box tbu txtBox qv-in-viewport" id="bAtJ3I" data-hei="115" style="display: table; height: 115px; margin: 0px; padding: 0px; background: none rgba(0, 0, 0, 0); text-align: center; bo
592rder: 0px solid transparent; border-radius: 0px;" data-style="display: table;" data-m-hei="29px"><div class="preview"></div>                                    <div class="view tb-c va-m" data-lh="1.4" style="letter-spacing: 0em; line-height: 1.4; display: table-cell;">                     <div class="drag_inner qv-text" contenteditable="false"><p><span style="font-size:36px;"><strong><span style="letter-spacing:4px;margin-right:-4px;"><span style="color:#ffffff;"><span style="font-family:Noto Sans KR;">기업소개</span></span></span></strong></span></p>
593<p><span style="font-size:22px;"><span style="color:#ffffff;"><span style="letter-spacing:5px;margin-right:-5px;">OUR COMPANY</span></span></span></p>
594</div>                  </div>               <style class="mobile-box">@media (max-width: 767px) { #bAtJ3I {height:29px !important;} } .mobile_editor_mode #bAtJ3I {height:29px !important;} </style></div>                           </div>         </div>      </div>   </div><style class="mobile-frm">@media (max-width: 767px) {#fFbiz6 > .view > .tb{height:100px !important;}} .mobile_editor_mode #fFbiz6 > .view > .tb{height:100px !important;}</style></div><div class="frm m-pd-v-0 mobile-font-scale-2 m-pd-h-10" style="text-align: center; margin: 50px 0px; padding: 0px; background: none transparent; border: none; border-radius: 0px;" id="ffwQxy" data-hei="" data-cwid="b" data-m-hei="30px"><div class="preview"></div><div class="view boxing ha-c" style=""><div class="tb tbu" style="height: auto;"><div class="row clearfix tb-c va-m" style="transform: none; display: table-cell; height: auto;"><div class="col-sm-12 column" style="height: auto;"><div class="box tbu iconBox" style="text-align: center; display: table; height: auto; margin: 0px; padding: 0px; background: none rgba(0, 0, 0, 0); border: 0px solid transparent; border-radius: 0px;" id="bJfQFP" data-hei="26" data-style="text-align: center; display: table; height: 45px;" data-m-hei="20px"><div class="preview"></div>                                                                  <div class="view tb-c va-m" style="display: table-cell;">                                    <a class="preview-layer" href="#" data-target="#IconModal" data-toggle="modal" data-obj="icon"></a>                                    <a class="icon-area" style="">                                    <i class="fa fa-minus" style="color:#000000;font-size:26px;"></i>                                    </a>                                 </div>                              <style class="mobile-box">@media (max-width: 767px) { #bJfQFP {height:20px !important;} } .mobile_editor_mode #bJfQFP {height:20px !important;} </style></div><div class="box tbu txtBox" id="batOd5" data-hei="85" style="display: table; margin: 0px; padding: 0px; background: none rgba(0, 0, 0, 0); text-align: center; border: 0px solid transparent; border-radius: 0px; height: auto;" data-style="display: table;"><div class="preview"></div>                                                                  <div class="view tb-c va-m" style="display: table-cell;">                                    <div class="drag_inner qv-text" contenteditable="false"><p><span style="letter-spacing:5px;margin-right:-5px;">OUR COMPANY</span></p>
595<p><span style="font-size:32px;"><strong><span style="letter-spacing:3px;margin-right:-3px;"><span style="font-family:Noto Sans KR;">인사말</span></span></strong></span></p>
596</div>                                 </div>                              </div></div></div></div></div><style class="mobile-frm">@media (max-width: 767px) {#ffwQxy > .view > .tb{height:30px !important;}} .mobile_editor_mode #ffwQxy > .view > .tb{height:30px !important;}</style></div><div class="frm mobile-font-scale-2 m-pd-v-0 m-pd-h-10" style="text-align: center; margin: 0px 0px 100px; display: block; padding: 0px; background: none transparent; border: none; border-radius: 0px;" data-m-hei="653px" data-hei="" id="fKU5W2" data-cwid="b"><div class="preview"></div>                                                                  <div class="view boxing ha-c" style="">                                    <div class="tb tbu" style="height: auto;">                                       <div class="row clearfix tb-c va-m" style="transform: none; display: table-cell; height: auto;">                                          <div class="column col-sm-5 pp_last_grid" pp_grid="5" style="height: auto;">                                                                                       <div class="frm empty-frm" style="text-align: center; margin: 0px; display: block; padding: 0px; background: url(&quot;//cdn.quv.kr/eshux9ze9/up/5d4123d14876d_1920.JPG&quot;) 50% 50% / cover no-repeat scroll rgba(0, 0, 0, 0); border: 0px solid transparent; border-radius: 0px;" data-m-hei="200px" data-hei="300px" id="flafW6" data-cwid=""><div class="preview"></div><div class="view ha-c"><div class="tb tbu" style="height: 300px;"><div class="row clearfix tb-c va-t" style="transform: none; display: table-cell; height: auto;"><div class="col-sm-12 column" style="height: auto;"> </div></div></div></div><style class="mobile-frm">@media (max-width: 767px) {#flafW6 > .view > .tb{height:200px !important;}} .mobile_editor_mode #flafW6 > .view > .tb{height:200px !important;}</style></div></div>                                          <div class="column col-sm-7" style="height: auto;">                                             <div class="box tbu txtBox" id="bdmnSS" data-hei="510" style="display: table; height: auto; margin: 0px; padding: 0px 20px; background: none rgba(0, 0, 0, 0); text-align: center; border: 0px solid transparent; border-radius: 0px;" data-m-hei="440px"><div class="preview"></div>                                                                                                <div class="view tb-c va-m" data-lh="1.4" style="letter-spacing: 0em; line-height: 1.4; display: table-cell;">                                                   <div class="drag_inner qv-text" contenteditable="false"><p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">1997년 설립된 이래 CAE분야의 토탈 솔루션 판매와 기술용역을&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">제공하는 전문 기업으로 성장해 왔습니다.</span></span></p>
597<p style="text-align: left;">&nbsp;</p>
598<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">고객의 다양한 요구사항에 맞는 최적화된 솔루션을 제공하고&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">CAE 및&nbsp;CAD 토탈 솔루션을 제공하는 기업으로</span></span></p>
599<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">거듭나기 위해&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">끊임없이 노력하고 있습니다.</span></span></p>
600<p style="text-align: left;">&nbsp;</p>
601<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">충돌해석,&nbsp;구조해석,&nbsp;선형,&nbsp;비선형,&nbsp;최적설계,&nbsp;복합소재 등&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">다양한 분야에 관련된 소프트웨어 판매와</span><span style="font-family:Noto Sans KR;">&nbsp;기술용역을 통해</span></span></p>
602<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">자동차, 전자, 중공업, 방산, 화학 등&nbsp;국내 CAE 산업 발전에&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">더욱더 기여하겠습니다.</span></span></p>
603<p style="text-align: left;">&nbsp;</p>
604<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">빠르게 변화하는 환경 속에서 지속적으로 성장하기 위해&nbsp;</span></span><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">한 발 앞서 변화를 감지하여 고객과 시장이 원하는</span></span></p>
605<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">새로운 가치를 제공하도록 노력 하겠습니다.</span></span></p>
606<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">감사합니다.</span></span></p>
607<p style="text-align: left;">&nbsp;</p>
608<p style="text-align: left;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">한국시뮬레이션기술(주) 임직원 일동</span></span></p>
609</div>                                                </div>                                             <style class="mobile-box">@media (max-width: 767px) { #bdmnSS {height:440px !important;} } .mobile_editor_mode #bdmnSS {height:440px !important;} </style></div>                                          </div>                                       </div>                                    </div>                                 </div>                              <style class="mobile-frm">@media (max-width: 767px) {#fKU5W2 > .view > .tb{height:653px !important;}} .mobile_editor_mode #fKU5W2 > .view > .tb{height:653px !important;}</style></div><webfont>
609{"google":[],"custom":["Noto Sans KR"]}</webfont><webfont>{"google":[],"custom":["Noto Sans KR"]}</webfont><!-- naver, google, kakao login script -> header.inc.html 에서 호출 함 -->
610
611<!--GOOGLE-->
612<!-- 커스텀 버튼 : https://developers.google.com/identity/sign-in/web/build-button -->
613<!--
613<script src="https://apis.google.com/js/platform.js" async defer></script>
613-->
614
615<!--KAKAO-->
616<!--
616<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
616-->
617
618<!--NAVER-->
619<!--
619<script type="text/javascript" src="https://static.nid.naver.com/js/naveridlogin_js_sdk_2.0.0.js" charset="utf-8"></script>
619-->
620
621<!--2019.03.11 재헌 - 리캡챠 미사용으로 주석처리 -->
622<!--RECAPTCHA-->
623<!--
vendor: 75 bytes, line 623
623<script src="https://www.google.com/recaptcha/api.js" async defer></script>
623-->
624
625<link rel="stylesheet" href="/css/member.css?v=260904">
626
627<div class="modal fade login-modal" id="LoginModal" tabindex="-1" role="dialog" style="top: 0px !important;">
628    <div class="modal-dialog">
629        <div class="modal-content">
630            <div class="modal-header">
631                <div class="modal-header-title">로그인</div>
632            </div>
633
634            <div class="modal-body" style="display:grid; max-height: 700px;">
635                <div class="login-form">
636                    <input type="text" class="login-form-id" placeholder="아이디" autocomplete="off">
637                    <input type="password" class="login-form-pw" placeholder="비밀번호" autocomplete="off">
638                </div>
639                <div class="login-confirm">
640                    로그인                </div>
641                <input type="submit" style="display:none"/>
642                <div class="login-options">
643                    <div id="login-options-join" class="login-options-join">
644                        회원가입                    </div>
645                    <div id="login-options-find" class="login-options-find">
646                        비밀번호 찾기                    </div>
647                </div>
648
649                <div class="login-divider"></div>
650
651                <div class="sns-login-form">
652                    <div class="sns-login-form-naver">
653                        <!--<div id="naverIdLogin" style="display: none;"></div>-->
654                        <div id="naver-login-button">
655                            <img src="/img/ico/login/naver_logo.png">
656                            네이버 아이디로 로그인                        </div>
657                        <!--<div class="g-signin2" data-onsuccess="onSuccess_google" data-theme="dark"></div>-->
658                    </div>
659                    <div class="sns-login-form-kakao">
660                        <div id="kakao-login-button">
661                            <img src="/img/ico/login/kakao_logo.png">
662                            카카오 아이디로 로그인                        </div>
663                        <!--                        <a id="kakao-login-button"></a>-->
664                        <!--                        <a href="http://developers.kakao.com/logout"></a>-->
665                    </div>
666                    <div class="sns-login-form-google">
667                        <div id="google-login-button">
668                            <img src="/img/ico/login/google_new_icon.svg">
669                            구글 아이디로 로그인                        </div>
670                        <!--<div class="g-signin2" data-onsuccess="onSuccess_google" data-theme="dark"></div>-->
671                    </div>
672                </div>
673            </div>
674            <!--<div class="modal-footer">-->
675            <!--</div>-->
676        </div>
677    </div>
678</div>
679
680<div class="modal fade find-password-modal z-index-1060" id="FindPasswordModal" tabindex="-1" role="dialog" style="top: 0px !important;">
681    <div class="modal-dialog">
682        <div class="modal-content">
683            <div class="modal-header">
684                <div class="modal-header-title">비밀번호 재설정</div>
685            </div>
686
687            <div class="modal-body" style="display:grid; max-height: 700px;">
688                <div class="find-password-description">
689                    비밀번호를 찾고자 하는 아이디 또는 이메일을 입력해 주세요.                    <br>
690                    해당 계정의 이메일로 비밀번호 변경 안내 메일이 발송됩니다.                </div>
691
692                <div class="find-password-form">
693                    <input type="text" id="find-password-form-account" class="find-password-form-account" placeholder="가입한 계정 또는 이메일">
694                </div>
695                <div class="find-password-confirm" onclick="find_password_confirm();">
696                    <div>비밀번호 재설정</div>
697                </div>
698
699                <!--2018.10.16 재헌-->
700                <!--recapcha 걷어냄-->
701                <!--<div class="find-password-captcha">-->
702                    <!--<form id="find-password-recaptcha-form" method="POST">-->
703                        <!--<div id="find-password-recaptcha"></div>-->
704                        <!--<input id="hidden-grecaptcha" name="hidden-grecaptcha" type="hidden"/>-->
705                    <!--</form>-->
706                <!--</div>-->
707            </div>
708            <!--<div class="modal-footer">-->
709            <!--</div>-->
710        </div>
711        <div class="qv-loader qv-loader-black"></div>
712    </div>
713</div>
714
715<div class="modal fade change-password-modal" id="ChangePasswordModal" tabindex="-1" role="dialog" style="top: 0px !important;">
716    <div class="modal-dialog">
717        <div class="modal-content">
718            <div class="modal-header">
719                <div class="modal-header-title">비밀번호 변경</div>
720            </div>
721
722            <div class="modal-body">
723                <div class="change-password-description">
724                    새로운 비밀번호를 입력하세요.                </div>
725
726                <div class="change-password-form">
727                    <input type="password" id="change-pw1" class="change-pw1" placeholder="변경할 비밀번호" autocomplete="off">
728                    <input type="password" id="change-pw2" class="change-pw2" placeholder="변경할 비밀번호 확인" autocomplete="off">
729                </div>
730                <div class="change-password-notice">
731                    <div class="change-password-advisor">
732                        <i class="fa fa-lock" style="font-size: 20px;" aria-hidden="true"></i>
733                    </div>
734                    <p>영문, 숫자, 특수문자를 포함하여 8~20자로 입력해주세요.</p>
735                </div>
736                <div class="change-password-confirm">
737                    <div onclick="change_password_confirm();">비밀번호 변경</div>
738                </div>
739            </div>
740            <!--<div class="modal-footer">-->
741            <!--</div>-->
742        </div>
743        <div class="qv-loader qv-loader-black"></div>
744    </div>
745</div>
746
747
748<!--member.js inc/script.inc.html 에 위치 -->
749<script type='text/javascript'>
750    var NAVER_CLIENT_ID = '';
751    var NAVER_CLIENT_SECRET = '';
752    var NAVER_AUTH_URL = '';
753    var KAKAO_CLIENT_ID = '';
754    var KAKAO_PLUS_FRIEND_ID = '';
755    var GOOGLE_CLIENT_ID = '';
756    var GOOGLE_CAPTCHA_KEY = '6Lf62UcUAAAAAEEWIFWPJc_oE-PlkmlZ2h665q9K';
757
758    $('#LoginModal').on('show.bs.modal', function () {
759        $(this).find('.modal-header-title-sub').remove();
760    });
761    $('#LoginModal').on('hidden.bs.modal', function () {
762        if ($('.modal.fade.in').length > 0) {
763            $('body').addClass('modal-open');
764        }
765    });
766    
767    $(function() {
768        var query = qv_func.getUrlParams();
769        if (query.m == 'change_password') {
770            $('#ChangePasswordModal').modal('show');
771        }
772        else {
773            initSocialLoginClientId();
774        }
775
776
777//        // KAKAO
778//        // https://developers.kakao.com/docs/restapi/tool#user-api
779//        //<![CDATA[
780//        // 사용할 앱의 JavaScript 키를 설정해 주세요.
781//        Kakao.init('eeebfc46f7f77f5855c5be2ca40594e3');
782//        // 카카오 로그인 버튼을 생성합니다.
783//        Kakao.Auth.createLoginButton({
784//            container: '#kakao-login-button',
785//            success: function(authObj) {
786//                Kakao.API.request({
787//                    url: '/v1/user/me',
788//                    success: function(res) { onSuccess_kakao(authObj, res); }
789//                });
790//            },
791//            fail: function(err) {
792//                alert(JSON.stringify(err));
793//            }
794//        });
795//        //]]>
796//
797//        // GOOGLE
798//        // https://developers.google.com/+/web/signin/
799//        // 새로고침 시 onsuccess가 발동하는 문제가있음 --> 해결 http://usefulangle.com/post/55/google-login-javascript-api
800//        gapi.signin2.render('google-login-button', {
801//            'scope': 'profile email',
802//            'width': 240,
803//            'height': 50,
804//            'longtitle': false,
805//            'theme': 'dark',
806//            'onsuccess': function () {},
807//            'onfailure': function () {}
808//        });
809    });
810
811    function initSocialLoginClientId() {
812        var data = [];
813        if (data == null || data.length == 0) {
814            $('.sns-login-form-naver').remove();
815            $('.sns-login-form-kakao').remove();
816            $('.sns-login-form-google').remove();
817            $('.login-divider').remove();
818        }
819        else {
820            $.each(data, function () {
821                switch (this.ssi_type) {
822                    case "1": // NAVER LOGINcol-sm-2
823                        if (this.ssi_state == "0" || this.ssi_key1 == '') {
824                            $('.sns-login-form-naver').remove();
825                        }
826                        else {
827                            $('.sns-login-form-naver > div').show();
828                            NAVER_CLIENT_ID = this.ssi_key1;
829                            NAVER_CLIENT_SECRET = this.ssi_key2;
830                            // 네이버 버튼 규정, 재 디자인 필요
831                            // https://developers.naver.com/docs/login/bi/
832
833                            if (typeof naver === 'object') {
834                                naverLogin = new naver.LoginWithNaverId(
835                                    {
836                                        clientId: NAVER_CLIENT_ID,
837                                        callbackUrl: location.protocol + '//' + QV_BASE_OBJ.eng_domain + "/oauth/callback.php?cliendId=" + NAVER_CLIENT_ID,
838                                        isPopup: true
839                                        //callbackHandle: true,
840                                        //loginButton: {color: "green", type: 3, height: 43, width: 370} /* 로그인 버튼의 타입을 지정 */
841                                    }
842                                );
843                                naverLogin.init();
844                                NAVER_AUTH_URL = naverLogin.generateAuthorizeUrl();
845                                $('#naver-login-button').data('authUrl', NAVER_AUTH_URL);
846                            }
847                        }
848                        break;
849                    case "2": // KAKAO LOGIN
850                        if (this.ssi_state == "0" || this.ssi_key1 
850== '') {
851                            $('.sns-login-form-kakao').remove();
852                        }
853                        else {
854                            $('.sns-login-form-kakao > div').show();
855                            KAKAO_CLIENT_ID = this.ssi_key1;
856                            KAKAO_PLUS_FRIEND_ID = this.ssi_key2;
857
858                            if (typeof Kakao === 'object') {
859                                Kakao.init(KAKAO_CLIENT_ID);
860                            }
861                        }
862                        break;
863                    case "3": // GOOGLE LOGIN
864                        if (this.ssi_state == "0" || this.ssi_key1 == '') {
865                            $('.sns-login-form-google').remove();
866                        }
867                        else {
868                            $('.sns-login-form-google > div').show();
869                            GOOGLE_CLIENT_ID = this.ssi_key1;
870                        }
871                        break;
872                }
873            });
874
875            if ($('.sns-login-form').children().length == 0) {
876                $('.login-divider').remove();
877            }
878        }
879    }
880
881    function initSocialLoginClientId_dummy() {
882        qvjax_direct(
883            "select_sns_info",
884            "/module/member/member.php",
885            '',
886            function (data) {
887                if (data.length == 0) {
888                    $('.sns-login-form-naver').remove();
889                    $('.sns-login-form-kakao').remove();
890                    $('.sns-login-form-google').remove();
891                    $('.login-divider').remove();
892                }
893                else {
894                    $.each(data, function () {
895                        switch (this.ssi_type) {
896                            case "1": // NAVER LOGINcol-sm-2
897//                                $.getScript( "https://static.nid.naver.com/js/naveridlogin_js_sdk_2.0.0.js", function( data, textStatus, jqxhr ) {
898//
899//                                });
900                                if (this.ssi_state == "0" || this.ssi_key1 == '') {
901                                    $('.sns-login-form-naver').remove();
902                                }
903                                else {
904                                    NAVER_CLIENT_ID = this.ssi_key1;
905                                    NAVER_CLIENT_SECRET = this.ssi_key2;
906                                    // 네이버 버튼 규정, 재 디자인 필요
907                                    // https://developers.naver.com/docs/login/bi/
908
909                                    naverLogin = new naver.LoginWithNaverId(
910                                        {
911                                            clientId: NAVER_CLIENT_ID,
912                                            //callbackUrl: document.location.origin + "/oauth/callback.php?cliendId=" + NAVER_CLIENT_ID,
913                                            callbackUrl: location.protocol + '//' + QV_BASE_OBJ.eng_domain + "/oauth/callback.php?cliendId=" + NAVER_CLIENT_ID,
914                                            isPopup: true
915                                            //callbackHandle: true,
916                                            //loginButton: {color: "green", type: 3, height: 43, width: 370} /* 로그인 버튼의 타입을 지정 */
917                                        }
918                                    );
919                                    naverLogin.init();
920                                    NAVER_AUTH_URL = naverLogin.generateAuthorizeUrl();
921                                    $('#naver-login-button').data('authUrl', NAVER_AUTH_URL);
922                                }
923                                break;
924                            case "2": // KAKAO LOGIN
925                                if (this.ssi_state == "0" || this.ssi_key1 == '') {
926                                    $('.sns-login-form-kakao').remove();
927                                }
928                                else {
929                                    KAKAO_CLIENT_ID = this.ssi_key1;
930                                    KAKAO_PLUS_FRIEND_ID = this.ssi_key2;
931
932                                    if (typeof Kakao === 'object') {
933                                        Kakao.init(KAKAO_CLIENT_ID);
934                                    }
935                                }
936                                break;
937                            case "3": // GOOGLE LOGIN
938                                if (this.ssi_state == "0" || this.ssi_key1 
938== '') {
939                                    $('.sns-login-form-google').remove();
940                                }
941                                else {
942                                    GOOGLE_CLIENT_ID = this.ssi_key1;
943                                }
944                                break;
945                        }
946                    });
947
948                    if ($('.sns-login-form').children().length == 0) {
949                        $('.login-divider').remove();
950                    }
951                }
952            },
953            function (xhr) {}
954        );
955    }
956
957</script>
957
958<div class="modal fade join-modal" id="JoinModal" tabindex="-1" role="dialog" style="top: 0px !important;">
959    <div class="modal-dialog">
960        <div class="modal-content">
961<!--            <div class="modal-header" style="padding-bottom: 20px;">-->
962<!--                <div class="modal-header-title">회원가입</div>-->
963<!--            </div>-->
964
965            <div class="modal-body" style="display:grid; max-height: 700px; padding: 2px 15px;">
966                <div class="join-type">
967                    <!-- 회원가입 유형 선택 -->
968                    <div class="join-type-group2">
969<!--                        <span class="join-type-description"></span>-->
970                        <div class="join-type-normal"><div>ID/PW로 가입하기</div></div>
971                    </div>
972                    <div class="join-type-group1">
973<!--                        <span class="join-type-description"></span>-->
974                        <div class="join-type-naver"><img src="/img/ico/login/naver_logo.png"><div>네이버 아이디로 가입하기</div></div>
975                        <div class="join-type-kakao"><img src="/img/ico/login/kakao_logo.png"><div>카카오 아이디로 가입하기</div></div>
976                        <div class="join-type-google"><img src="/img/ico/login/google_new_icon.svg"><div>구글 아이디로 가입하기</div></div>
977                    </div>
978                </div>
979            </div>
980        </div>
981    </div>
982</div>
983<script>
984    $(function() {
985        $('.join-type-normal').on('click', function() {
986            location.href = '/join';
987        });
988
989        $('.modal').on('hidden.bs.modal', function () {
990            $('body').css('padding-right', 0); // 모달 부분에서 버그. padding-right +17px 계속 적용시킴
991        });
992
993        $('#JoinModal').on('show.bs.modal', function () {
994            if (NAVER_CLIENT_ID == '' && KAKAO_CLIENT_ID == '' && GOOGLE_CLIENT_ID == '') {
995                location.href = "/join";
996                return;
997            }
998
999            // NAVER
1000            if (NAVER_CLIENT_ID == '') {
1001                $('.join-type-naver').remove();
1002            }
1003            else {
1004                $('.join-type-naver').off('click.join');
1005                $('.join-type-naver').on('click.join', function() {
1006                    location.href = NAVER_AUTH_URL;
1007                });
1008            }
1009
1010            // KAKAO
1011            if (KAKAO_CLIENT_ID == '') {
1012                $('.join-type-kakao').remove();
1013            }
1014            else {
1015                $('.join-type-kakao').off('click.join');
1016                $('.join-type-kakao').on('click.join', function() {
1017                    Kakao.Auth.login({
1018                        success: function(authObj) {
1019                            Kakao.API.request({
1020                                url: '/v2/user/me',
1021                                success: function(res) { onSuccess_kakao(authObj, res); }
1022                            });
1023                        },
1024                        fail: function(err) {
1025                            alert(JSON.stringify(err));
1026                        }
1027                    });
1028                });
1029            }
1030
1031            // GOOGLE
1032            if (GOOGLE_CLIENT_ID == '') {
1033                $('.join-type-google').remove();
1034            }
1035            else {
1036                $('.join-type-google').off('click.join');
1037                $('.join-type-google').on('click.join', function() {
1038                    gapi.load('auth2', function(){
1039                        // Retrieve the singleton for the GoogleAuth library and set up the client.
1040                        auth2 = gapi.auth2.init({
1041                            client_id: GOOGLE_CLIENT_ID,
1042                            cookiepolicy: 'single_host_origin',
1043                            plugin_name: 'chat'
1044                        });
1045
1046                        grantPermissions();
1047
1048                        // API call for Google login
1049                        gapi.auth2.getAuthInstance().signIn().then(
1050                            function(success) {
1051                                // Login API call is successful
1052                                onSuccess_google(success);
1053                            },
1054                            function(error) {
1055                                // Error occurred
1056                                onFailure_google(error);
1057                            }
1058                        );
1059                    });
1060                });
1061            }
1062        });
1063    });
1064</script>
1064</div><div class="footer-frame footer-theme-1 footer-frame-pc" style="">   <div class="frm" style="text-align: center; margin: 0px; display: block; padding: 0px 20px; background: none rgb(0, 0, 0); border: 0px solid transparent; border-radius: 0px;" id="fQLZgn" data-hei="" data-cwid="">      <div class="preview"></div>      <div class="view ha-c" style="">         <div class="tb tbu" style="height: auto;">            <div class="row clearfix tb-c va-m" style="display: table-cell; transform: none; height: auto;">               <div class="col-sm-12 column" style="height: auto;"><div class="frm" style="text-align: center; margin: 12px 0px; display: block; padding: 0px; background: none transparent; border: 0px solid transparent; border-radius: 0px;" data-m-hei="100px" data-hei="" id="fh9yl7" data-cwid="1000px">
1065<div class="preview"></div>
1066<div class="view ha-c" style="max-width: 1000px;">
1067<div class="tb tbu" style="height: auto;">
1068<div class="row clearfix tb-c va-m" style="transform: none; height: auto; display: table-cell;">
1069<div class="col-sm-12 column" style="height: auto;"><div class="frm" style="text-align: center; margin: 12px 0px; display: block; padding: 0px; background: none transparent; border: 0px solid transparent; border-radius: 0px;" data-m-hei="100px" data-hei="" id="fNNMJj" data-cwid="">
1070<div class="preview"></div>
1071<div class="view ha-c">
1072<div class="tb tbu" style="height: auto;">
1073<div class="row clearfix tb-c va-m" style="transform: none; height: auto; display: table-cell;">
1074<div class="column col-sm-9 pp_last_grid" style="height: auto;" pp_grid="9"><div class="box tbu" id="bCxVgh" style="display: table; height: auto; margin: 0px; padding: 0px; background: none transparent; text-align: center; border: 0px solid transparent; border-radius: 0px;" data-m-hei="119px" data-hei="58">                     <div class="preview"></div>                     <div class="view tb-c va-m" style="display: table-cell;">                        <div class="qv-text txtBox" contenteditable="false"><p class="text-m" style="font-size: 1em; text-align: left;"><span style="color:#ffb008;"><strong><span style="font-size:20px;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-family:Noto Sans KR;">한국시뮬레이션기술(주)&nbsp;</span></span></span></strong></span></p>
1075<p class="text-m" style="font-size: 1em; text-align: left;"><span style="color:#ffffff;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">T.031-903-2061|F.031-903-2076|E. [email protected]</span></span></span></span></p>
1076<p class="text-m" style="font-size: 1em; text-align: left;"><span style="color:#ffffff;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">(10401) 경기도 고양시 일산동구 무궁화로18 남정시티프라자1차 804</span></span><span style="font-size:14px;"><span style="font-family:Noto Sans KR;">호</span></span></span></span></p>
1077<p class="text-m" style="font-size: 1em; text-align: left;"><span style="color:#ffffff;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-size:16px;"><span style="font-family:Noto Sans KR;">&nbsp;Copyright ⓒ Korea Simulation Technologies Co., Ltd. All Rights Reserved.</span></span></span></span></p>
1078</div>                     </div>                  </div></div>
1079<div class="col-sm-3 column" style="height: auto;"><div class="box tbu snsIconBox" id="bKw94L" style="display: table;" data-hei="64">
1080                
1081                <div class="preview"></div>
1082                <div class="view tb-c va-m">
1083                    <a class="preview-layer" href="#" data-target="#SnsModal" data-toggle="modal" data-obj="box"></a>
1084<div class="sns-icon" style="overflow: auto;"><div class="sns-icon-item" data-link="https://blog.naver.com/kostech01" data-type="url" data-img="/img/sc/sns/icon/Square-Color/NaverBlog.png"><a href="https://blog.naver.com/kostech01" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Square-Color/NaverBlog.png);width:40px; height:40px; border-radius:15%; margin:10px 10px"></div></a></div><div class="sns-icon-item" data-link="http://linkedin.com/company/korea-simulation-technologies" data-type="url" data-img="/img/sc/sns/icon/Circle-Color/linkedin.png"><a href="http://linkedin.com/company/korea-simulation-technologies" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Circle-Color/linkedin.png);width:40px; height:40px; border-radius:15%; margin:10px 10px"></div></a></div><div class="sns-icon-item" data-link="http://pf.kakao.com/_UExeAn" data-type="url" data-img="/img/sc/sns/icon/Square-Color/KakaoTalk.png"><a href="http://pf.kakao.com/_UExeAn" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Square-Color/KakaoTalk.png);width:40px; height:40px; border-radius:15%; margin:10px 10px"></div></a></div><div class="sns-icon-item" data-link="https://www.youtube.com/channel/UCXf5k6dlF-4MKaCwfn1k-IQ/featured" data-type="url" data-img="/img/sc/sns/icon/Circle-Color/YouTube.png"><a href="https://www.youtube.com/channel/UCXf5k6dlF-4MKaCwfn1k-IQ/featured" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Circle-Color/YouTube.png);width:40px; height:40px; border-radius:15%; margin:10px 10px"></div></a></div></div>
1085                </div>
1086            </div></div>
1087</div>
1088</div>
1089</div>
1090</div> </div>
1091</div>
1092</div>
1093</div>
1094</div>                                                                                       </div>            </div>         </div>      </div>   </div></div><div class="footer-theme-1 footer-frame-mobile" style="">   <div class="frm" style="text-align: center; margin: 20px 0px 0px; display: block; padding: 0px 10px; background: none rgb(0, 0, 0); border: 0px solid transparent; border-radius: 0px;" id="bcI0fA" data-hei="" data-cwid="900px">      <div class="preview"></div>      <div class="view ha-c" style="max-width: 900px;">         <div class="tb tbu" style="height: auto;">            <div class="row clearfix tb-c va-m" style="display: table-cell; transform: none; height: auto;">               <div class="column col-sm-12" style="height: auto;">                                    <div class="box tbu" id="bicz2T" style="display: table; height: auto; margin: 20px 0px 0px; padding: 0px; background: none transparent; text-align: center; border: 0px solid transparent; border-radius: 0px;" data-m-hei="119px" data-hei="">                     <div class="preview"></div>                     <div class="view tb-c va-m" style="display: table-cell;">                        <div class="qv-text txtBox" contenteditable="false"><p class="text-m" style="text-align: center; font-size: 1em;"><span style="color:#ffb008;"><span style="font-size:12px;"><strong><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-family:Noto Sans KR;">한국시뮬레이션기술(주)</span></span></strong></span></span></p><p class="text-m" style="text-align: center; font-size: 1em;"><span style="color:#ffffff;"><span style="font-size:11px;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-family:Noto Sans KR;">
1094T. 031-903-2061|F.031-903-2076|E. [email protected]&nbsp;</span></span></span></span></p><p class="text-m" style="text-align: center; font-size: 1em;"><span style="color:#ffffff;"><span style="font-size:11px;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-family:Noto Sans KR;">(10401) 경기도 고양시 일산동구 무궁화로18 남정시티프라자1ì°¨ 804호</span></span></span></span></p><p class="text-m" style="text-align: center; font-size: 1em;"><span style="color:#ffffff;"><span style="font-size:10px;"><span style="letter-spacing:0px;margin-right:-0px;"><span style="font-family:Noto Sans KR;">Copyright ⓒ&nbsp;Korea Simulation Technologies Co., Ltd. All Rights Reserved.</span></span></span></span></p></div>                     </div>                  </div>                                                   <div class="box tbu snsIconBox" id="bhXJ09" style="display: table; margin: 0px; padding: 0px; background: none rgba(0, 0, 0, 0); text-align: center; border: 0px solid transparent; border-radius: 0px; height: auto;" data-hei="54">
1095                
1096                <div class="preview"></div>
1097                <div class="view tb-c va-m" style="display: table-cell;">
1098                    <a class="preview-layer" href="#" data-target="#SnsModal" data-toggle="modal" data-obj="box"></a>
1099<div class="sns-icon" style="overflow: auto;"><div class="sns-icon-item" data-link="https://www.youtube.com/channel/UCXf5k6dlF-4MKaCwfn1k-IQ" data-type="url" data-img="/img/sc/sns/icon/Circle-Color/YouTube.png"><a href="https://www.youtube.com/channel/UCXf5k6dlF-4MKaCwfn1k-IQ" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Circle-Color/YouTube.png);width:30px; height:30px; margin:10px 10px;border-radius:15%;"></div></a></div><div class="sns-icon-item" data-link="https://www.facebook.com/%ED%95%9C%EA%B5%AD%EC%8B%9C%EB%AE%AC%EB%A0%88%EC%9D%B4%EC%85%98%EA%B8%B0%EC%88%A0-100690655410163" data-type="url" data-img="/img/sc/sns/icon/Circle-Color/Facebook.png"><a href="https://www.facebook.com/%ED%95%9C%EA%B5%AD%EC%8B%9C%EB%AE%AC%EB%A0%88%EC%9D%B4%EC%85%98%EA%B8%B0%EC%88%A0-100690655410163" target="_blank"><div class="sns-icon-image" style="background-image: url(/img/sc/sns/icon/Circle-Color/Facebook.png);width:30px; height:30px; margin:10px 10px;border-radius:15%;"></div></a></div></div>
1100                </div>
1101            </div></div>            </div>         </div>      </div>   </div></div>                                                                                        <webfont>{"google":[],"custom":["Noto Sans KR"]}</webfont>    <!--</div>-->
1102</div><!--/container-->
1103
1104<!--[NV:S]-->
1105
1106<!--[NV:E]-->
1107<!--[GA:S]-->
vendor: 64 bytes, lines 1107-1108
1107
1108<script async src='https://www.googletagmanager.com/gtag/js?id=
1108G-TT01PT9YK5
vendor: 13 bytes, line 1108
1108'></script>
1109<script>
vendor: 128 bytes, lines 1110-1111
1110window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}
1111gtag('js', new Date()); gtag('config', '
1111G-TT01PT9YK5
vendor: 5 bytes, line 1111
1111');
1112</script>
1112
1113<!--[GA:E]--></body>
1114</html>
1115
1116<!-- 네이버 지도 모듈 호출 -->
1117
1118
1119<script>
1120$(document).ready(function(){
1121    //live only
1122    if($("body .header").hasClass("useFixed")) {
1123        $("body").addClass("headerFixed");
1124    }
1125
1126    initHeader9();
1127
1128    $(".header .header9 .header9-close-btn").click(function(){
1129        $(".header .header9").hide();
1130        $("body.live").addClass("header9_closed");
1131        setCookie("header9_closed", 1, 1);
1132        realignHeader9();
1133    });
1134    if($(".header").hasClass("useFixed")) {
1135        qv_on_scroll("init"); //scrolled page load시 init();
1136
1137        var agent = navigator.userAgent.toLowerCase();
1138        if ((navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (agent.indexOf("msie") != -1)) {
1139            $('body').scroll(function() { qv_on_scroll_ie(); });
1140        }
1141        else {
1142            window.onscroll = function(){ qv_on_scroll(); };
1143        }
1144
1145        //window.onscroll = function(){qv_on_scroll()};
1146    }
1147
1148    // column 내 whitespace가 들어가있는 항목 정리
1149    $.each($('.column'), function() {
1150        if($(this).html().trim() == '') { $(this).html(''); }
1151    });
1152
1153//    $('.slider-frm').not('.fullpage').find('.carousel').carousel({ swipe: 200 });
1154//    $('.slider-frm').not('.fullpage').find('.carousel').carousel(0);
1155    $(".carousel").carousel({ swipe: 200 });
1156//    $('.carousel').carousel(0);
1157
1158    var login_require = "";
1159    if (login_require == 1) {
1160        $('#LoginModal').modal('show');
1161        $('#LoginModal .modal-header').append($('<div class="modal-header-title-sub">' + lang.requires_login + '</div>'));
1162    }
1163
1164    /* 2020.01.15 재헌
1165       페이지 최초 로드 시 QV_BASE_OBJ.sskey 에 값이 비어있음.
1166       쿠키에서 정보를 가져와 채워주도록 함.
1167     */
1168    if (!QV_BASE_OBJ.sskey || QV_BASE_OBJ.sskey == '') {
1169        QV_BASE_OBJ.sskey = getCookie('QVSSID');
1170    }
1171
1172    removeSiteCopiedElement();
1173
1174    initMobileHeader();
1175    // initSnsFeed(); Instagram api denied
1176    initPopup();
1177    initFixedContents();
1178    initMenu();
1179    initTabFrame();
1180    initSMS();
1181    initSliderCallback();
1182    initSlider();
1183    initFullPageSlider();
1184    initSnSIconImage();
1185    initPolicyPrivacyModal();
1186    initJoinModal();
1187    initPageFadeEvent();
1188    initCalendar();
1189    initLnb();
1190
1191    initNonScaledImageBox();
1192
1193    initHeaderSideNav();
1194    initMobileHeaderMenu();
1195
1196    initRss();
1197
1198    initMouseoverObjects();
1199    initLanguageSelector();
1200
1201    initDownloadButton();
1202
1203    initInstagramFeed();
1204    initDatabaseContents();
1205
1206    initGrid();
1207    initVideo();
1208    initFrameLink();
1209    initDday();
1210    initCountDown();
1211    initNotionContents();
1212
1213    });
1214
1215$(window).bind("load", function (){
1216    initIframe();
1217});
1218
1219function initNotionContents() {
1220    //quv-notion-frame iframe을 안내 마크업으로 교체
1221    $('iframe.quv-notion-frame').each(function(){
1222        var noticeHtml =
1223            '<div class="quv-notion-frame quv-notion-notice" style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:260px;box-sizing:border-box;padding:16px;font-family:\'noto sans kr\',\'Apple SD Gothic Neo\',sans-serif;">'
1224          +   '<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:100%;max-width:480px;box-sizing:border-box;padding:36px 24px;background:#fff;border:1px solid #ececec;border-radius:12px;box-shadow:0 4px 16px rgba(0,0,0,0.04);">'
1225          +     '<img src="https://quv.kr/img/mail/mail_logo.png" alt="QUV" style="height:32px;margin-bottom:20px;" />'
1226          +     '<p style="margin:0 0 10px;font-size:19px;font-weight:700;color:#1f1f1f;line-height:1.35;">노션 임베드(Beta) 기능이 종료됩니다.</p>'
1227          +     '<p style="margin:0;font-size:13px;color:#8c8c8c;line-height:1.6;">기존에 노션 임베드를 사용 중인 페이지는<br>더 이상 지원되지 않습니다.<br>노션 공식 iframe 방식<a href="https://quv.kr/customer_help.html?m=read&aid=w5ve8D" target="_blank" style="color:#2f6fed;text-decoration:underline;">(가이드)</a>으로 변경해 주세요.</p>'
1228          +     '<div style="margin-top:20px;width:100%;padding:11px 18px;box-sizing:border-box;background:#f5f5f5;border-radius:6px;font-size:13px;color:#555;">서비스 종료 일정: 2026년 4월 17일</div>'
1229          +   '</div>'
1230          + '</div>';
1231        $(this).replaceWith(noticeHtml);
1232    });
1233    $('.iframe-notion-guide').remove()
1234}
1235
1236function initDday(target) {
1237    // 2021.12.17(금) (정빈) D-day 기능
1238    const today = new Date()
1239    const todayTimeStamp = today.getTime()
1240    const ddayTarget = target ? target : $('#main_container .ddayBox')
1241
1242    ddayTarget.each(function () {
1243        const ddayBox = $(this);
1244        const ddayArea = ddayBox.find('.dday-area')
1245        const userDdayTimeStamp = ddayArea.attr('data-dday')
1246        const ddayDistance = userDdayTimeStamp - todayTimeStamp
1247        const getDday = Math.floor(ddayDistance / (1000 * 60 * 60 * 24)) + 1
1248
1249        if (isNaN(getDday)) {
1250            ddayArea.find('.dday-area-variable').text('-Day')
1251        } else {
1252            const ddayView = getDday >= 0 ? '-'+ getDday : '+' + Math.abs(getDday)
1253            ddayArea.find('.dday-area-variable').text(ddayView)
1254        }
1255    })
1256
1257
1258}
1259
1260function ddayGetDate(date) {
1261    const distance = new Date(date).getTime() - new Date().getTime()
1262    let dateObj = {}
1263    if (distance <= 0 || isNaN(distance)) {
1264        dateObj.setDays = '00'
1265        dateObj.setHours = '00'
1266        dateObj.setMinutes = '00'
1267        dateObj.setSeconds = '00'
1268    } else {
1269        const days = Math.floor(distance / (1000 * 60 * 60 * 24))
1270        const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) - 9
1271        const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))
1272        const seconds = Math.floor((distance % (1000 * 60)) / 1000)
1273
1274        dateObj.setDays = days > 9 ? days : '0' + days
1275        dateObj.setHours = hours > 9 ? hours : '0' + hours
1276        dateObj.setMinutes = minutes > 9 ? minutes : '0' + minutes
1277        dateObj.setSeconds = seconds > 9 ? seconds : '0' + seconds
1278    }
1279    return dateObj
1280}
1281
1282// 글로벌 setInterval 관리
1283let countdownInterval = null
1284function initCountDown() {
1285    let isCountDownExist = false
1286
1287    function ddayCountDown () {
1288        $('#main_container .ddayBox .view').each(function () {
1289            if ($(this).find('.dday-area-countdown').css('display') === 'block') {
1290                const vBox = $(this)
1291                const getDate = Number(vBox.find('.dday-area').attr('data-dday'))
1292                const setDays = ddayGetDate(getDate).setDays
1293                const setHours = ddayGetDate(getDate).setHours
1294                const setMinutes = ddayGetDate(getDate).setMinutes
1295                const setSeconds = ddayGetDate(getDate).setSeconds
1296
1297                vBox.find('.dday-area').find('.days-value').text(setDays)
1298                vBox.find('.dday-area').find('.hours-value').text(setHours)
1299                vBox.find('.dday-area').find('.minutes-value').text(setMinutes)
1300                vBox.find('.dday-area').find('.seconds-value').text(setSeconds)
1301            }
1302        })
1303    }
1304
1305    $('#main_container .ddayBox .view').each(function () {
1306        if($(this).find('.dday-area-countdown').css('display') === 'block') {
1307            ddayCountDown()
1308            isCountDownExist = true
1309            return false
1310        }
1311    })
1312
1313    if (isCountDownExist) {
1314        clearInterval(countdownInterval)
1315        countdownInterval = setInterval(ddayCountDown,1000)
1316    }
1317}
1318
1319
1320function initFrameLink(target) {
1321    if (!target) {
1322        target = $('.frm, .box');
1323    }
1324
1325    target.each(function() {
1326        const area = $(this);
1327        const href = area.attr('href');
1328        if (href) {
1329            let targetAttr = '';
1330            const target = area.attr('target');
1331            if (target && target !== '') {
1332                targetAttr = 'target="' + target + '"';
1333            }
1334
1335            area.append('<a class="link-wrapper" href="' + href + '" ' + targetAttr + '></a>')
1336        }
1337    });
1338}
1339
1340function initHeaderSearch() {
1341    /* 2021.11.01
1342     * 게시판 통합검색(헤더)
1343     */
1344    /* Search button */
1345    $('#main_container').delegate('.header-search-bar-button', 'click', function() {
1346        headerSearchAllBoard();
1347    });
1348    /* Search bar keyup */
1349    $('#main_container').delegate('#header-search-bar', 'keyup', function(event) {
1350        if (event.keyCode == 13) {
1351            headerSearchAllBoard();
1352        }
1353    });
1354
1355    /* Search Icon */
1356    $('#main_container').delegate('.header-search-icon-button', 'click', function() {
1357        $('#main_container').append(
1358            '<div class="header-search-dialog">' +
1359                '<div class="header-search-dialog-close"></div>' +
1360                '<div class="header-search-dialog-body">' +
1361                    '<div>' +
1362                        '<input type="text" id="header-search-bar" placeholder="검색어를 입력해주세요."/>' +
1363                        '<i class="icon-magnifier header-search-bar-button"></i>' +
1364                    '</div>' +
1365                '</div>' +
1366            '</div>'
1367        );
1368    });
1369    $('#main_container').delegate('.header-search-dialog-close', 'click', function() {
1370        $('.header-search-dialog').remove();
1371    })
1372}
1373
1374function headerSearchAllBoard(page) {
1375    const targetPage = page ? page : 1;
1376    const keyword = $('#header-search-bar').val();
1377    if (keyword) {
1378        window.location = '/module/board/search.html?keyword=' + keyword + '&page=' + targetPage
1379    } else {
1380        alert('검색어를 입력해주세요.');
1381    }
1382}
1383
1384function initVideo() {
1385    $('#main_container').delegate('.videoBox[data-popup="1"]', 'click', function() {
1386        // 지연 로드로 아직 src 가 없을 수 있어 data-src 로 폴백한다
1387        let src = $(this).find('iframe').attr('src') || $(this).find('.video-iframe').attr('data-src');
1388        // src = src.indexOf('&autoplay=1') > 0 ? src : src + '&autoplay=1&mute=1&muted=1';
1389
1390        $('#main_container').append(
1391            '<div class="video-popup"><div><iframe src="' + src + '"></iframe></div></div>'
1392        );
1393    });
1394
1395    $('#main_container').delegate('.video-popup', 'click', function() {
1396        if ($(this).parent().attr('id') === 'main_container') {
1397            $(this).remove();
1398        }
1399    })
1400}
1401
1402function initGrid(target) {
1403    const gridBoxes = target ? target : $('.gridBox');
1404    if (gridBoxes.length > 0) {
1405        function setGridHeaderHeight(target, height) {
1406            const gridOption = target.data('gridOption');
1407            if (gridOption) {
1408                gridOption.api.setHeaderHeight(parseInt(height));
1409            }
1410        }
1411
1412        function setGridRowHeight(target, height) {
1413            const gridOption = target.data('gridOption');
1414            if (gridOption) {
1415                gridOption.api.forEachNode(function (rowNode) {
1416                    rowNode.setRowHeight(parseInt(height));
1417                });
1418                gridOption.api.onRowHeightChanged();
1419            }
1420        }
1421
1422        $.getScript('/js/xlsx/ag-grid.js', function() {
1423            gridBoxes.each(function() {
1424                const gridBox = $(this);
1425                const columnDefs = gridBox.attr('columnDefs');
1426                const rowData = gridBox.attr('rowData');
1427                if (columnDefs && rowData) {
1428                    gridBox.find('.grid-area').children().remove();
1429
1430                    const _columnDefs = JSON.parse(columnDefs).map(function(r, i) {
1431                        r.lockPosition = true;
1432                        delete r.rowDrag;
1433                        return r;
1434                    });
1435                    const _gridOption = {
1436                        columnDefs: _columnDefs,
1437                        defaultColDef: {
1438                            minWidth: 110,
1439                            editable: false,
1440                            resizable: false,
1441                        },
1442                        domLayout: 'autoHeight',
1443                        cellStyle: {'white-space': 'normal'},
1444                        rowData: JSON.parse(rowData),
1445                        animateRows: true,
1446                        scrollbarWidth: 4,
1447                    };
1448
1449                    const gridElement = gridBox.find('.grid-area')[0];
1450                    new agGrid.Grid(gridElement, _gridOption);
1451
1452                    gridBox.data('gridOption', _gridOption);
1453
1454                    const gridHeightHeader = gridBox.attr('headerHeight');
1455                    if (gridHeightHeader) {
1456                        setGridHeaderHeight(gridBox, gridHeightHeader);
1457                    }
1458
1459                    const gridRowHeight = gridBox.attr('rowHeight');
1460                    if (gridRowHeight) {
1461                        setGridRowHeight(gridBox, gridRowHeight);
1462                    }
1463
1464                    gridBox.find('.grid-area').show();
1465                }
1466            })
1467        })
1468    }
1469}
1470
1471function initIframe(elements) {
1472        const iframes = elements ? elements : $('.iframeBox')
1473    iframes.each(function() {
1474        // 탭에 속해있지만 활성화 되지 않은 상태이면 초기화 하지 않음
1475        if ($(this).parents('.tab-frm').length > 0
1476            && $(this).parents('.tab-pane.active').length === 0) {
1477            return;
1478        }
1479
1480        const target = $(this).find('.iframe-area');
1481        const value = target.attr('data-iframe-html');
1482        const height = $(this).attr('data-hei');
1483
1484        if (value) {
1485            const decodeValue = decodeURIComponent(value);
1486            var regex = /(?:<iframe[^>]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/g;
1487            var divs = $(decodeValue).filter(function(i, v) { return v.tagName === 'div' || v.tagName === 'DIV' });
1488
1489            /* TAG: Iframe */
1490            if (regex.test(decodeValue) && divs.length === 0) {
1491                // do nothing
1492                var iframe = decodeValue.match(regex)[0];
1493                target.html($(iframe));
1494            }
1495            /* TAG: No Iframe */
1496            else {
1497                setIframeBox(target, decodeValue, height)
1498            }
1499            // if (QV_BASE_OBJ.stid === "cxzvffdy1") {
1500            //     alert(navigator.userAgent)
1501            // }
1502        }
1503    });
1504
1505    function setIframeBox(target, value, height) {
1506        // 기존 iframe 제거
1507        target.find('iframe').remove();
1508        target.removeAttr('data-iframe-html');
1509
1510        const iframe = document.createElement('iframe');
1511        iframe.className = 'wrap-in-iframe';
1512        iframe.style = 'height: ' + height + 'px';
1513
1514        target.append($(iframe));
1515        target.removeAttr('data-iframe-html');
1516
1517        const context = iframe.contentWindow.document;
1518        context.open();
1519        context.write(value);
1520        context.close();
1521
1522        // iframe 추가
1523        // if (typeof(qv_func.isInAppBrowser) !== 'undefined' && qv_func.isInAppBrowser()) {
1524        //     script 태그 내 document scope가 parent로 잡히는 문제
1525        //     const iframe = document.createElement('iframe');
1526        //     iframe.className = 'wrap-in-iframe';
1527        //     target.append($(iframe));
1528        //     target.removeAttr('data-iframe-html');
1529        //
1530        //     // iframe html 세팅
1531        //     const context = iframe.contentWindow.document;
1532        //     const body = $('body', context);
1533        //     body.html(value);
1534        // } else {
1535        //     in-app 브라우저에서 작동하지 않음
1536        //     var iframe = document.createElement('iframe');
1537        //     var html = '<body>' + value + '</body>';
1538        //     iframe.src = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
1539        //     target.append($(iframe));
1540        // }
1541
1542        // iframe 높이 할당
1543        // const interval = setInterval(function() {
1544        //     const h = $(iframe).css('height');
1545        //     if (h != '100%') {
1546        //         clearInterval(interval);
1547        //         $(iframe).parents('.iframeBox').height(h);
1548        //     }
1549        // },100);
1550        // var iframeBoxInterval = window.setInterval(function() {
1551        //     if (iframe.contentWindow.document.readyState === "complete") {
1552        //         window.clearInterval(iframeBoxInterval);
1553        //         // grab the content of the iframe here
1554        //         console.log('iframebox loaded')
1555        //     }
1556        // }, 100);
1557
1558    }
1559    }
1560//
1561// function initFilter() {
1562//     if ($('.filter-area').length == 0) return;
1563//
1564//     $('body').delegate('.filter-item', 'click', function() {
1565//         $(this).toggleClass('active');
1566//
1567//         if ($('.filter-item.active').length == 0) {
1568//             $('.gallery-board-box').removeClass('disapear');
1569//
1570//         }
1571//         else {
1572//             $.each($('.filter-item'), function() {
1573//                 var filter_code = $(this).find('.filter-item-name').text();
1574//                 if ($(this).hasClass('active')) {
1575//                     $('.gallery-board-box[data-filter-code="' + filter_code + '"]').removeClass('disapear');
1576//                 }
1577//                 else {
1578//                     $('.gallery-board-box[data-filter-code="' + filter_code + '"]').addClass('disapear');
1579//                 }
1580//             });
1581//         }
1582//     });
1583//
1584//     $('body').delegate('.filter-header', 'click', function() {
1585//         $('.filter-body').toggleClass('active');
1586//         if ($('.filter-body').hasClass('active')) {
1587//             $(this).parents('.box').css('border-bottom', '1px solid #eee');
1588//         }
1589//         else {
1590//             $(this).parents('.box').css('border-bottom', 'none');
1591//         }
1592//     });
1593//
1594//     $.each($('.gallery-board-box'), function() {
1595//        var filter_code = $(this).find('.gallery-board-caption-title > span').text();
1596//        $(this).attr('data-filter-code', filter_code);
1597//     });
1598// }
1599//
1600// function initColorChip() {
1601//     if ($('.color-chip-area').length == 0) return;
1602//
1603//     $('#main_container').delegate('.color-chip-item', 'click', function() {
1604//         var url = $(this).attr('data-url');
1605//         var target = $(this).parents('.color-chip-container').siblings('.color-chip-image');
1606//
1607//         var temp_image = new Image();
1608//         temp_image.src = url;
1609//         $(temp_image).one('load',function() {
1610//             $(target).attr('src', url);
1611//         });
1612//
1613//         $(this).siblings('.color-chip-item').removeClass('active');
1614//         $(this).addClass('active');
1615//     });
1616//
1617//     $.each($('.color-chip-area'), function() {
1618//        $(this).find('.color-chip-item').first().trigger('click');
1619//     });
1620// }
1621
1622function initDatabaseContents() {
1623    if ($('.databaseContentsBox').length > 0) {
1624        let DATABASE_CONTENTS = {};
1625        $.each($('.databaseContentsBox'), function () {
1626            const area = $(this).find('.dbc-area');
1627            const id = area.attr('data-id');
1628            const count = area.attr('data-count');
1629            const paging = area.attr('data-paging');
1630            const matrix = area.children('.dbc-item:first-of-type').clone();
1631
1632            qvjax_direct(
1633                "select_database_contents",
1634                "/module/dbc/databaseContents.php",
1635                '&cid=' + id,
1636                function (data) {
1637                    if (data.length > 0) {
1638                        // const column_defs = JSON.parse(data[0].column_defs);
1639                        const row_data = JSON.parse(data[0].row_data.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t"));
1640                        const size = Math.ceil(row_data.length / count);
1641                        DATABASE_CONTENTS[id] = {
1642                            data: row_data,
1643                            size: size,
1644                        };
1645
1646                        // let pagingHtml = '<div class="dbc-paging">';
1647                        for (let i = 1; i <= size; i++) {
1648                            // pagingHtml += '<span data-id="' + id + '" data-page="' + i + '" class="' + (i == 1 ? 'active' : '') + '">' + i + '</span>';
1649                            DATABASE_CONTENTS[id][i] = DATABASE_CONTENTS[id]['data'].slice(count * (i-1), count * i);
1650                        }
1651                        // pagingHtml += '</div>';
1652                        if (paging == 1) {
1653                            // area.after(pagingHtml);
1654                            area.after('<div class="pager"><ol class="paging-btn-group"></ol></div>');
1655                            buildDatabaseContentsPagingHtml(DATABASE_CONTENTS[id], area, 1);
1656                        }
1657
1658
1659                        pagingDatabaseContents(DATABASE_CONTENTS[id][1], matrix, area);
1660                    }
1661
1662                    area.show();
1663                },
1664                function (xhr) {}
1665            );
1666        });
1667
1668        $('.databaseContentsBox').delegate('.pager li', 'click', function() {
1669            const area = $(this).parents('.databaseContentsBox').find('.dbc-area');
1670            const matrix = area.children('.dbc-item:first-of-type').clone();
1671            const id = area.attr('data-id');
1672            const page = $(this).attr('value');
1673            const databaseContents = DATABASE_CONTENTS[id];
1674
1675            if (databaseContents) {
1676                buildDatabaseContentsPagingHtml(databaseContents, area, page);
1677                pagingDatabaseContents(databaseContents[page], matrix, area);
1678
1679                if (isMobile()) {
1680                    const scrollY = area.offsetTop();
1681                    $("html, body").animate({scrollTop: scrollY - 50}, 500);
1682                }
1683            }
1684        });
1685
1686        function buildDatabaseContentsPagingHtml(databaseContents, area, page) {
1687            var page = parseInt(page);
1688            var size = databaseContents.size;
1689            var pagingStart;
1690            var pagingEnd;
1691            var html = '';
1692
1693            if (page - 2 <= 0) {
1694                pagingStart = 1;
1695                pagingEnd = Math.ceil(size) >= pagingStart + 4 ? 5 : Math.ceil(size);
1696            }
1697            else if (page + 2 >= Math.ceil(size)) {
1698                pagingStart = Math.ceil(size) - 4 <= 0 ? 1 : Math.ceil(size) - 4;
1699                pagingEnd = Math.ceil(size);
1700            }
1701            else {
1702                pagingStart = page - 2;
1703                pagingEnd = page + 2;
1704            }
1705            html += '<li class="paging-btn-group__item left" value="1">';
1706            html += '<i class="i-chevron-left"></i>';
1707            html += '</li>';
1708            for(var i = pagingStart; i <= pagingEnd; i ++) {
1709                var buttonClassName = i == page ? 'btn btn--basic active' : 'btn btn--basic';
1710                html += '<li class="paging-btn-group__item" value="' + i + '">';
1711                html += '<button class="' + buttonClassName + '"><span>' + i;
1712                html += '</span></button></li>';
1713            }
1714            html += '<li class="paging-btn-group__item right" value="' + size + '">';
1715            html += '<i class="i-chevron-right"></i>';
1716            html += '</li>';
1717
1718            area.next('.pager').find('.paging-btn-group').children('.paging-btn-group__item').remove();
1719            area.next('.pager').find('.paging-btn-group').append(html);
1720        }
1721
1722        function pagingDatabaseContents(data, matrix, area) {
1723            const $frag = $(document.createDocumentFragment());
1724            area.children('.dbc-item').remove();
1725            $.each(data, function() {
1726                const clone = matrix.clone();
1727                const rowData = this;
1728                $.each(clone.find('.dbc-contents-item'), function() {
1729                    const connect = $(this).attr('data-connect');
1730                    const type = $(this).attr('data-type');
1731
1732                    switch (type) {
1733                        case '1':
1734                        case '3':
1735                            $(this).find('p:last-of-type').text(rowData[connect]);
1736                            break;
1737                        case '2':
1738                            $(this).find('img').attr('src', typeof rowData[connect] === 'string' ? rowData[connect].trim() : rowData[connect]);
1739                            break;
1740                    }
1741                });
1742                clone.find('style').remove();
1743                clone.attr('data-id', this.id);
1744                $frag.append(clone);
1745            });
1746            area.append($frag);
1747        }
1748
1749
1750        $('body').delegate('.databaseContentsBox .dbc-area[data-detail="1"] .dbc-item', 'click', function() {
1751            const page = $(this).parents('.dbc-area').first().attr('data-id');
1752            const id = $(this).attr('data-id');
1753
1754            if (page && id) {
1755                location = '/' + page + '?id=' + id;
1756            } else {
1757                alert('데이터 컨텐츠 설정 오류', page, id);
1758            }
1759        });
1760    }
1761}
1762
1763function initDownloadButton() {
1764    $('#main_container').delegate('.qv-file-download', 'click', function() {
1765        var url = $(this).attr('data-download-url');
1766        if (!url || url == '') return;
1767
1768        var name = $(this).attr('data-download-url').split('/').pop();
1769        url = url.split('/').reduce(function(p, c, idx) {
1770            var slash = (c == '') ? '//' : '/';
1771            var add = (idx == url.split('/').length -1) ? encodeURIComponent(c) : c + slash;
1772            return p + add;
1773        });
1774
1775        if ((navigator.userAgent.toLowerCase().indexOf('safari') > -1 &&
1776            navigator.userAgent.toLowerCase().indexOf('chrome') == -1) ||
1777            is_InternetExplorer()) {
1778            var a = $("<a>").attr("href", url).attr("download", name).appendTo("body");
1779            a[0].click();
1780            a.remove();
1781        }
1782        else {
1783            post_redirect('/module/board/download.php', {'url': url, 'name': name}, '_top');
1784        }
1785    });
1786}
1787
1788function initLanguageSelector() {
1789    if ($('.header .languageSelectorBox').length > 0) {
1790        var LANGUAGE_CODE = {
1791            'ko': '한국어',
1792            'en': 'English',
1793            'ja': '日本語',
1794            'zh-chs': '中文(简体)',
1795            'zh-cht': '中文(繁體)',
1796            'es-ar': 'Español (Argentina)',
1797            'en-au': 'English (Australia)',
1798            'pt-br': 'português (Brasil)',
1799            'en-ca': 'English (Canada)',
1800            'de': 'Deutsch',
1801            'fr': 'français',
1802            'en-uk': 'English (UK)',
1803            'id': 'Bahasa Indonesia',
1804            'en-in': 'English (India)',
1805            'it': 'italiano',
1806            'es-mx': 'Español (Mexico)',
1807            'ru': 'Русский',
1808            'ar-sa': 'العربية',
1809            'th': 'ไทย',
1810            'tr': 'Türkçe',
1811            'vn': 'Tiếng Việt',
1812            'en-za': 'English (South Africa)',
1813        };
1814        
1815        $('body').delegate('.language-selector.language-type-3', 'click', function() {
1816            if ($(this).find('.language-dropdown').length > 0) {
1817                $(this).find('.language-dropdown').remove();
1818            }
1819            else {
1820                var html = '<div class="language-dropdown">';
1821                $.each($(this).find('.language-selector-flag'), function() {
1822                    var lang = $(this).attr('data-lang');
1823                    var href = $(this).children('a').attr('href');
1824                    var target = $(this).children('a').attr('target') ? $(this).children('a').attr('target') : '_self';
1825                    html += '<div class="language-dropdown-item"><a href="' + href + '" target="' + target + '">' + LANGUAGE_CODE[lang] + '</a></div>';
1826                });
1827                html += '</div>';
1828            }
1829            $(this).append(html);
1830
1831            // 2020.12.04 높이 지정 불필요함
1832            // var top = $(this).position().top + 40;
1833            // $('.language-dropdown').css('top', top);
1834        });
1835    }
1836}
1837
1838function initMouseoverObjects() {
1839    // mouseover 객체 내에 애니메이션 컨텐츠가 있으면 hover 에서도 동작하도록 하는 코드.
1840    // 오동작이 있기 때문에 다시 구축해야 함
1841    // $('#main_container').delegate('.mouseover-frm', 'mouseenter', function() {
1842    //     console.log('enter');
1843    //     $.each($(this).find('.mouseover-after'), function() {
1844    //         var elm = this;
1845    //         var newone = elm.cloneNode(true);
1846    //         elm.parentNode.replaceChild(newone, elm);
1847    //     });
1848    // });
1849    // $('#main_container').delegate('.mouseover-frm', 'mouseleave', function() {
1850    //     console.log('enter');
1851    //     $.each($(this).find('.mouseover-before'), function() {
1852    //         var elm = this;
1853    //         var newone = elm.cloneNode(true);
1854    //         elm.parentNode.replaceChild(newone, elm);
1855    //     });
1856    // });
1857
1858    function resizeMouseoverFrame(mouseoverFrame) {
1859        var before = mouseoverFrame.find('.mouseover-before').first();
1860        var after = mouseoverFrame.find('.mouseover-after').first();
1861        var mouseover_height = before.height() > after.height() ? before.height() : after.height();
1862        if (mouseover_height == 0) {
1863            var data_height = mouseoverFrame.attr('data-hei') ? parseInt(mouseoverFrame.attr('data-hei')) : 0;
1864            data_height = data_height == 0 ? mouseoverFrame.find('.imgBox:first').height() : data_height;
1865            mouseover_height = data_height;
1866        }
1867
1868        if (mouseoverFrame.height() < mouseover_height) {
1869            var tb = mouseoverFrame.children('.view').children('.tb');
1870            // tb.height(mouseover_height);
1871            if (tb.length > 0) {
1872                tb.get(0).style.setProperty('height', mouseover_height + 'px', 'important');
1873            }
1874        }
1875    }
1876
1877    $(window).bind("load",function() {
1878        // tb의 높이보다 하위 컨텐츠의 높이가 더 클 경우 tb의 높이를 맞춰준다.
1879        // mouseover 객체들이 absolute로 전환되기 때문에 높이를 수동으로 지정해주지 않으면 컨텐츠들이 겹치게 됨
1880        $.each($('#main_container .mouseover-frm'), function() {
1881            const mouseoverFrame = $(this);
1882            mouseoverFrame.find('.box').each(function(i, val) {
1883                $(val).addClass('displayed');
1884            });
1885
1886            // mouseover frame 내 이미지를 모두 호출한 뒤 위치를 다시 잡아준다
1887            let loadCompleteCount = 0;
1888            const imageCore = $(this).find('.img-core');
1889            const imageCount = imageCore.length;
1890            if (imageCount === 0) {
1891                resizeMouseoverFrame(mouseoverFrame);
1892            } else {
1893                imageCore.each(function() {
1894                    const img = new Image();
1895                    const bg = $(this).css('background-image');
1896                    if (bg.indexOf('url(') === 0) {
1897                        img.src = bg.replace('url(','').replace(')','').replace(/\"/gi, "");
1898                        $(img).one('load',function(){
1899                            loadCompleteCount++;
1900                            if (loadCompleteCount === imageCount) {
1901                                resizeMouseoverFrame(mouseoverFrame);
1902                            }
1903                        })
1904                    } else {
1905                        loadCompleteCount++;
1906                        if (loadCompleteCount === imageCount) {
1907                            resizeMouseoverFrame(mouseoverFrame);
1908                        }
1909                    }
1910                })
1911            }
1912        });
1913
1914        // 이미지 박스 전용 mouseover
1915        // 향후 실제 사용여부는 확인필요
1916        $.each($('#main_container .imgBox'), function() {
1917            var mouseover_image = $(this).find('.img-core').attr('data-mouseover-image');
1918            if (mouseover_image) {
1919                var image = $(this).find('.img-core');
1920                var dummy = $(this).find('.img-core-dummy');
1921                image.attr('data-default-image', image.css('background-image'));
1922
1923                $(this).on('mouseenter', function () {
1924                    console.log('imgBox mouse enter');
1925                    image.css('background-image', image.attr('data-mouseover-image'));
1926                    dummy.attr('src', image.attr('data-mouseover-image').replace('url(', '').replace(')', '').replace(/\"/gi, ""))
1927                });
1928
1929                $(this).on('mouseleave', function () {
1930                    console.log('imgBox mouse leave');
1931                    image.css('background-image', image.attr('data-default-image'));
1932                    dummy.attr('src', image.attr('data-default-image').replace('url(', '').replace(')', '').replace(/\"/gi, ""))
1933                });
1934            }
1935        });
1936    });
1937}
1938
1939function initMobileFooterFixedContents() {
1940    if (isMobile() && $('.footer-fixed-contents').length > 0) {
1941        $(window).bind("load",function() {
1942            // fixed 크기만큼 페이지 최하단에 공백넣음
1943            var footer_fixed = $('.footer-fixed-contents');
1944            var empty_div = '<div style="height:' + footer_fixed.height() + 'px;"></div>';
1945            $('.footer-frame-mobile').after($(empty_div));
1946        });
1947    }
1948}
1949
1950function initHeaderOverflowMenuResizeEvent() {
1951    var column;
1952    $.each($('#main_container .header .al-box'), function() {
1953        if ($(this).children('ul.mn-ul').length > 0 &&
1954            $(this).find('.mn-item').length > 0) {
1955            column = $(this);
1956        }
1957    });
1958    if (column) {
1959        headerOverflowMenuInit(column);
1960    }
1961
1962    $(window).resize(function() {
1963        if(this.resizeTO) clearTimeout(this.resizeTO);
1964        this.resizeTO = setTimeout(function() {
1965            $(this).trigger('resizeEnd');
1966        }, 100);
1967    });
1968    $(window).bind('resizeEnd', function() {
1969        if (column) {
1970            headerOverflowMenuInit(column);
1971        }
1972    });
1973}
1974
1975function headerOverflowMenuInit(column) {
1976    if (column.children('ul.mn-ul').length == 0) { return; }
1977
1978    var column_width = 0;
1979    var box_width = 0;
1980    var overflow_menu = [];
1981
1982    var container = column.parents('#main_container');
1983    var menu = column.children('ul.mn-ul');
1984    var header_contents = column.parents('.header-contents').first();
1985    var header = header_contents.parent();
1986    var header_width = column.parent().css('width');
1987    if (header_width.indexOf('%') > -1) {
1988        // %로 리턴됨 -> px 값 계산해서 처리 (IE에서 가끔 %로 넘어옴)
1989        header_width = $(window).width() * parseInt(header_width) / 100;
1990    }
1991    else {
1992        // px로 리턴 -> 그대로 처리
1993        header_width = parseInt(header_width);
1994    }
1995
1996    $.each(column.children('div.box'), function() {
1997        box_width += $(this).width();
1998        box_width += parseInt($(this).css('padding-left'))
1999        box_width += parseInt($(this).css('padding-right'))
2000    });
2001    column_width += box_width;
2002
2003    container.find('.mn-item').removeClass('mn-item-overflow');
2004    $.each(menu.children('.mn-item').not('.mn-item-overflow-list'), function() {
2005        column_width += $(this).width();
2006
2007        if (header_width < column_width + 110) {
2008            $(this).addClass('mn-item-overflow');
2009            overflow_menu.push($(this));
2010        }
2011    });
2012
2013    if (overflow_menu.length > 0) {
2014        if (menu.find('headerstart').length == 0) { menu.prepend('<headerstart></headerstart>'); }
2015        if (menu.find('headerend').length == 0) { menu.append('<headerend></headerend>'); }
2016
2017        if (menu.find('.mn-item-overflow-list').length == 0) {
2018            var html = '<li class="mn-item mn-item-overflow-list"> <a class="mn-link"><i class="icon-options" aria-hidden="true"></i></a> <div class="header-overflow-pop"><ul></ul></div></li>';
2019            menu.find('headerend').before($(html));
2020        }
2021
2022        container.find('.header-overflow-pop ul li').remove();
2023        $.each(overflow_menu, function() {
2024            var clone = $(this).clone();
2025            clone.find('ul.sub-mn').remove(); // clone 내부에서 제거
2026            menu.find('.header-overflow-pop ul').append(clone);
2027        });
2028    }
2029    else {
2030        container.find('.mn-item-overflow-list').remove();
2031    }
2032}
2033
2034
2035function initMobileHeaderMenu() {
2036    if ((isMobile() && window.innerWidth <= 767) && $('.header').length > 0) {
2037        // menu touch
2038        if ($('.header-mobile .column > ul.mn-ul').length > 0) {
2039            // 현재 활성화된 페이지의 메뉴 위치 잡기
2040            $(window).bind("load",function() {
2041
2042                // 서브메뉴 추가
2043                if ($('.header-mobile .column > ul.mn-ul').data('sub')) {
2044                    if ($('.header-mobile .column > ul.mn-ul .mn-item.cur-mn-item > ul.sub-mn > li.mn-item').length > 0) { // 메인 메뉴 중에 cur-mn-item이 존재할 경우
2045                        var sub_mn = $('.header-mobile .column > ul.mn-ul .mn-item.cur-mn-item > ul.sub-mn');
2046                    }
2047                    else if ($('.header-mobile .column > ul.mn-ul .mn-item > ul.sub-mn > li.mn-item.cur-mn-item').length > 0) { // 서브 메뉴 중에 cur-mn-item이 존재할 경우
2048                        var sub_mn = $('.header-mobile .column > ul.mn-ul .mn-item > ul.sub-mn > li.mn-item.cur-mn-item').parent();
2049                    }
2050                    if (sub_mn) {
2051                        var header_contents = sub_mn.parents('.header-contents');
2052                        var sub_html = '<div class="col-xs-12 header-mobile-sub-menu" style="' +
2053                                'padding: 0 10px;' +
2054                                'margin-top: ' + header_contents.css('border-bottom-width') + ';' +
2055                                'border-bottom: ' +  header_contents.css('border-bottom') + ';' +
2056                                '">' +
2057                            '<div class="al-box column al-l">' +
2058                            '<ul class="mn-ul tc box hsync" style="display: table-cell; transform: translate3d(0px, 0px, 0px); height: ' + $(header_contents).height() + 'px;">' +
2059                            '<div class="preview"></div>' +
2060                            '<headerstart></headerstart>' +
2061                            sub_mn.html() +
2062                            '<headerend></headerend>' +
2063                            '</ul>' +
2064                            '</div>' +
2065                            '</div>';
2066                        sub_html = $(sub_html).css('background', header_contents.css('background'));
2067                        sub_html = $(sub_html).css('border-bottom', header_contents.css('border-bottom'));
2068                        header_contents.append($(sub_html));
2069
2070                        var header_cur = header_contents.parent();
2071                        var header_next = header_cur.next('div');
2072                        $.each(header_next, function () {
2073                            var top = 0;
2074                            $.each($(this).prev('div'), function () {
2075                                top += $(this).find('.header-contents').height();
2076                                top += $(this).find('.header-contents > div:last-child').height();
2077                            });
2078                            $(this).attr('data-top', top);
2079                            $(this).css('top', top);
2080                        });
2081                    }
2082                }
2083
2084                if ($('.header-mobile .column > ul.mn-ul .mn-item.cur-mn-item').length > 0) {
2085                    var cur = $('.header-mobile .column > ul.mn-ul .mn-item.cur-mn-item').last();
2086                    var ul = cur.parents('ul.mn-ul').first();
2087                    var pos = cur[0].offsetLeft * -1;
2088                    var width = ul.parents('.column').parent().width();
2089                    var max = (ul.width() - width) * -1;
2090                    pos = pos < 0 ? pos : 0;
2091                    max = max < 0 ? max : 0;
2092                    pos = pos <= max ? max : pos;
2093                    ul.css('transform', 'translate3d(' + pos + 'px, 0, 0)');
2094                    ul.data('pos', pos);
2095                }
2096
2097                var startPoint;
2098                $('#main_container').delegate('.header-mobile .column > ul.mn-ul', "touchstart", function (e) {
2099                    startPoint = e.originalEvent.touches[0].screenX;
2100
2101                    var pos = parseInt($(this).data('pos'));
2102                    if (!pos) {
2103                        $(this).data('pos', 0);
2104                    }
2105                });
2106                $('#main_container').delegate('.header-mobile .column > ul.mn-ul', "touchmove", function (e) {
2107                    var event = e.originalEvent;
2108                    var x = event.touches[0].screenX;
2109                    var diff = x - startPoint;
2110                    var width = $(e.currentTarget).parents('.column').parent().width();
2111                    var max = ($(this).width() - width) * -1;
2112
2113                    var pos = parseInt($(this).data('pos'));
2114                    pos += diff;
2115                    pos = pos < 0 ? pos : 0;
2116                    max = max < 0 ? max : 0;
2117                    pos = pos <= max ? max : pos;
2118                    $(this).css('transform', 'translate3d(' + pos + 'px, 0, 0)');
2119                });
2120                $('#main_container').delegate('.header-mobile .column > ul.mn-ul', "touchend", function () {
2121                    if ($(this).css('transform').indexOf('matrix') > -1) {
2122                        $(this).data('pos', $(this).css('transform').split(',')[4].trim());
2123                    }
2124                });
2125            });
2126
2127            // 카테고리 항목 클릭 시 하위 페이지가 있으면
2128            // 해당 페이지 목록(header-mobile-sub-menu)을 동적으로 만들어준다
2129            $('#main_container').delegate('.header-mobile .al-box > .mn-ul > .mn-item > .mn-link:not([href])', 'click', function() {
2130                if ($('.header-mobile .column > ul.mn-ul').data('sub')) {
2131                    var sub_mn = $(this).siblings('ul.sub-mn');
2132                    if (sub_mn) {
2133                        $('.header-mobile-sub-menu').remove();
2134
2135                        var header_contents = sub_mn.parents('.header-contents');
2136                        var sub_html = '<div class="col-xs-12 header-mobile-sub-menu" style="' +
2137                            'padding: 0 10px;' +
2138                            'margin-top: ' + header_contents.css('border-bottom-width') + ';' +
2139                            'border-bottom: ' +  header_contents.css('border-bottom') + ';' +
2140                            '">' +
2141                            '<div class="al-box column al-l">' +
2142                            '<ul class="mn-ul tc box hsync" style="display: table-cell; transform: translate3d(0px, 0px, 0px); height: ' + $(header_contents).height() + 'px;">' +
2143                            '<div class="preview"></div>' +
2144                            '<headerstart></headerstart>' +
2145                            sub_mn.html() +
2146                            '<headerend></headerend>' +
2147                            '</ul>' +
2148                            '</div>' +
2149                            '</div>';
2150                        sub_html = $(sub_html).css('background', header_contents.css('background'));
2151                        sub_html = $(sub_html).css('border-bottom', header_contents.css('border-bottom'));
2152                        header_contents.append($(sub_html));
2153
2154                        var header_cur = header_contents.parent();
2155                        var header_next = header_cur.next('div');
2156                        $.each(header_next, function () {
2157                            var top = 0;
2158                            $.each($(this).prev('div'), function () {
2159                                top += $(this).find('.header-contents').height();
2160                                top += $(this).find('.header-contents > div:last-child').height();
2161                            });
2162                            $(this).attr('data-top', top);
2163                            $(this).css('top', top);
2164                        });
2165                    }
2166                }
2167            });
2168        }
2169
2170        // section merge
2171        // var section_merge = $('.header-mobile > .header1').data('section-merge');
2172        // if (section_merge == false || location.pathname.indexOf('/module/board') > -1) { // merge = false 거나 게시글 쓰기/읽기 에서는 헤더영역 확보
2173        //     var height = 0;
2174        //     $.each($('.header-mobile > div'), function() {
2175        //         height += parseInt($(this).attr('data-hei'));
2176        //     });
2177        //     $('#main_container > .body')[0].style.setProperty('margin-top', height + 'px', 'important');
2178        // }
2179        // else if (section_merge == true) {
2180        //     $('#main_container > .body')[0].style.setProperty('margin-top', 0, 'important');
2181        //     $('#main_container > .body > .frm')[0].style.setProperty('margin-top', 0, 'important');
2182        // }
2183
2184        // $(window).bind("load",function() {});
2185        // section merge ver.2
2186        if ($('#main_container .body > mobile-header-section-merge').length > 0) {
2187            $('#main_container > .header-mobile').addClass('mobileHeaderSectionMerge');
2188            $('#main_container > .body')[0].style.setProperty('margin-top', 0, 'important');
2189            $('#main_container > .body > .frm')[0].style.setProperty('margin-top', 0, 'important');
2190        } else {
2191            $('#main_container > .header-mobile').removeClass('mobileHeaderSectionMerge');
2192            var height = 0;
2193            $.each($('.header-mobile > div'), function () {
2194                height += parseInt($(this).attr('data-hei'));
2195            });
2196
2197            /* 2020.05.21 재헌
2198             * 서브메뉴가 존재할 때 해당 높이도 더해서 body에 margin-top을 부여
2199             */
2200            if ($('.header-mobile-sub-menu').length > 0) {
2201                height += $('.header-mobile-sub-menu').height();
2202            }
2203
2204            $('#main_container > .body')[0].style.setProperty('margin-top', height + 'px', 'important');
2205        }
2206    }
2207}
2208
2209function initHeaderSideNav() {
2210    $('#main_container').delegate('.header-side-nav-button', 'click', function() {
2211        $('.header-side-nav').toggleClass('active');
2212
2213        if ($(this).parents('.header-mobile').length > 0) {
2214            $(this).parents('.header1, .header2, .header3, .header9').addClass('z-index-9999');
2215        }
2216
2217        // header-side-nav 영역만큼 밀어내기
2218        // $('.body').css('width', "calc(100% - 500px)");
2219    });
2220    $('#main_container').delegate('.header-side-nav-close', 'click', function() {
2221        $('.header-side-nav').removeClass('active');
2222
2223        if ($(this).parents('.header-mobile').length > 0) {
2224            setTimeout(function() {
2225                // 사이드 네비 닫히는 시간 0.3ms, z-index 빠지는 시간 0.5ms
2226                $(this).parents('.header1, .header2, .header3, .header9').removeClass('z-index-9999');
2227            }, 500)
2228        }
2229
2230        // header-side-nav 영역만큼 밀어내기
2231        // $('.body').removeAttr('style');
2232    });
2233
2234    /* 2020.03.16 재헌
2235     * language selector, header side nav 같은 별도의 창을 띄우는 헤더 요소가
2236     * header1, header2의 z-index 영향을 받아 위로 겹치거나 의도대로 동작하지 않는 문제를 수정
2237     */
2238    $('#main_container').delegate('.header > div', 'mouseenter', function() {
2239        if ($('.language-dropdown').length > 0 || $('.header-side-nav.active').length > 0) return;
2240        $(this).css('z-index', 2);
2241    });
2242    $('#main_container').delegate('.header > div', 'mouseleave', function() {
2243        if ($('.language-dropdown').length > 0 || $('.header-side-nav.active').length > 0) return;
2244        $(this).css('z-index', 1);
2245    });
2246}
2247
2248// 이미지 중 모바일 높이가 지정되지 않은 항목들 및 부모 프레임 크기 지정
2249function initNonScaledImageBox() {
2250    if (!isMobile()) return;
2251
2252    var image_count = 0;
2253    var target_count = 0;
2254    $.each($('.body .imgBox'), function() {
2255        if ($(this).parents('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
2256        if ($(this).parents('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11').length > 0) return;
2257        if ($(this).find('.mobile-box').length > 0) return;
2258        if ($(this).parents('.popup-container').length > 0) return;
2259        if ($(this).parents('.fixed-contents-layer').length > 0) return;
2260        if ($(this).parents('.tab-frm, .slider-frm').length > 0) return;
2261
2262        var bg_size = $(this).find('.img-core').css('background-size');
2263        if (bg_size == 'contain') {
2264            image_count++;
2265        }
2266    });
2267
2268    $.each($('.body .imgBox'), function() {
2269        if ($(this).parents('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
2270        if ($(this).parents('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11').length > 0) return;
2271        if ($(this).find('.mobile-box').length > 0) return;
2272        if ($(this).parents('.popup-container').length > 0) return;
2273        if ($(this).parents('.fixed-contents-layer').length > 0) return;
2274        if ($(this).parents('.tab-frm, .slider-frm').length > 0) return;
2275
2276        var img_box = $(this);
2277        var bg_size = $(this).find('.img-core').css('background-size');
2278        var bg_image = $(this).find('.img-core').css('background-image');
2279
2280        if (bg_image) {
2281            bg_image = bg_image.replace('url(', '').replace(')', '').replace(/\"/gi, "");
2282        }
2283
2284        if (bg_size == 'contain') {
2285            var tmpImg = new Image();
2286            tmpImg.src = bg_image;
2287            $(tmpImg).one('load',function(){
2288                var ratio = tmpImg.width / tmpImg.height;
2289                var height_origin = img_box.height();
2290                var width_resize = window.innerWidth; // img_box.width()는 퍼센트로 출력되기때문에 window width로 대체
2291                var height_resize = width_resize/ratio;
2292                var diff = height_origin - height_resize;
2293
2294                // 모바일 스크린보다 작은 이미지, 가로가 더 긴 이미지 등은 패스한다
2295                if (ratio > 1 || height_resize < window.innerHeight || height_origin * ratio < window.innerHeight) {
2296                    return;
2297                }
2298
2299                img_box.height(height_resize);
2300                img_box.find('.img-core').height(height_resize);
2301                img_box.attr('data-m-hei', height_resize + 'px');
2302                img_box.data('diff', diff);
2303                target_count++;
2304
2305                if (target_count == image_count) {
2306                    resizeNonScaledImageBoxUpperFrame();
2307                }
2308            });
2309        }
2310    });
2311}
2312
2313function resizeNonScaledImageBoxUpperFrame() {
2314    $.each($('.body > .frm'), function() {
2315        var re = 0;
2316        var image_count = 0;
2317        $.each($(this).find('.box.imgBox'), function() {
2318            re += parseInt($(this).data('diff'));
2319            image_count++;
2320        });
2321
2322        if (image_count > 0 && !isNaN(re)) {
2323            $.each($(this).find('.frm').andSelf(), function () {
2324                if ($(this).height() - re < 0) return;
2325                resetMobileFrameStyle($(this));
2326            });
2327        }
2328    });
2329}
2330
2331function resetMobileFrameStyle($frm) {
2332    $frm.children('.view').children('.tb').css('height', 'auto');
2333}
2334
2335function initRss() {
2336    if ($('.rssBox').length > 0) {
2337        $('.rssBox .rss-area > ul').remove();
2338        $('.rssBox .view').append($('<div class="qv-loader qv-loader-black" style="display: block;"></div>'));
2339
2340        $(window).bind("load",function() {
2341            // jquery.rss.js 동적 호출
2342            $.getScript( "/js/jquery.rss.js", function( data, textStatus, jqxhr ) {
2343                $.each($('.rssBox'), function() {
2344                    var box             = $(this);
2345                    var target          = box.find('.rss-area');
2346                    var rss_url         = target.attr('data-rss-url');
2347                    var limit           = target.attr('data-contents-limit');
2348
2349                    jQuery(function($) {
2350                        target.rss(rss_url, {
2351                            limit: limit,
2352                            dateFormat: 'YYYY-MM-DD kk:mm',
2353                            entryTemplate: '<li><a href="{url}" target="_blank"><span class="rss-title">{title}</span><span class="rss-date">{nicetime}</span><span class="rss-body">{bodyPlain}..</span></a></li>',
2354                            tokens: {
2355                                nicetime: function(entry, tokens) {
2356                                    var createDateTime = new Date(tokens.date).getTime();
2357                                    var currentDateTime = new Date();
2358                                    var compareDateTime = currentDateTime.setDate(currentDateTime.getDate() - 1);
2359                                    if (createDateTime > compareDateTime) {
2360                                        return getNiceTime(createDateTime, new Date(), 1, true);
2361                                    }
2362                                    else {
2363                                        return tokens.date;
2364                                    }
2365                                },
2366                            },
2367                            success: function(data){ box.find('.qv-loader').remove(); },
2368                            error: function(xhr){ box.find('.qv-loader').remove(); },
2369                        })
2370                    })
2371                });
2372            });
2373        });
2374    }
2375}
2376
2377function initLnb() {
2378    if ($('.lnbBox').length > 0) {
2379        var path = QV_BASE_OBJ.spid;
2380        $('.lnb-area .lnb-item[data-spid="' + path + '"]').addClass('active');
2381    }
2382}
2383
2384// 모바일 터치 참고 https://fullcalendar.io/docs/longPressDelay
2385function initCalendar(elements) {
2386    if ($('.calendarBox').length > 0) {
2387        // calendar script 동적 호출
2388        $.getScript( "/js/fullcalendar/moment.min.js", function( data, textStatus, jqxhr ) {
2389            $.getScript( "/js/fullcalendar/fullcalendar.min.js", function( data, textStatus, jqxhr ) {
2390                $.getScript( "/module/calendar/calendar.js", function( data, textStatus, jqxhr ) {
2391                    if (elements) {
2392                        buildCalendar(elements);
2393                    } else {
2394                        $.each($('.calendarBox'), function() {
2395                            buildCalendar(this);
2396                        });
2397                    }
2398                });
2399            });
2400        });
2401    }
2402}
2403
2404function initPageFadeEvent() {
2405    var page_effect = 0;
2406    if (page_effect == 1) {
2407        $('body').addClass('body-fade');
2408        $('.body-fade').delegate('a', 'click', function(e) {
2409            var target = $(this);
2410            var targetUrl = document.activeElement.href;
2411            if (target.attr('class').indexOf('cke') > -1) return;
2412            else if (target.attr('target') == '_blank') return;
2413            else if (target.attr('href') == undefined) return;
2414            else if (target.attr('href').indexOf('#sld') > -1) return;
2415            else if (target.attr('href').indexOf('#tab') > -1) return;
2416            else if (targetUrl === 'javascript:void(0)') return;
2417            else if (targetUrl == undefined) return;
2418            else if (targetUrl.substr(targetUrl.length - 1) == '#') return;
2419            else if (targetUrl != undefined && targetUrl != '') {
2420                e.preventDefault();
2421                $('body').fadeOut( "fast", function() {
2422                    location.href = targetUrl;
2423                });
2424            }
2425        });
2426    }
2427}
2428
2429function initJoinModal() {
2430    $('#main_container').delegate('a[href="/join"]', 'click', function() {
2431        if (NAVER_CLIENT_ID == '' && KAKAO_CLIENT_ID == '' && GOOGLE_CLIENT_ID == '') {
2432            location.href = "/join";
2433            return;
2434        }
2435        else {
2436            $('#JoinModal').modal('show');
2437            return false;
2438        }
2439    });
2440}
2441
2442function initPolicyPrivacyModal() {
2443    $('#main_container').delegate('a[href="/policy_privacy"]', 'click', function() {
2444        if ($('#PolicyPrivacyModal').data('policy')) {
2445            $('#PolicyPrivacyModal').modal('show');
2446        }
2447        else {
2448            qvjax_direct(
2449                "select_terms",
2450                "/module/member/member.php",
2451                '',
2452                function (data) {
2453                    if (data.length > 0) {
2454                        var m = "privacy";
2455                        var text = $.grep(data, function (e) { return e.stms_type == m; })[0].stms_txt;
2456                        $('#policy-privacy-textarea').val(text);
2457                        $('#PolicyPrivacyModal').modal('show');
2458                        $('#PolicyPrivacyModal').data('policy', data);
2459                    }
2460                },
2461                function (xhr) { }
2462            );
2463        }
2464
2465        return false;
2466    });
2467}
2468
2469function removeSiteCopiedElement() { // 복제된 게시판, 폼 삭제처리
2470    $('#main_container .SiteCopiedElement').remove();
2471}
2472
2473function initSnSIconImage() {
2474    $.each($('.sns-icon-image'), function() {
2475        if ($(this).width() < 40) {
2476            var bg = $(this).css('background-image');
2477            if (bg.toLowerCase().indexOf('color-30') > 0 || bg.toLowerCase().indexOf('color-30') > 0) { return; }
2478
2479            if (bg.indexOf('-30') > -1) return;
2480            var convertSmall = bg.replace('Color', 'Color-30').replace('Black', 'Black-30');
2481            $(this).css('background-image', convertSmall);
2482        }
2483    });
2484}
2485
2486function initSliderCallback() {
2487    $.each($('.slider-frm .carousel.slide'), function() {
2488        $(this).bind('slide.bs.carousel', function (e) {
2489            //$(this).find('.qv-ani-ele').toggleClass('qv-ani-ele qv-ani');
2490            $(e.relatedTarget).find('.qv-ani').toggleClass('qv-ani qv-ani-ele');
2491
2492            $.each($(e.relatedTarget).find('.video-iframe'), function() {
2493                var src;
2494                if ($(this).attr('src')) {
2495                    src = $(this).attr('src').split('&timestamp=')[0];
2496                } else if ($(this).attr('data-src')) {
2497                    src = $(this).attr('data-src').split('&timestamp=')[0];
2498                }
2499
2500                if (src) {
2501                    $(this).attr('src', src + '&timestamp=' + new Date().getTime());
2502                }
2503            });
2504        });
2505    });
2506}
2507function initSlider(element) {
2508    /* 2020.03.12 재헌
2509     * 슬라이드 배경 이미지는 초기화 시 미리 불러온다
2510     * 미리 불러오지 않으면 슬라이드 넘길 때 마다 흰 화면이 나타남
2511     */
2512    const target = element ? element : $('.slider-frm')
2513
2514    $.each(target.find('.carousel-inner > .item > .frm'), function() {
2515        var url = $(this).css('background-image');
2516        if (url == 'none' || url.indexOf('url') == -1) return;
2517        else {
2518            var img = new Image();
2519            img.src = url.match(/url\(["']?([^"']*)["']?\)/)[1];
2520        }
2521    });
2522
2523    // carousel 스윕
2524    $.each(target.not('.fullpage').find('.carousel'), function() {
2525        $.each($(this).find('.item'), function(i) {
2526            var active = i == 0 ? ' active' : '';
2527            $(this).attr('class', 'item' + active);
2528        });
2529        $(this).find('.carousel-indicators > li').removeClass('active');
2530        $(this).find('.carousel-indicators > li').first().addClass('active');
2531
2532        $(this).carousel({ swipe: 200 });
2533        $(this).carousel(0);
2534
2535        /* 2020.02.25 재헌
2536         * 자동 넘기기 시간 간격 조정
2537         */
2538        if($(this).attr('data-slider-interval')) {
2539            var slider = $(this);
2540            var interval = parseInt($(this).attr('data-slider-interval'));
2541            interval = interval >= 1000 ? interval : 5000;
2542            var sliderInterval = setInterval(function() {
2543                slider.carousel("next");
2544            }, interval);
2545        }
2546    });
2547}
2548function initFullPageSlider() {
2549    if ($('#main_container > .body > .fullpage').length == 0) return;
2550
2551    $.each($('.slider-frm.fullpage'), function() {
2552        $(this).find('.carousel.slide').carousel(0);
2553        $(this).find('.item').each(function(i, val) {
2554            if (i === 0) {
2555                $(val).addClass('active').removeAttr('style');
2556            } else {
2557                $(val).removeClass('active').attr('style', 'transform: translate3d(0px, 100%, 0px);');
2558            }
2559        })
2560    });
2561
2562    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
2563    if(!isMobile) {
2564        $('#main_container').delegate('.slider-frm.fullpage', 'mousewheel', function (e, delta) {
2565        //$('.slider-frm.fullpage').on('mousewheel', function (e, delta) {
2566            if (delta == undefined) { // 2019.01.02 delta 값이 undefined로 넘어와서 아래와 같이 처리
2567                if (e.originalEvent.wheelDelta > 0) delta = 1;
2568                else delta = -1;
2569            }
2570
2571            var is_fullpage_scrolling = $(this).attr('data-scrolling') == "true" ? true : false;
2572            if (is_fullpage_scrolling) {
2573                e.preventDefault();
2574                return false;
2575            }
2576            $(this).attr('data-scrolling', true);
2577
2578            var index = $(this).find('.carousel.slide .carousel-inner > .item.active').index() + 1;
2579            var total = $(this).find('.carousel.slide .carousel-inner > .item').length;
2580            var active_item = $(this).find('.carousel.slide .carousel-inner > .item.active');
2581            if (delta == 1) {
2582                if (index == 1) {
2583                    $(this).attr('data-scrolling', false);
2584                    return;
2585                }
2586                $(this).find('.carousel.slide').carousel("prev");
2587
2588                var scrollY = parseInt(this.offsetTop);
2589                $("html, body").animate({scrollTop: scrollY}, 300);
2590
2591                // 2019-05-13 재헌
2592                // fullpage 위/아래 슬라이드 시 가끔씩 오동작 하는 부분이 있어서 스크립트로 제어함
2593                active_item.prev().removeAttr('style');
2594                active_item.css('transform', 'translate3d(0, 100%, 0)');
2595            }
2596            else {
2597                if (index == total) {
2598                    $(this).attr('data-scrolling', false);
2599                    return;
2600                }
2601                $(this).find('.carousel.slide').carousel("next");
2602
2603                var scrollY = parseInt(this.offsetTop);
2604                $("html, body").animate({scrollTop: scrollY}, 300);
2605
2606                // 2019-05-13 재헌
2607                // fullpage 위/아래 슬라이드 시 가끔씩 오동작 하는 부분이 있어서 스크립트로 제어함
2608                active_item.next().removeAttr('style');
2609                active_item.css('transform', 'translate3d(0, -100%, 0)');
2610            }
2611
2612            return false;
2613        });
2614    }
2615    else {
2616        // touchmove 이벤트 제거. 일부 브라우저에서 스크롤 오동작함 (safari)
2617        $('.slider-frm.fullpage').bind('touchmove', function(e){e.preventDefault()});
2618        $('.slider-frm.fullpage').on('swipedown swipeup', function (e) {
2619            var is_fullpage_scrolling = $(this).attr('data-scrolling') == "true" ? true : false;
2620            if (is_fullpage_scrolling) {
2621                // e.preventDefault();
2622                return false;
2623            }
2624            $(this).attr('data-scrolling', true);
2625
2626            var index = $(this).find('.carousel.slide .carousel-inner > .item.active').index() + 1;
2627            var total = $(this).find('.carousel.slide .carousel-inner > .item').length;
2628            var active_item = $(this).find('.carousel.slide .carousel-inner > .item.active');
2629            if (e.type == "swipedown") {
2630                if (index == 1) {
2631                    if ($(this).prev('.frm').length > 0) { //
2632                        var scrollY = parseInt($(this).prev('.frm').offset().top);
2633                        $("html, body").animate({scrollTop: scrollY}, 200);
2634                    } else {
2635                        $("html, body").animate({scrollTop: 0}, 200);
2636                    }
2637                    $(this).attr('data-scrolling', false);
2638                    return;
2639                }
2640                $(this).find('.carousel.slide').carousel("prev");
2641
2642                var scrollY = parseInt(this.offsetTop);
2643                $("html, body").animate({scrollTop: scrollY}, 300);
2644
2645                // 2019-05-13 재헌
2646                // fullpage 위/아래 슬라이드 시 가끔씩 오동작 하는 부분이 있어서 스크립트로 제어함
2647                active_item.prev().removeAttr('style');
2648                active_item.css('transform', 'translate3d(0, 100%, 0)');
2649            }
2650            else {
2651                if (index == total) {
2652                    var scrollY = parseInt(this.offsetTop + $(this).height());
2653                    $("html, body").animate({scrollTop: scrollY}, 200);
2654                    $(this).attr('data-scrolling', false);
2655                    return;
2656                }
2657                $(this).find('.carousel.slide').carousel("next");
2658
2659                var scrollY = parseInt(this.offsetTop);
2660                $("html, body").animate({scrollTop: scrollY}, 300);
2661
2662                // 2019-05-13 재헌
2663                // fullpage 위/아래 슬라이드 시 가끔씩 오동작 하는 부분이 있어서 스크립트로 제어함
2664                active_item.next().removeAttr('style');
2665                active_item.css('transform', 'translate3d(0, -100%, 0)');
2666            }
2667
2668            return false;
2669        });
2670    }
2671
2672    // 2019-05-13 재헌
2673    // fullpage 위/아래 슬라이드 시 가끔씩 오동작 하는 부분이 있어서 스크립트로 제어함
2674    $('#main_container').on('click', '.fullpage .carousel-indicators > li', function () {
2675        var fullpage = $(this).parents('.fullpage').first();
2676        fullpage.find('.carousel-inner > .item').removeAttr('style');
2677
2678        var selected_item_num = $(this).attr('data-slide-to');
2679        var selected_item = $(fullpage.find('.carousel-inner > .item').get(selected_item_num));
2680
2681        selected_item.prev('.item').css('transform', 'translate3d(0, -100%, 0)');
2682        selected_item.next('.item').css('transform', 'translate3d(0, 100%, 0)');
2683    });
2684
2685    // transition init (ie : left, others : transition)
2686    $.each($('.fullpage .carousel-inner .item'), function() {
2687        $.each($(this).children('.frm'), function(i) {
2688            if (is_InternetExplorer()) {
2689                $(this).css('transform', 'none');
2690                $(this).css('left', parseInt(i * 100) + 'vw');
2691            }
2692            else {
2693                $(this).css('transform', 'translate3d(' + parseInt(i * 100) + 'vw,0,0)');
2694            }
2695            $(this).removeClass('active');
2696        });
2697    });
2698
2699    $('#main_container').on('click', '.fullpage-slide-control', function () {
2700        var item = $(this).parent();
2701        var frames = $(item).children('.frm');
2702        var total_length = frames.length;
2703        var active_frm = frames.filter(function () { return $(this).hasClass('active'); });
2704        if (active_frm.length == 0) { active_frm = frames.first(); }
2705        var index = active_frm.index();
2706
2707        if ($(this).hasClass('left')) {
2708            if (index == 0) {
2709                frames.removeClass('active');
2710                frames.last().addClass('active');
2711                $.each(frames, function (i) {
2712                    var idx = total_length - i - 1;
2713                    if (is_InternetExplorer()) {
2714                        $(this).css('left', '-' + parseInt(idx * 100) + 'vw');
2715                    }
2716                    else {
2717                        $(this).css('transform', 'translate3d(-' + parseInt(idx * 100) + 'vw,0,0)');
2718                    }
2719                });
2720            }
2721            else {
2722                $.each(frames, function (i) {
2723                    var left = (i - index + 1) * 100;
2724                    if (is_InternetExplorer()) {
2725                        $(this).css('left', left + 'vw'); }
2726                    else {
2727                        $(this).css('transform', 'translate3d(' + left + 'vw,0,0)');
2728                    }
2729
2730                    $(this).removeClass('active');
2731                    if (i == index-1) { $(this).addClass('active'); }
2732                });
2733            }
2734        }
2735        else if ($(this).hasClass('right')) {
2736            if (index == total_length - 1) {
2737                frames.removeClass('active');
2738                frames.first().addClass('active');
2739                $.each(frames, function (i) {
2740                    if (is_InternetExplorer()) {
2741                        $(this).css('left', parseInt(i * 100) + 'vw');
2742                    }
2743                    else {
2744                        $(this).css('transform', 'translate3d(' + parseInt(i * 100) + 'vw,0,0)');
2745                    }
2746                });
2747            }
2748            else {
2749                $.each(frames, function (i) {
2750                    var left = (i - index - 1) * 100;
2751                    if (is_InternetExplorer()) {
2752                        $(this).css('left', left + 'vw');
2753                    }
2754                    else {
2755                        $(this).css('transform', 'translate3d(' + left + 'vw,0,0)');
2756                    }
2757                    $(this).removeClass('active');
2758                    if (i == index + 1) { $(this).addClass('active'); }
2759                });
2760            }
2761        }
2762    });
2763
2764    $('.fullpage').find('.carousel.slide').on('slid.bs.carousel', function () {
2765        var slider = $(this).parents('.fullpage');
2766        setTimeout(function () {
2767            $(slider).attr('data-scrolling', false);
2768        }, 550);
2769    });
2770
2771    jQuery.fn.carousel.Constructor.TRANSITION_DURATION = 1000  // 2 seconds
2772}
2773
2774function is_InternetExplorer() {
2775    var agent = navigator.userAgent.toLowerCase();
2776    return (navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (agent.indexOf("msie") != -1);
2777}
2778
2779function initSMS() {
2780    qvjax_direct(
2781        "select_sms_info",
2782        "//" + QV_BASE_OBJ.dev + "g" + QV_BASE_OBJ.svid + "m.quv.kr" + "/qws/aligo.php",
2783        '',
2784        function (data) {
2785            $.each(data, function() {
2786                if (this.smi_state == '1') {
2787                    var hide_icon = '';
2788                    var hide_window = '';
2789
2790                    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
2791                    if(isMobile) {
2792                        hide_window = 'sms-hide';
2793                    }
2794                    else {
2795                        if (this.smi_init_show == '1') { hide_icon = 'sms-hide'; }
2796                        else { hide_window = 'sms-hide'; }
2797                    }
2798
2799                    var html = '<div id="fixed-contents-sms" class="fixed-contents-layer fixed-contents-show-all" style="bottom: 40px; right: 40px; top: auto; left: auto;" data-axis="se"> <div class="box smsBox"> <div class="preview"></div><div class="view"> <div> <div class="sms-icon ' + hide_icon + '"> <div> <i class="icon-bubbles" aria-hidden="true"></i> </div></div><div class="sms sms-1 ' + hide_window + '"> <div class="sms-header"><span>SMS 문자보내기</span> <div class="sms-close">×</div></div><div class="sms-body"> <div class="sms-message"> <div class="sms-title">메세지</div><textarea></textarea> </div><div class="sms-contact"> <div class="sms-title">연락처</div><input type="text"> <div class="sms-agree"><input type="checkbox"><a href="/policy_privacy">개인정보 수집 및 이용</a>에 동의합니다</div></div></div><div class="sms-footer"> 보내기 </div></div></div><span class="configuration fixed-contents-config-btn" style="top: -18px; bottom: auto;"><a class="label"> <i class="icon-arrow-down"></i></a></span> <div class="fixed-contents-close"><i class="icon-close"></i></div></div></div></div>';
2800                    $('.body').append($(html));
2801
2802                    $('.sms-header > span').text(this.smi_title);
2803                    $('.sms-message > textarea').attr('placeholder', this.smi_placeholder);
2804
2805                    var start = parseInt(this.smi_start_time);
2806                    var end = parseInt(this.smi_end_time);
2807                    end = end == 0 ? 2400 : end;
2808
2809                    var current_hours = new Date().getHours();
2810                    var current_minutes = new Date().getMinutes();
2811                    var current_time = parseInt(current_hours.toString() + current_minutes.toString());
2812
2813                    if (start <= current_time && current_time < end) {
2814                        $('.smsBox').show();
2815                    }
2816                    else {
2817                        $('.smsBox').hide();
2818                        return;
2819                    }
2820
2821                    // sms
2822                    $('.sms-icon').on('click', function() {
2823                        var sms = $(this).parents('.smsBox').first();
2824                        sms.find('.sms-icon').addClass('sms-hide');
2825                        sms.find('.sms').removeClass('sms-hide');
2826                    });
2827
2828                    $('.sms-close').on('click', function() {
2829                        var sms = $(this).parents('.smsBox').first();
2830                        sms.find('.sms').addClass('sms-hide');
2831                        sms.find('.sms-icon').removeClass('sms-hide');
2832                    });
2833
2834                    $('.sms-contact input').on('change keydown paste input', function() {
2835                        var number = $(this).val();
2836                        if (number.length > 20) { $(this).val($(this).val().slice(0,20)); return false; }
2837
2838                        this.value = this.value.replace(/[^0-9\.]/g,'');
2839                    });
2840
2841                    $('.sms-footer').on('click', function() {
2842                        var sms = $(this).parents('.smsBox').first();
2843                        var phone = sms.find('.sms-contact input').val();
2844                        var message = sms.find('.sms-message textarea').val();
2845                        var agree = sms.find('.sms-agree input').prop('checked');
2846
2847                        if (!isValidMobileNumber(phone)) {
2848                            alert(lang.failure_send_sms_invalid_number);
2849                            return;
2850                        }
2851                        if (!agree) {
2852                            alert(lang.agree_privacy_info);
2853                            return;
2854                        }
2855
2856                        qvjax_direct(
2857                            "send",
2858                            "//" + QV_BASE_OBJ.dev + "g" + QV_BASE_OBJ.svid + "m.quv.kr" + "/qws/aligo.php",
2859                            'msg=' + message + '&sender=' + phone,
2860                            function (data) {
2861                                if (data.result_code == "1" && data.message == "success") {
2862                                    smsSendComplete(data.sshid, data.msg_id, data.msg_type, function() {
2863                                        sms.find('.sms-contact input').val('');
2864                                        sms.find('.sms-message textarea').val('');
2865                                        sms.find('.sms-agree input').prop('checked', false);
2866                                        alert(lang.success_send_sms);
2867
2868                                        qv_func.conversion('sms', function() {})
2869                                    });
2870                                }
2871                                else if (data.result_code == "0") {
2872                                    switch(data.message) {
2873                                        case "frequently_called":
2874                                            alert(lang.failure_send_sms_frequently_called);
2875                                            break;
2876                                        case "too_long_message":
2877                                            alert(lang.failure_send_sms_too_long_message);
2878                                            break;
2879                                        case "low_balance":
2880                                            alert(lang.failure_send_sms_low_balance);
2881                                            break;
2882                                        case "invalid_number":
2883                                            alert(lang.failure_send_sms_invalid_number);
2884                                            break;
2885                                        default:
2886                                            alert(lang.failure_send_sms_default);
2887                                            break;
2888                                    }
2889                                }
2890                                else if (data.result_code == '-101') {
2891                                    smsSendFailure(data.sshid, data.result_code, data.message, function() {
2892                                        alert(lang.failure_send_sms_default);
2893                                    });
2894                                }
2895                            },
2896                            function (xhr) { }
2897                        );
2898                    });
2899                }
2900            });
2901        },
2902        function (xhr) { }
2903    );
2904
2905    function smsSendComplete(sshid, msg_id, msg_type, callback) {
2906        var type = msg_type.toLowerCase() == 'sms' ? 'sms' : 'lms';
2907        qvjax_direct(
2908            "complete",
2909            "//" + QV_BASE_OBJ.dev + "g" + QV_BASE_OBJ.svid + "m.quv.kr" + "/qws/aligo.php",
2910            'sshid=' + sshid + '&msg_id=' + msg_id + '&msg_type=' + type,
2911            function (data) {
2912                callback();
2913            },
2914            function (xhr) { }
2915        )
2916    }
2917
2918    function smsSendFailure(sshid, res_code, res_error_msg, callback) {
2919        qvjax_direct(
2920            "failure",
2921            "//" + QV_BASE_OBJ.dev + "g" + QV_BASE_OBJ.svid + "m.quv.kr" + "/qws/aligo.php",
2922            'sshid=' + sshid + '&res_code=' + res_code + '&res_error_msg=' + res_error_msg,
2923            function (data) {
2924                callback();
2925            },
2926            function (xhr) { }
2927        )
2928    }
2929
2930    function isValidMobileNumber(num) {
2931        //if(!num.match(/^\d+$/)) { valid = false; }
2932        var arr_head = ['010','011','016','017','018','019','031','032','041','042','043','051','052','053','054','055','061','062','063','064','070','080',
2933                        '020', '021', '022', '023', '024', '025', '026', '027', '028', '029'];
2934        var head = num.slice(0, 3);
2935        return $.inArray(head, arr_head) > -1 ? true : false;
2936    }
2937}
2938
2939function byteCheck(string){
2940    var utf8length = 0;
2941    for (var n = 0; n < string.length; n++) {
2942        var c = string.charCodeAt(n);
2943        if (c < 128) {
2944            utf8length++;
2945        }
2946        else if((c > 127) && (c < 2048)) {
2947            utf8length = utf8length+2;
2948        }
2949        else {
2950            utf8length = utf8length+3;
2951        }
2952    }
2953    return utf8length;
2954}
2955
2956
2957function initTabFrame() {
2958    // 2019.01.31
2959    $.each($('.tab-frm'), function() {
2960        $(this).find('.tab-frame-nav > ul > li').removeClass('active');
2961        //$(this).find('.tab-frame-nav > ul > li:first-child').addClass('active');
2962        $(this).find('.tab-frame-nav > ul > li:first-child > a').trigger('click');
2963    });
2964
2965    // 2018.09.04 재헌
2966    // URL에 #tab- 형식의 값이 있으면 해당 탭을 활성화한다.
2967    var hash = location.hash;
2968    if (hash != undefined && hash != '') {
2969        if (hash.indexOf('tab-') < 0) { return; }
2970        if ($(hash).length == 0) { return; }
2971
2972        var tab = $('a[href="' + hash + '"]');
2973        var nav = tab.closest('.tab-frame-nav');
2974        $.each(nav.find('li'), function() {
2975            $(this).children('a').attr('aria-expanded', false);
2976            $(this).removeClass('active');
2977        });
2978
2979        tab.attr('aria-expanded', true);
2980        tab.parent().addClass('active');
2981
2982        /* 2021.08.02
2983         * PC, 모바일 따로 구성하여 같은 id가 두 개 이상 있을 때
2984         * 둘 다 active 클래스 영향을 받도록 함
2985         */
2986        $('div[id="' + hash.replace(/#/g, '') + '"]').each(function() {
2987            $(this).siblings().removeClass('active');
2988            $(this).addClass('active');
2989        });
2990        // $(hash).siblings().removeClass('active');
2991        // $(hash).addClass('active');
2992
2993        setTimeout(function(){
2994            $(window).scrollTop(nav.offset().top - $('.header').height());
2995//            $('html, body').animate({
2996//                scrollTop: nav.offset().top - 200
2997//            }, 500);
2998        },500);
2999
3000        /* 2020.03.19 재헌
3001         * 탭을 mobile_ele로 복사하여 넣은 경우 헤더의 탭 앵커가 동작하지 않기 때문에(id가 달라서)
3002         * 이름으로 찾아 활성화한다
3003         */
3004        if (isMobile()) {
3005            var tab_name = tab.first().text();
3006            $.each($('.mobile_ele .tab-frame-nav a'), function() {
3007                if ($(this).text() == tab_name) {
3008                    var id = $(this).attr('href');
3009                    $(this).parent().siblings().removeClass('active');
3010                    $(this).parent().addClass('active');
3011                    $('.mobile_ele ' + id).siblings().removeClass('active');
3012                    $('.mobile_ele ' + id).addClass('active');
3013                }
3014            });
3015        }
3016    }
3017
3018    // 탭 내에 지도가 있으면 렌더링이 정상적으로 안되는 증상이 있음
3019    // 탭 클릭시 지도를 새로 렌더링 하도록 함
3020    $('#main_container').delegate('.tab-frm .tab-frame-nav li > a', 'click', function(e) {
3021        var frm = $(this).parents('.tab-frm').first();
3022        $.each(frm.find('.mapBox'), function() {
3023            var map = $(this);
3024            map.removeClass('map-rendering-complete');
3025            map.find('.qv-map').children().remove();
3026            setTimeout(function() {
3027                renderMapBox(map);
3028            }, 100);
3029        });
3030        $.each(frm.find('.mapListBox'), function() {
3031            var map = $(this);
3032            map.removeClass('map-list-rendering-complete');
3033            map.find('.qv-map-list').children().remove();
3034            setTimeout(function() {
3035                renderMapListBox(map);
3036            }, 100);
3037        });
3038
3039        // 동일 페이지에 같은 아이디의 텝이 두개 이상 존재할 때
3040        var tab_id = $(this).attr('href').replace(/#/g, '');
3041        if ($('.tab-pane[id="' + tab_id + '"]').length > 0) {
3042            e.preventDefault();
3043            //frm.find('.tab-pane.active').removeClass('active');
3044            frm.find('.tab-content').first().children('.tab-pane.active').removeClass('active');
3045            frm.find('.tab-pane[id="' + tab_id + '"]').addClass('active');
3046        }
3047
3048
3049        // 탭 클릭 시 마우스오버 컨텐츠 Initialize
3050        $.each(frm.find('.mouseover-frm'), function() {
3051            var before = $(this).find('.mouseover-before').first();
3052            var after = $(this).find('.mouseover-after').first();
3053            var mouseover_height = before.height() > after.height() ? before.height() : after.height();
3054
3055            if ($(this).height() < mouseover_height) {
3056                var tb = $(this).children('.view').children('.tb');
3057                tb.height(mouseover_height);
3058            }
3059        });
3060
3061        initIframe(frm.find('.iframeBox'));
3062    });
3063}
3064
3065$(window).on('hashchange', function(e) {
3066    var hash = window.location.hash;
3067    var oldUrl = e.originalEvent.oldURL;
3068    var newUrl = e.originalEvent.newURL;
3069
3070    var oldUrl_noHash = oldUrl.indexOf('#') < 0 ? oldUrl : oldUrl.split('#')[0];
3071    var newUrl_noHash = newUrl.indexOf('#') < 0 ? newUrl : newUrl.split('#')[0];
3072
3073    if (hash.indexOf('#tab') > -1 && (oldUrl_noHash == newUrl_noHash)) {
3074        window.location.href = newUrl;
3075        window.location.reload();
3076    }
3077});
3078
3079// 픽스드 컨텐츠 초기화
3080function initFixedContents() {
3081    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
3082    if(isMobile) {
3083        var fixed = $('body').find('.fixed-contents-layer.fixed-contents-show-mobile');
3084        $.each(fixed, function() {
3085            var top = this.style.top;
3086            var left = this.style.left;
3087            var bottom = this.style.bottom;
3088            var right = this.style.right;
3089            var ratio = 3;
3090
3091            if (top != 'auto') { $(this).css('top', parseFloat(top) / ratio + 'px'); }
3092            if (left != 'auto') { $(this).css('left', parseFloat(left) / ratio + 'px'); }
3093            if (bottom != 'auto') { $(this).css('bottom', parseFloat(bottom) / ratio + 'px'); }
3094            if (right != 'auto') { $(this).css('right', parseFloat(right) / ratio + 'px'); }
3095        });
3096    }
3097
3098    //Click event to scroll to top & bottom
3099    var didScroll = false;
3100    $('body').delegate('.scrollToTop', 'click', function(e) {
3101        if (!didScroll) {
3102            didScroll = true;
3103            $('html, body').stop().animate({scrollTop: 0}, 500, 'swing', function() {didScroll = false;});
3104            return false;
3105        }
3106    });
3107    $('body').delegate('.scrollToBottom', 'click', function(e) {
3108        if (!didScroll) {
3109            didScroll = true;
3110            $('html, body').stop().animate({scrollTop: $('.body').height()}, 500, 'swing', function() {didScroll = false;});
3111            return false;
3112        }
3113    });
3114}
3115// 픽스트 컨텐츠 초기화 끝
3116
3117// Youtube 자동 재생 시작
3118/*
3119 * mute 속성 안주면 자동재생 안됨. 현재 iframe src에 mute=1 속성 부여
3120 * https://stackoverflow.com/questions/40685142/youtube-autoplay-not-working
3121 */
3122
3123/* =========================================================================
3124 * 2026.08 동영상 지연 로드 (썸네일 화질 저하 수정)
3125 *
3126 * iframe이 0x0인 상태에서 src를 주입하면 유튜브가 그 크기 기준으로
3127 * 포스터(썸네일)를 고르고, 이후 커져도 다시 고르지 않아 뭉개진다.
3128 * 따라서 "실제로 보이고 크기가 잡힌 뒤"에만 로드한다.
3129 *
3130 * 이 파일에서 호출하는 이유:
3131 *   script.inc.html 을 include 하는 진입점 12개 중 10개는
3132 *   src 주입 블럭도 onload.inc.html 도 갖고 있지 않다.
3133 *   진입점별로 호출하면 그 10개에서 동영상이 로드되지 않는다.
3134 * ========================================================================= */
3135var qvVideoObserver   = null;
3136var qvVideoPending    = [];
3137var qvVideoLazyInited = false;
3138var qvVideoWatchdogTimer = null;
3139var qvVideoWatchdogTicks = 0;
3140var qvVideoScrollTimer   = null;
3141var QV_VIDEO_WATCHDOG_INTERVAL = 500;   // ms
3142var QV_VIDEO_WATCHDOG_MAX      = 20;    // 500ms * 20 = 최대 10초
3143var QV_VIDEO_ZERO_TICKS_LIMIT  = 2;     // 면적 0 상태가 약 1초 지속되면 포기하고 로드
3144
3145function qvVideoIsRenderable(el) {
3146    var r = el.getBoundingClientRect();
3147    return r.width > 1 && r.height > 1;
3148}
3149
3150// display:none 이면 false (레이아웃 박스 자체가 만들어지지 않는다)
3151function qvVideoIsRendered(el) {
3152    return el.getClientRects().length > 0;
3153}
3154
3155function qvVideoUnobserve(el) {
3156    if (qvVideoObserver) qvVideoObserver.unobserve(el);
3157}
3158
3159// 게이트 없이 실제 로드만 수행 (IntersectionObserver 미지원 폴백에서도 사용)
3160function qvVideoLoad(el) {
3161    if (el.getAttribute('data-qv-activated')) return;
3162    el.setAttribute('data-qv-activated', '1');
3163
3164    if (el.tagName === 'IFRAME') {
3165        var src = el.getAttribute('data-src');
3166        if (!src) return;
3167
3168        // 로딩 마스크를 "활성화 시점"에 삽입한다.
3169        // (기존에는 index.html / onload.inc.html 에서 전량 미리 삽입했다)
3170        $(el).before('<div class="proceeding">' +
3171                     '<div style="z-index: -1;" class="qv-loader qv-loader-black"></div></div>');
3172        $(el).on('load', function() { $(this).siblings('.proceeding').remove(); });
3173        el.setAttribute('src', src);
3174    }
3175    else {
3176        qvCreateYoutubePlayer(el);   // div 플레이스홀더 -> YT.Player
3177    }
3178}
3179
3180// 게이트 통과 시에만 로드. 성공(= 관찰 해제 가능) 시 true
3181function qvVideoActivate(el) {
3182    if (el.getAttribute('data-qv-activated')) return true;
3183    if (!qvVideoIsRenderable(el)) return false;
3184    qvVideoLoad(el);
3185    return true;
3186}
3187
3188function qvVideoObserve(el) {
3189    if (!el || el.getAttribute('data-qv-observed')) return;
3190    el.setAttribute('data-qv-observed', '1');
3191
3192    // IntersectionObserver 미지원(IE11 등) -> 게이트 우회, 기존 동작 그대로
3193    if (!window.IntersectionObserver) { qvVideoLoad(el); return; }
3194
3195    if (!qvVideoObserver) {
3196        qvVideoObserver = new IntersectionObserver(function(entries) {
3197            $.each(entries, function(i, entry) {
3198                if (!entry.isIntersecting) return;   // 등록 직후 false 콜백 포함
3199                if (qvVideoActivate(entry.target)) qvVideoUnobserve(entry.target);
3200            });
3201        }, { rootMargin: '100px' });
3202    }
3203
3204    qvVideoPending.push(el);
3205    qvVideoObserver.observe(el);
3206}
3207
3208/* 감시자
3209 * IntersectionObserver 는 "임계값 교차" 시에만 콜백한다.
3210 * 렌더는 되는데 면적이 0인 요소(예: 부모 폭이 0)는 교차가 성립하지 않아
3211 * isIntersecting 이 영원히 true 가 되지 않는다 -> 영구 대기.
3212 * 그런 요소만 골라 강제 로드한다.
3213 *
3214 * 주의: display:none 인 요소(= 아직 화면에 없는 정상 대기)와,
3215 *       크기가 정상인 요소(= IntersectionObserver 가 처리할 것)는 건드리지 않는다.
3216 *       그렇지 않으면 지연 로드 자체가 무력화된다. */
3217function qvVideoWatchdog() {
3218    qvVideoWatchdogTicks++;
3219
3220    qvVideoPending = $.grep(qvVideoPending, function(el) {
3221        if (el.getAttribute('data-qv-activated')) { qvVideoUnobserve(el); return false; }
3222        if (!qvVideoIsRendered(el))  return true;   // 아직 display:none -> 정상 대기
3223        if (qvVideoIsRenderable(el)) return true;
3223   // 크기 정상 -> IntersectionObserver 담당
3224
3225        var n = (parseInt(el.getAttribute('data-qv-zero-ticks'), 10) || 0) + 1;
3226        el.setAttribute('data-qv-zero-ticks', n);
3227        if (n < QV_VIDEO_ZERO_TICKS_LIMIT) return true;
3228
3229        // 면적 0 인 채로 굳었다 -> 화질을 포기하고 로드한다.
3230        // ("표시됨"이 화질보다 우선이며, 최악의 경우에도 기존 동작보다 나빠지지 않는다)
3231        qvVideoLoad(el);
3232        qvVideoUnobserve(el);
3233        return false;
3234    });
3235
3236    if (!qvVideoPending.length || qvVideoWatchdogTicks >= QV_VIDEO_WATCHDOG_MAX) {
3237        clearInterval(qvVideoWatchdogTimer);
3238        qvVideoWatchdogTimer = null;
3239    }
3240}
3241
3242function qvVideoWatchdogStart() {
3243    qvVideoWatchdogTicks = 0;                       // 이미 돌고 있으면 카운트만 리셋
3244    if (qvVideoWatchdogTimer || !qvVideoPending.length) return;
3245    qvVideoWatchdogTimer = setInterval(qvVideoWatchdog, QV_VIDEO_WATCHDOG_INTERVAL);
3246}
3247
3248function qvVideoWatchdogStartDebounced() {
3249    clearTimeout(qvVideoScrollTimer);
3250    qvVideoScrollTimer = setTimeout(qvVideoWatchdogStart, 300);
3251}
3252
3253// root 인자로 동적 삽입 지점에서 재호출 가능. 중복 호출 안전(멱등)
3254function initVideoLazyLoad(root) {
3255    $(root || document)
3256        .find('iframe.video-iframe[data-src], div.video-iframe[data-src]')
3257        .each(function() { qvVideoObserve(this); });
3258
3259    qvVideoWatchdogStart();
3260
3261    if (qvVideoLazyInited) return;
3262    qvVideoLazyInited = true;
3263    $(window).on('resize orientationchange', qvVideoWatchdogStart);
3264    $(window).on('scroll', qvVideoWatchdogStartDebounced);
3265    $(document).on('shown.bs.tab shown.bs.modal slid.bs.carousel', qvVideoWatchdogStart);
3266}
3267
3268
3269$(window).load(function() {
3270    // 모든 .video-iframe 을 지연 로드 대상으로 등록
3271    initVideoLazyLoad();
3272
3273    /*
3274     * Youtube API 로드
3275     * 2019.03.18 재헌 주석처리
3276     * Youtube API 미사용중. 아래 스크립트 때문에 반복재생이 안되는 문제 발생
3277     */
3278    var tag = document.createElement('script');
3279    tag.src = "https://www.youtube.com/iframe_api";
3280    var firstScriptTag = document.getElementsByTagName('script')[0];
3281    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
3282});
3283
3284// iframe 제거하고 새로운 div 플레이스홀더 생성
3285// iframe이 속한 videoBox를 찾아서, 그 안에 집어넣어주기
3286// 실제 iframe 은 YT.Player 가 이 플레이스홀더를 교체하며 만든다
3287function mobileAutoPlayIframe () {
3288    try {
3289        $('.videoBox').each(function(){
3290            var iframe = $(this).find('.video-iframe')[0];
3291            var vBox   = $(this).find('.view')[0];
3292            // .video-iframe 이나 .view 가 없는 videoBox 에서 루프가 중단되지 않도록 방어
3293            if (!iframe || !vBox) return;
3294
3295            var dataSrc = iframe.getAttribute('data-src') || '';
3296            // vimeo는 해당 로직 필요 없음
3297            if (dataSrc.indexOf('vimeo') > -1) return;
3298            // 기존 아이디 없는 동영상들 놔두기
3299            if (!iframe.id) return;
3300
3301            var placeholder = document.createElement('div');
3302            placeholder.id        = iframe.id;
3303            placeholder.className = 'video-iframe';
3304            placeholder.setAttribute('data-src', dataSrc);
3305
3306            // IE11 은 ChildNode.remove() 미지원. 이 함수는 파싱 시점 최상위에서
3307            // 호출되므로 예외가 나면 이후 최상위 문장이 전부 실행되지 않는다.
3308            if (iframe.parentNode) iframe.parentNode.removeChild(iframe);
3309            vBox.appendChild(placeholder);
3310        });
3311    } catch (e) {
3312        if (window.console && console.error) console.error('mobileAutoPlayIframe', e);
3313    }
3314}
3315mobileAutoPlayIframe()
3316
3317var player_list = [];
3318var qvYoutubeApiReady  = false;
3319var qvPlayerWaitingApi = [];
3320
3321/* playerVars 화이트리스트
3322 * controls / disablekb / fs / showinfo / autohide / wmode / frameborder 는 의도적으로 제외한다.
3323 * 지금까지 YT.Player 가 videoId 만 받아 이 값들이 전부 무시되고 있었으므로,
3324 * 지금 와서 controls=0 을 적용하면 일반 동영상 블럭에서 재생 버튼도 키보드도 못 써
3325 * 방문자가 영상을 재생할 방법이 사라진다. */
3326var QV_PLAYER_VARS_ALLOW = ['autoplay', 'mute', 'loop', 'playlist', 'start', 'end',
3327                            'rel', 'playsinline', 'iv_load_policy', 'modestbranding',
3328                            'cc_load_policy', 'color', 'hl'];
3329
3330// API 준비 완료 - 대기 중이던 것만 생성한다.
3331// (.videoBox 전량 순회는 제거되었다. 등록은 initVideoLazyLoad 가 담당한다)
3332function onYouTubeIframeAPIReady() {
3333    qvYoutubeApiReady = true;
3334    var waiting = qvPlayerWaitingApi;
3335    qvPlayerWaitingApi = [];
3336    $.each(waiting, function(i, el) { qvCreateYoutubePlayer(el); });
3337}
3338
3339function qvCreateYoutubePlayer(el) {
3340    // API 미도착 -> 큐에 넣고 대기
3341    if (!qvYoutubeApiReady || !window.YT || !YT.Player) {
3342        qvPlayerWaitingApi.push(el);
3343        return;
3344    }
3345
3346    var src = el.getAttribute('data-src') || '';
3347    // vimeo는 해당 로직 필요 없음
3348    if (src.indexOf('vimeo') > -1) return;
3349
3350    var videoId = (src.split('embed/')[1] || '').split('?')[0];
3351    if (!videoId) return;
3352
3353    // data-src 의 쿼리 파라미터를 보존한다 (기존에는 videoId 만 넘겨 전부 유실됐다)
3354    var raw = {};
3355    $.each((src.split('?')[1] || '').split('&'), function(i, kv) {
3356        var p = kv.indexOf('=');
3357        if (p < 1) return;                    // 빈 토큰(&&) 및 값 없는 키 제외
3358        raw[kv.slice(0, p)] = kv.slice(p + 1);
3359    });
3360
3361    var playerVars = {};
3362    $.each(QV_PLAYER_VARS_ALLOW, function(i, k) {
3363        if (raw[k] !== undefined) playerVars[k] = raw[k];
3364    });
3365
3366    var isAutoPlay = String(raw.autoplay) === '1';
3367    var isLoop     = String(raw.loop)     === '1';
3368
3369    // 자동재생을 "생성 시점"에 부여 -> 생성 후 src 를 다시 쓰던 2회 로드 제거
3370    if (isAutoPlay) { playerVars.autoplay = 1; playerVars.mute = 1; }
3371    // loop 는 playlist 가 있어야 동작한다. 없으면 자기 자신으로 채운다
3372    if (isLoop && !playerVars.playlist) { playerVars.playlist = videoId; }
3373
3374    var player = new YT.Player(el.id, {
3375        height: "100%",
3376        width: "100%",
3377        videoId: videoId,
3378        playerVars: playerVars,
3379        events: {
3380            // 동영상 로드되면 autoplay 실행
3381            onReady: function() { if (isAutoPlay) player.playVideo(); },
3382            // 재생 끝난 동영상 loop 값 확인하고 다시 재생
3383            onStateChange: function(e) {
3384                if (e.data === YT.PlayerState.ENDED && isLoop) player.playVideo();
3385            }
3386        }
3387    });
3388    player_list.push(player);
3389}
3390// Youtube 자동 재생 끝
3391
3392// SNS 초기화 시작
3393function initSnsFeed() {
3394    //var sns_feed = $("#main_container div[name*='feed']");
3395    var sns_feed = $("#main_container div.sns-feed");
3396    $.each(sns_feed, function(i, val) {
3397        var target = $(val).parents('.box').first();
3398        var feed_token = target.data('feed_token');
3399        var feed_count = target.data('feed_count');
3400        var feed_style = target.data('feed_style');
3401        var feed_column = target.data('feed_column');
3402        var feed_column_m = target.data('feed_column_m');
3403        var feed_height_m = target.data('feed_height_m') == undefined ? $(val).find('.sns-feed-image-layer').height() : target.data('feed_height_m');
3404        var feed_type = target.data('feed_type');
3405        var vBox = $(val).parents('.view').first();
3406
3407        if (feed_type != undefined && feed_token != undefined) {
3408            switch(feed_type) {
3409                case 'twitter':
3410                    renderTwitterFeed(feed_token, feed_count, feed_column, feed_column_m, feed_height_m, feed_style, vBox);
3411                    break;
3412                case 'instagram':
3413                    renderInstagramFeed(feed_token, feed_count, feed_column, feed_column_m, feed_height_m, feed_style, vBox);
3414                    break;
3415            }
3416
3417            target.removeAttr('data-feed_token');
3418        }
3419    });
3420}
3421function initInstagramFeed() {
3422    var instagram_feed = $('#main_container div.instagramFeedBox');
3423    $.each(instagram_feed, function(i, val) {
3424        var target = $(this);
3425        var feed_token = target.data('access-token');
3426        var feed_count = target.data('feed-count');
3427        var feed_count_m = target.data('feed-count-m');
3428        var feed_column = target.data('feed-column');
3429        var feed_column_m = target.data('feed-column-m');
3430        var feed_height = target.data('feed-height');
3431        var feed_height_m = target.data('feed-height-m') == undefined ? $(val).find('.sns-feed-image-layer').height() : target.data('feed-height-m');
3432        var feed_margin = target.data('feed-margin');
3433        var vBox = $(val).children('.view').first();
3434
3435        renderInstagramGraphFeed(feed_token, feed_count, feed_column, feed_count_m, feed_column_m, feed_height, feed_height_m, feed_margin, vBox)
3436        target.removeAttr('data-access-token');
3437    });
3438}
3439//(function(d, s, id) {
3440//    var js, fjs = d.getElementsByTagName(s)[0];
3441//    if (d.getElementById(id)) return;
3442//    js = d.createElement(s); js.id = id;
3443//    js.src = 'https://connect.facebook.net/ko_KR/sdk.js#xfbml=1&version=v3.1&appId=786526475012875&autoLogAppEvents=1';
3444//    fjs.parentNode.insertBefore(js, fjs);
3445//}(document, 'script', 'facebook-jssdk'));
3446
3447function initFacebookSDK(d, s, id, c) {
3448    var js, fjs = d.getElementsByTagName(s)[0];
3449    if (d.getElementById(id)) return;
3450    js = d.createElement(s); js.id = id;
3451    js.src = 'https://connect.facebook.net/ko_KR/sdk.js#xfbml=1&version=v3.1&appId=786526475012875&autoLogAppEvents=1';
3452    if (c) { fjs.addEventListener('load', function(e) { c(null, e); }, false); }
3453    fjs.parentNode.insertBefore(js, fjs);
3454}
3455
3456function refreshInstagramAccessToken(access_token, callback) {
3457    qvjax_direct(
3458        "refresh_instagram_access_token",
3459        "/module/sns/instagram.php",
3460        "&access_token=" + access_token,
3461        function(data) {
3462            /* result 0 : 토큰 갱신 필요
3463             * result 1 : 정상
3464             */
3465            if (data.result == 0) {
3466                $.ajax({
3467                    type: "GET",
3468                    url: "https://graph.instagram.com/refresh_access_token?grant_type=ig_refresh_token&access_token=" + access_token,
3469                    success: function (response) {
3470                        console.log('response', response);
3471                        callback();
3472                    },
3473                    error: function (xhr) {
3474                        console.log('[Instagram]\n토큰 갱신에 실패했습니다.\n관리자에게 문의해주세요.', xhr);
3475                        // if (xhr.responseJSON.error.code === 190) {}
3476                    }
3477                });
3478            } else if (data.result == 1) {
3479                callback();
3480            }
3481        },
3482        function (xhr) {
3483            console.log('xhr', xhr.responseText);
3484            callback();
3485        }
3486    )
3487}
3488
3489function renderInstagramGraphFeed(feed_token, feed_count, feed_column, feed_count_m, feed_column_m, feed_height, feed_height_m, feed_margin, vBox) {
3490    if (!feed_token) return;
3491    refreshInstagramAccessToken(feed_token, function() {
3492        $.ajax({
3493            type: "GET",
3494            url: "https://graph.instagram.com/me/media?fields=id,caption,media_type,media_url,thumbnail_url,timestamp,permalink&access_token=" + feed_token,
3495            success: function (response) {
3496                if (!response.data) return
3497                else if (response.data.length > 0) {
3498                    $(vBox.children('div')[0]).empty();
3499                    var count = isMobile() ? feed_count_m : feed_count;
3500                    for (var i = 0; i < count; i++) {
3501                        var media = response.data[i];
3502                        if (!media) return;
3503
3504                        var thumbnail = media.media_type == "VIDEO" ? media.thumbnail_url : media.media_url;
3505                        var feed = '<div class="sns-feed-box grid-' + feed_column + ' grid-m-' + feed_column_m + '">';
3506                        feed += "<a target='_blank' href='" + media.permalink + "'>";
3507                        feed += "<div class='sns-feed-image-layer m-h-" + feed_height_m + "' style='height:" + feed_height + "px; margin:" + feed_margin + "px;'>";
3508                        feed += '<div class="sns-feed-image" style="background-image: url(' + thumbnail + ');"></div>';
3509                        feed += "<div class='sns-feed-caption-layer qv-font'>";
3510                        if (media.caption !== undefined) {
3511                            if (media.caption.length > 0) {
3512                                var text = media.caption;
3513                                var length = 100;
3514                                var trimmedString = text.length > length ? text.substring(0, length - 3) + "..." : text;
3515                                feed += "<p class='sns-feed-caption-contents'>" + trimmedString + "</p>"
3516                            }
3517                        }
3518                        feed += "<span class='sns-feed-caption-info'>";
3519                        feed += "	<div class='sns-feed-caption-time'>";
3520                        feed += "		<i class='fa fa-calendar-o'></i>";
3521                        feed += getNiceTime(new Date(media.timestamp).getTime(), new Date(), 1, true);
3522                        feed += "	</div>";
3523                        feed += "</span>";
3524                        feed += "</div>";
3525                        feed += "</div>";
3526                        feed += "</a>";
3527                        feed += "</div>";
3528                        $(vBox.children('div')[0]).append(feed);
3529                        $(vBox).find('.sns-feed').show()
3530                    }
3531                }
3532            },
3533            error: function(xhr) {
3534                console.log('[Instagram]\n잘못된 계정이거나 존재하지 않는 계정입니다.\n\n계정정보나 비밀번호가 변경되었다면 다시 한 번 연동해주시기 바랍니다.');
3535                console.log('[Instagram ERROR]', JSON.parse(xhr.responseText).error);
3536                $(vBox).find('.sns-feed').show();
3537            }
3538        });
3539    });
3540}
3541
3542function renderInstagramFeed(feed_token, feed_count, feed_column, feed_column_m, feed_height_m, feed_style, vBox) {
3543    $.ajax({
3544        type: "GET",
3545        dataType: "jsonp",
3546        cache: false,
3547        url: "https://api.instagram.com/v1/users/self/media/recent/?access_token=" + feed_token + "&count=" + feed_count,
3548        success: function (response) {
3549            if (!response.data) return;
3550            else if (response.data.length > 0) {
3551                $(vBox.children('div')[0]).empty();
3552
3553                for (var i = 0; i < response.data.length; i++) {
3554                    var feed = '<div class="sns-feed-box grid-' + feed_column + ' grid-m-' + feed_column_m + '">';
3555                    feed += "<a target='_blank' href='" + response.data[i].link + "'>";
3556                    feed += "<div class='sns-feed-image-layer m-h-" + feed_height_m + "' style='" + feed_style + "'>";
3557                    feed += '<div class="sns-feed-image" style="background-image: url(' + response.data[i].images.standard_resolution.url + ');"></div>'
3558                    feed += "</div>";
3559                    feed += "<div class='sns-feed-caption-layer qv-font'>";
3560                    if (response.data[i].caption !== null) {
3561
3562                        if (response.data[i].caption.text.length > 0) {
3563                            var text = response.data[i].caption.text;
3564                            var length = 100;
3565                            var trimmedString = text.length > length ? text.substring(0, length - 3) + "..." : text;
3566                            feed += "<p class='sns-feed-caption-contents'>" + trimmedString + "</p>"
3567                        }
3568                    }
3569                    feed += "<span class='sns-feed-caption-info'>";
3570                    feed += "<div class='sns-feed-caption-time'>";
3571                    feed += "<i class='fa fa-calendar-o'></i>";
3572                    feed += getNiceTime(parseInt(response.data[i].created_time) * 1000, new Date(), 1, true);
3573                    feed += "</div>";
3574                    feed += "<div class='sns-feed-caption-likes'>";
3575                    feed += "<i class='fa fa-heart'></i>";
3576                    feed += response.data[i].likes.count;
3577                    feed += "<i class='fa fa-comment'></i>";
3578                    feed += response.data[i].comments.count;
3579                    feed += "</div>";
3580                    feed += "</span>";
3581                    feed += "</div>";
3582                    feed += "</a>";
3583                    feed += "</div>";
3584                    $(vBox.children('div')[0]).append(feed);
3585                }
3586            }
3587
3588            if (response.data.length < feed_count && response.pagination) {
3589                if (!response.pagination.next_url) return;
3590                else {
3591                    renderInstagramFeedMore(
3592                        response.pagination.next_url,
3593                        feed_count - response.data.length,
3594                        feed_column, feed_column_m, feed_height_m, feed_style, vBox);
3595                }
3596            }
3597        }
3598    });
3599}
3600
3601// 특정 이유로 인스타그램 피드를 원하는 개수만큼 불러오지 못했을 때 추가로 API를 호출한다
3602// 저작권이 있는 BGM이 들어간 영상, 재생시간이 1분 이상인 영상 등
3603// https://smashballoon.com/video-posts-are-missing-or-only-show-thumbnail/
3604function renderInstagramFeedMore(feed_url, feed_count, feed_column, feed_column_m, feed_height_m, feed_style, vBox) {
3605    $.ajax({
3606        type: "GET",
3607        dataType: "jsonp",
3608        cache: false,
3609        url: feed_url,
3610        success: function (response) {
3611            if (!response.data) return
3612            else if (response.data.length > 0) {
3613                for (var i = 0; i < feed_count; i++) {
3614                    var feed = '<div class="sns-feed-box grid-' + feed_column + ' grid-m-' + feed_column_m + '">';
3615                    feed += "<a target='_blank' href='" + response.data[i].link + "'>";
3616                    feed += "<div class='sns-feed-image-layer m-h-" + feed_height_m + "' style='" + feed_style + "'>";
3617                    feed += '<div class="sns-feed-image" style="background-image: url(' + response.data[i].images.standard_resolution.url + ');"></div>'
3618                    feed += "</div>";
3619                    feed += "<div class='sns-feed-caption-layer qv-font'>";
3620                    if (response.data[i].caption !== null) {
3621
3622                        if (response.data[i].caption.text.length > 0) {
3623                            var text = response.data[i].caption.text;
3624                            var length = 100;
3625                            var trimmedString = text.length > length ? text.substring(0, length - 3) + "..." : text;
3626                            feed += "<p class='sns-feed-caption-contents'>" + trimmedString + "</p>"
3627                        }
3628                    }
3629                    feed += "<span class='sns-feed-caption-info'>";
3630                    feed += "<div class='sns-feed-caption-time'>";
3631                    feed += "<i class='fa fa-calendar-o'></i>";
3632                    feed += getNiceTime(parseInt(response.data[i].created_time) * 1000, new Date(), 1, true);
3633                    feed += "</div>";
3634                    feed += "<div class='sns-feed-caption-likes'>";
3635                    feed += "<i class='fa fa-heart'></i>";
3636                    feed += response.data[i].likes.count;
3637                    feed += "<i class='fa fa-comment'></i>";
3638                    feed += response.data[i].comments.count;
3639                    feed += "</div>";
3640                    feed += "</span>";
3641                    feed += "</div>";
3642                    feed += "</a>";
3643                    feed += "</div>";
3644                    $(vBox.children('div')[0]).append(feed);
3645                }
3646            }
3647        }
3648    });
3649}
3650
3651function renderTwitterFeed(feed_token, feed_count, feed_column, feed_column_m, feed_height_m, feed_style,  vBox) {
3652    $.ajax({
3653        type: "GET",
3654        dataType: "jsonp",
3655        cache: false,
3656        url: location.protocol + '//quv.kr' + "/auth/twitter/tweets_json.php?count=" + feed_count + "&callback=listTweets&screen_name=" + feed_token,
3657        success: function(response) {
3658            if (response.length > 0) {
3659                $(vBox.children('div')[0]).empty();
3660
3661                for (var i = 0; i < response.length; i++) {
3662                    if (typeof response[i].entities.media != 'undefined' && response[i].entities.media.length > 0) {
3663                        var imageUrl = response[i].entities.media[0].media_url_https;
3664                        var link = response[i].entities.media[0].url;
3665                        var feedImageHtml = '<div class="sns-feed-image" style="background-image: url(' + imageUrl + ');"></div>';
3666                    } else {
3667                        var link = 'http://twitter.com/' + response[i].user.screen_name + '/status/' + response[i].id_str;
3668                        var feedImageHtml = '<div class="sns-feed-image"><div><i class="fa fa-twitter"></i></div></div>';
3669                    }
3670
3671                    var feed = '<div class="sns-feed-box grid-' + feed_column + ' grid-m-' + feed_column_m + '">';
3672                    feed += "<a target='_blank' href='" + link + "'>";
3673                    feed += "<div class='sns-feed-image-layer m-h-" + feed_height_m + "' style='" + feed_style + "'>";
3674                    feed += feedImageHtml
3675                    feed += "</div>";
3676                    if (typeof response[i].entities.media != 'undefined' && response[i].entities.media.length > 0) {
3677                        feed += "<div class='sns-feed-caption-layer'>";
3678                    } else {
3679                        feed += "<div class='sns-feed-caption-layer-display'>";
3680                    }
3681
3682                    if (response[i].text.length > 0) {
3683                        var text = response[i].text;
3684                        var length = 100;
3685                        var trimmedString = text.length > length ? text.substring(0, length - 3) + "..." : text;
3686                        feed += "<p class='sns-feed-caption-contents'>" + trimmedString + "</p>"
3687                    }
3688                    feed += "<span class='sns-feed-caption-info'>";
3689                    feed += "	<div class='sns-feed-caption-time'>";
3690                    feed += "		<i class='fa fa-calendar-o'></i>";
3691                    feed += getNiceTime(new Date(Date.parse(response[i].created_at.replace(/( \+)/, ' UTC$1'))), new Date(), 1, true);
3692                    feed += "	</div>";
3693                    feed += "	<div class='sns-feed-caption-likes'>";
3694                    feed += "		<i class='fa fa-heart'></i>";
3695                    feed += response[i].favorite_count;
3696                    feed += "		<i class='fa fa-retweet'></i>";
3697                    feed += response[i].retweet_count;
3698                    feed += "	</div>";
3699                    feed += "</span>";
3700                    feed += "</div>";
3701                    feed += "</a>";
3702                    feed += "</div>";
3703                    $(vBox.children('div')[0]).append(feed);
3704                }
3705            }
3706        }
3707    });
3708}
3709// SNS 초기화 끝
3710
3711
3712
3713// 모바일용 헤더 초기화
3714function initMobileHeader() {
3715    $('.header-mobile-nav-btn').on('click', function() {
3716        $('.header-mobile').addClass('active-side-nav');
3717    });
3718
3719    $('.header-mobile-side-nav-close').on('click', function() {
3720        $('.header-mobile').removeClass('active-side-nav');
3721    });
3722
3723    $('#main_container').delegate('.active-side-nav', 'click', function(e) {
3724        if ($(e.target).hasClass('header-mobile')) {
3725            $('.header-mobile').removeClass('active-side-nav');
3726        }
3727    });
3728
3729    
3730    $('.header-mobile-side-nav, .header-side-nav').delegate('.mn-dropdown', 'click', function(e) {
3731        var parent = $(this).parent();
3732        if (parent.find('ul.sub-mn').length > 0 && !parent.hasClass('active')) {
3733            parent.addClass('active');
3734        }
3735        else {
3736            parent.removeClass('active');
3737        }
3738    });
3739
3740
3741    // 모바일에서 스크롤 할 때 헤더에 scroll클래스 추가
3742    $(window).on('scroll', function(e) {
3743        if ($(this).scrollTop() > 50) {
3744            $('.header-mobile').addClass('scroll');
3745        }
3746        else {
3747            $('.header-mobile').removeClass('scroll');
3748        }
3749
3750        var scrollTop = $(this).scrollTop();
3751        var mobile_header =$('#main_container > .header-mobile > div');
3752        var mobile_header_fixed = $('#main_container > .header-mobile > div[data-scroll-fix="true"]');
3753        if (mobile_header.length != mobile_header_fixed.length) {
3754            $.each($('#main_container > .header-mobile > div[data-scroll-fix="true"]'), function () {
3755                var min = 0;
3756                var max = parseInt($(this).data('top'));
3757                var top = max - scrollTop;
3758                top = top <= min ? min : top;
3759                $(this).css('top', top + 'px');
3760            });
3761        }
3762
3763        // 서브메뉴가 존재할 때 header merge 상태이면
3764        // 스크롤 시 header-mobile-sub-menu 배경 색상을 투명에서 기존 색상으로 변경해주는 작업
3765        $.each($('#main_container > .header-mobile .header-mobile-sub-menu'), function() {
3766            $(this).css('background', $(this).parent().css('background'));
3767        });
3768    });
3769}
3770// 모바일용 헤드 초기화 끝
3771
3772// 스크롤
3773var isScrolling = false;
3774function onScrollBefore() {
3775    if (isScrolling) {
3776        isScrolling = false;
3777        scrollChangeHeaderLogoImage('before');
3778    }
3779}
3780
3781function onScrollAfter() {
3782    if (!isScrolling) {
3783        isScrolling = true;
3784        scrollChangeHeaderLogoImage('after');
3785    }
3786}
3787
3788function scrollChangeHeaderLogoImage(e) {
3789    const logo = $('.header .logoBox .logo-img-core.scroll-change');
3790    if (logo && logo.length > 0) {
3791        const before = logo.attr('data-before');
3792        const after = logo.attr('data-after');
3793        const src = (e === 'before') ? before : after;
3794
3795        if (before && after && src && (logo.attr('src') !== src)) {
3796            logo.attr('src', src);
3797        }
3798    }
3799}
3800
3801function qv_on_scroll(t) {
3802    if(window.pageYOffset<=50){
3803height_sync(".header .header1",50);
3804$("body").addClass("scrollBefore"); $("body").removeClass("scrollAfter");if (typeof onScrollBefore === 'function') { onScrollBefore(); }}
3805if(window.pageYOffset>50){
3806height_sync(".header .header1",50);
3807$("body").removeClass("scrollBefore"); $("body").addClass("scrollAfter");if (typeof onScrollAfter === 'function') { onScrollAfter(); }}
3808}
3809
3810function qv_on_scroll_ie(t) {
3811    if($('body').scrollTop()<=50){
3812height_sync(".header .header1",50);
3813$("body").addClass("scrollBefore"); $("body").removeClass("scrollAfter");}
3814if($('body').scrollTop()>50){
3815height_sync(".header .header1",50);
3816$("body").removeClass("scrollBefore"); $("body").addClass("scrollAfter");}
3817}
3818
3819function height_sync(e,hei){ //fixed_scroll_js에서 사용
3820    // 2018.10.12 재헌
3821    // IE 에서 속도 이슈가 발생해 아래와 같이 조건 추가
3822    // hei 값이 변해야 style 수정하도록 함
3823    // if($(e).length>0) {
3824    if($(e).length>0 && $(e).height() != hei) {
3825        $(e).height(hei);  //hide의 경우에도 애니메이팅 효과를 위해, height를 0으로 설정
3826        $.each($(e).find(".hsync"), function() {
3827            if ($(this).parents('.header-side-nav').length > 0) { return; } // header-side-nav 하위 ul은 높이 수정하지 않아야 함
3828            $(this).height(hei);
3829            $(this).css("line-height", hei + "px");
3830        });
3831        $(e).find(".hsync-nlh").height(hei);
3832        $(e).find(".header-contents").height(hei);
3833        $(e).find(".img-view").height(hei);
3834        $(e).find(".img-core").css('max-height',hei+"px");
3835        $(e).find(".img-op").css('max-height',hei+"px");
3836        $(e).find(".logoBox .logo-img-core").css('max-height',hei+"px");
3837
3838        if(hei<1){
3839            $(e).find(".header-contents").hide();
3840        }else{
3841            $(e).find(".header-contents").show();
3842        }
3843    }
3844}
3845
3846function get_hd_obj(){
3847    var obj_hd= {};
3848    $(".header [class^=header]").each(function(){
3849        var header_class=$(this).attr('class');
3850        var cm;
3851        if(_cm=header_class.match(/(header)(\d+)(\s+)?$/)) {
3852            var hdn=parseInt(_cm[2]);
3853            obj_hd[hdn]=$(this).data('hei')+","+$(this).data('scr-hei');
3854        }
3855    });
3856    return obj_hd;
3857}
3858
3859function showPopup(popup_id) {
3860    qvjax_direct(
3861        "get_popup_only_json",
3862        "/module/site/site.php",
3863        'stid=' + QV_BASE_OBJ.stid,
3864        function (data) {
3865            if (data.length > 0) {
3866                var popup_obj = $.grep(data, function(e) { return e.key == popup_id  });
3867                if (popup_obj.length > 0) {
3868                    $('.dynamic-popup-container').remove();
3869                    $('#main_container').append('<div class="dynamic-popup-container"></div>');
3870
3871                    var popup = $(popup_obj[0].contents).clone();
3872                    popup.attr('id', popup_id);
3873
3874                    $(popup).removeClass('body');
3875                    $(popup).removeClass('popup-editor');
3876                    $(popup).addClass('popup');
3877                    $('#main_container .dynamic-popup-container').append($(popup));
3878                }
3879
3880                $('.popup-frame-header-close').click(function() {
3881                    var popup = $(this).parents('.popup');
3882                    popup.remove();
3883
3884                    if ($('.dynamic-popup-container').children().length <= 0) {
3885                        $('.dynamic-popup-container').remove();
3886                    }
3887                });
3888
3889                $('.popup-frame-footer-todayclose').click(function() {
3890                    var popup = $(this).parents('.popup');
3891                    popup.remove();
3892
3893                    if ($('.dynamic-popup-container').children().length <= 0) {
3894                        $('.dynamic-popup-container').remove();
3895                    }
3896
3897                    setCookie(popup.attr('id'), 1, 1);
3898                });
3899
3900                $.each($('#main_container .dynamic-popup-container .video-iframe, #main_container .popup-container .video-iframe'), function() {
3901                    var url = $(this).attr('data-src');
3902                    $(this).attr('src', url);
3903                });
3904
3905
3906
3907                if ($(popup).find('.formBox').length > 0) {
3908                    form_initialize();
3909                }
3910                if ($(popup).find('.mapBox').length > 0) {
3911                    initMapBox($(popup).find('.mapBox'));
3912                }
3913                if ($(popup).find('.gridBox').length > 0) {
3914                    initGrid($(popup).find('.gridBox'));
3915                }
3916                if ($(popup).find('.ddayBox').length > 0) {
3917                    initDday($(popup).find('.ddayBox'))
3918
3919                    let isCountdown = false
3920                    $(popup).find('.dday-area-countdown').each(function () {
3921                        if ($(this).css('display') === 'block') {
3922                            isCountdown = true
3923                            return false
3924                        }
3925                    })
3926                    if (isCountdown) initCountDown()
3927                }
3928                if ($(popup).find('.calendarBox').length > 0) {
3929                    initCalendar($(popup).find('.calendarBox'));
3930                }
3931                if ($(popup).find('.frm[href], .box[href]')) {
3932                    initFrameLink($(popup).find('.frm[href], .box[href]'));
3933                }
3934                if ($(popup).find('.slider-frm').length > 0) {
3935                    initSlider($(popup).find('.slider-frm'));
3936                }
3937            }
3938        },
3939        function (xhr) {}
3940    );
3941}
3942
3943function initPopup() {
3944    // 페이지에서만 띄움.header1
3945    // if (location.pathname.length > 1) { return; }
3946    // 게시판 읽기/쓰기 때는 안띄움
3947    if (location.pathname.indexOf('/module/board/') > -1) return;
3948    qvjax_direct(
3949        "get_menu_json",
3950        "/module/site/site.php",
3951        'stid=' + QV_BASE_OBJ.stid,
3952        function (data) {
3953            if (data.length > 0) {
3954                var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
3955
3956                var popup_grep = $.grep(data, function(e) { return e.key == QV_BASE_OBJ.spid  });
3957                if (popup_grep.length == 0) return;
3958
3959                var popup_list = popup_grep[0].popup;
3960                var popup_array = popup_list.split(',');
3961                $('#main_container').append('<div class="popup-container"></div>');
3962                $.each(popup_array, function() {
3963                    var popup_spid = this;
3964                    var popup_obj = $.grep(data, function(e) { return e.key == popup_spid && e.type == "popup"; });
3965                    if (popup_obj.length > 0) {
3966                        var popup = $(popup_obj[0].contents).clone();
3967                        popup.attr('id', popup_spid);
3968
3969                        if (getCookie(popup.attr('id')) == 1) {
3970                            return true;
3971                        }
3972
3973                        var start = popup.data('start');
3974                        var end = popup.data('end');
3975                        if (start > 0 && end > 0) {
3976                            if (start > $.now()) return;
3977                            if (end < $.now()) return;
3978                        }
3979
3980                        $(popup).removeClass('body');
3981                        $(popup).removeClass('popup-editor');
3982                        $(popup).addClass('popup');
3983
3984                        if (isMobile &&  $(popup).hasClass('popup-display-pc')
3985                        || !isMobile &&  $(popup).hasClass('popup-display-mobile')) return;
3986
3987                        // popup 다국어처리
3988                        if (LANG && LANG != 'ko') {
3989                            var close = $(popup).find('.popup-frame-header-close');
3990                            if (close.text().indexOf('닫기') > -1) {
3991                                close.html(lang.close + ' <i class="material-icons" style="font-size: 13px;">clear</i>');
3992                            }
3993
3994                            var todayclose = $(popup).find('.popup-frame-footer-todayclose');
3995                            todayclose.text(lang.today_close);
3996                        }
3997
3998                        $('#main_container .popup-container').append($(popup));
3999
4000                        if ($(popup).find('.mapBox').length > 0) {
4001                            initMapBox($(popup).find('.mapBox'));
4002                        }
4003
4004                        if ($(popup).find('.ddayBox').length > 0) {
4005                            initDday($(popup).find('.ddayBox'))
4006
4007                            let isCountdown = false
4008                            $(popup).find('.dday-area-countdown').each(function () {
4009                                if ($(this).css('display') === 'block') {
4010                                    isCountdown = true
4011                                    return false
4012                                }
4013                            })
4014                            if (isCountdown) initCountDown()
4015                        }
4016
4017                        if ($(popup).find('.calendarBox').length > 0) {
4018                            initCalendar($(popup).find('.calendarBox'));
4019                        }
4020
4021                        if ($(popup).find('.frm[href], .box[href]')) {
4022                            initFrameLink($(popup).find('.frm[href], .box[href]'));
4023                        }
4024                        if ($(popup).find('.slider-frm').length > 0) {
4025                            initSlider($(popup).find('.slider-frm'));
4026                        }
4027                    }
4028                });
4029
4030                $.each($('#main_container .dynamic-popup-container .video-iframe, #main_container .popup-container .video-iframe'), function() {
4031                    var url = $(this).attr('data-src');
4032                    $(this).attr('src', url);
4033                });
4034
4035                if(isMobile) { }
4036                else {
4037                    // 드래그는 pc에서만 되도록 함
4038                    $('.popup').draggable({
4039                        handle: ".popup-frame-header, .popup-frame-footer",
4040                        start: function( event, ui ) {
4041                            // 새로 리뉴얼된(margin x) 팝업에만 적용
4042                            if (parseInt(ui.helper.css('margin-left')) == 0) {
4043                                // 드래그할 때 bottom이 0이면 비정상적으로 동작하여 auto로 지정
4044                                ui.helper.css({right: 'auto', bottom: 'auto'});
4045                            }
4046                        }
4047                    });
4048                }
4049
4050                $('.popup-frame-header-close').click(function() {
4051                    var popup = $(this).parents('.popup');
4052                    popup.remove();
4053
4054                    if ($('.popup-container').children().length <= 0) {
4055                        $('.popup-container').remove();
4056                    }
4057                });
4058
4059                $('.popup-frame-footer-todayclose').click(function() {
4060                    var popup = $(this).parents('.popup');
4061                    popup.remove();
4062
4063                    if ($('.popup-container').children().length <= 0) {
4064                        $('.popup-container').remove();
4065                    }
4066
4067                    setCookie(popup.attr('id'), 1, 1);
4068                });
4069            }
4070
4071            if ($('.popup-container').children().length <= 0) {
4072                $('.popup-container').remove();
4073            }
4074
4075        },
4076        function (xhr) { }
4077    );
4078}
4079
4080function initHeader9(){
4081    if (getCookie("header9_closed") == 1) {
4082        $(".header .header9").hide(); //hide banner
4083        $("body.live").addClass("header9_closed");
4084    }
4085
4086    var $top_frm=$("#main_container .body > .frm:not(.mobile_ele)").first();
4087    if($top_frm.hasClass("headerSectionMerge")){
4088        $("body").addClass("headerSectionMerge");
4089        $("body").addClass("scrollBefore");
4090    }
4091
4092    if($("body .header").hasClass("useFixed") && !$top_frm.hasClass("headerSectionMerge")){
4093        var body_mg_t=$(".body").css("margin-top")?$(".body").css("margin-top").replace("px",""):0;
4094        if(body_mg_t>0){
4095            var top_frm_mg_t=$top_frm.css("margin-top")?$top_frm.css("margin-top").replace("px",""):0;
4096            if(top_frm_mg_t>0){
4097                var cal_top_frm_mg_t=parseInt(body_mg_t)+parseInt(top_frm_mg_t);
4098                $top_frm.css("margin-top",cal_top_frm_mg_t+"px");
4099                // console.log("top_frm mg-t:"+cal_top_frm_mg_t);
4100            }
4101        }
4102    }
4103}
4104
4105function realignHeader9(){
4106
4107    var $top_frm=$("#main_container .body > .frm:not(.mobile_ele)").first();
4108
4109    if($("body .header").hasClass("useFixed") && !$top_frm.hasClass("headerSectionMerge")){
4110        var body_mg_t=$(".body").css("margin-top")?$(".body").css("margin-top").replace("px",""):0;
4111        if(body_mg_t>0){
4112            $top_frm.css("margin-top",$("body .header").height()+"px");
4113        }
4114    }
4115}
4116
4117function initMenu(){
4118    var query = qv_func.getUrlParams();
4119    if (location.pathname.indexOf('/module/board/read_form') > -1 && query.pn) {
4120        $(".header ul.mn-ul .mn-link, .header-mobile ul.mn-ul .mn-link").each(function(i,t){
4121            if($(t).attr('href')=="/" + query.pn){
4122                $(t).parent().addClass("cur-mn-item");
4123            }
4124        });
4125    } else {
4126        $(".header ul.mn-ul .mn-link, .header-mobile ul.mn-ul .mn-link").each(function(i,t){
4127            if($(t).attr('href')=="/compnay"){
4128                $(t).parent().addClass("cur-mn-item");
4129            }
4130        });
4131    }
4132
4133    //$(".header ul.mn-ul .mn-link, .header-mobile ul.mn-ul .mn-link").each(function(i,t){
4134    //    if($(t).attr('href')=="///"){
4135    //        $(t).parent().addClass("cur-mn-item");
4136    //    }
4137    //});
4138}
4139
4140// 쿠키 생성
4141function setCookie(cName, cValue, cDay){
4142    var expire = new Date();
4143    expire.setDate(expire.getDate() + cDay);
4144    cookies = cName + '=' + escape(cValue) + '; path=/ '; // 한글 깨짐을 막기위해 escape(cValue)를 합니다.
4145    if(typeof cDay != 'undefined') cookies += ';expires=' + expire.toGMTString() + ';';
4146    document.cookie = cookies;
4147}
4148
4149// 쿠키 가져오기
4150function getCookie(cName) {
4151    cName = cName + '=';
4152    var cookieData = document.cookie;
4153    var start = cookieData.indexOf(cName);
4154    var cValue = '';
4155    if(start != -1){
4156        start += cName.length;
4157        var end = cookieData.indexOf(';', start);
4158        if(end == -1)end = cookieData.length;
4159        cValue = cookieData.substring(start, end);
4160    }
4161    return unescape(cValue);
4162}
4163
4164$('.body').delegate('.fixed-contents-close', 'click', function(e) {
4165    $(this).parents('.fixed-contents-layer').first().remove();
4166});
4167
4168//10.8 MAP 임시 패치
4169
4170</script>
vendor: 2 bytes, line 4170
4170
4171<script type='text/javascript' src="/js/animate.js?v=260904"></script>
vendor: 2 bytes, line 4171
4171
4172<script type="text/javascript" src="/module/member/member.js?v=260904"></script>
4172
4173
4174<script type="text/javascript" src="/module/board/board_read_form.js?v=260904"></script>
vendor: 2 bytes, line 4174
4174
4175<script type="text/javascript" src="/module/map/map.js?v=260904"></script>
4175
4176
4177    
4177<script type='text/javascript' src="/module/form/form.js?v=260904"></script>
4177
4178    
4178<script type="text/javascript" src="/module/board/board_write_form.js?v=260904"></script>
4178
4179    
4179<script type="text/javascript" src="/module/board/board.js?v=260904"></script>
4179
4180
4181<div id="youtube-autoplay" style="display:none;" onclick="playVideo()"></div>
4182
4183<!-- 게시판 패스워드 확인 모달 -->
4184<div class="modal in-editor-modal fade" id="ReadPasswordCheckModal" tabindex="-1" role="dialog">
4185    <div class="modal-dialog modal-bx">
4186        <div class="modal-content">
4187            <div class="modal-body">
4188                <div class="modal-body-title">
4189                    비밀번호 확인                </div>
4190                <div class="modal-body-contents">
4191                    <input type="password" id="ReadPasswordCheck" placeholder="" autocomplete="off"><button type="button" class="btn btn-default" id="ReadPasswordCheckModalBtnSave" auto>확인</button>
4192                </div>
4193            </div>
4194        </div>
4195    </div>
4196</div>
4197
4198<!-- 개인정보처리방침 모달 -->
4199<div class="modal in-editor-modal fade" id="PolicyPrivacyModal" tabindex="-1" role="dialog">
4200    <div class="modal-dialog modal-bx">
4201        <div class="modal-content">
4202            <div class="modal-body">
4203                <div type="button" class="close" data-dismiss="modal"></div>
4204                <div class="modal-body-title">
4205                    개인정보처리방침(Privacy Policy)                </div>
4206                <div class="modal-body-contents">
4207                    <textarea id="policy-privacy-textarea" readonly></textarea>
4208                </div>
4209            </div>
4210        </div>
4211    </div>
4212</div>
4213
4214<!-- 갤러리 이미지 모달 -->
4215<div id="gallery_board_image_modal" class="gallery-board-image-modal">
4216    <img class="gallery-board-modal-content" id="gallery-board-img01">
4217    <div class="gallery-board-modal-overlay"></div>
4218    <span id="gallery_board_cancel" class="close">&times;</span>
4219    <div class="gallery-board-magnifier">
4220        <div class="gallery-board-magnifier-add">
4221            <i class="icon-magnifier-add"></i>
4222        </div>
4223        <div class="gallery-board-magnifier-remove">
4224            <i class="icon-magnifier-remove"></i>
4225        </div>
4226        <div class="gallery-board-magnifier-original-size">
4227            <i class="fa fa-clone"></i>
4228            <div>원본크기</div>
4229        </div>
4230    </div>
4231    <div class="gallery-board-modal-right">
4232        <i class="fa fa-chevron-right"></i>
4233    </div>
4234    <div class="gallery-board-modal-left">
4235        <i class="fa fa-chevron-left"></i>
4236    </div>
4237    <div class="gallery-board-modal-download"><i class="icon-paper-clip" aria-hidden="true"></i></div>
4238</div>
4239
4240<div class="modal in-editor-modal fade" id="CalendarScheduleViewModal" tabindex="-1" role="dialog">
4241    <div class="modal-dialog modal-bx">
4242        <div class="modal-content">
4243            <div class="modal-body">
4244                <div type="button" class="close" data-dismiss="modal"><span>×</span></div>
4245                <div class="modal-body-title">
4246                    <i class="icon-calendar" aria-hidden="true"></i>
4247                    <span>TEST TITLE</span>
4248                </div>
4249                <div class="modal-body-contents">
4250                    <div>
4251                        <div class="calendar-schedule-view-category">
4252                            <div class="calendar-schedule-view-category-color"></div>
4253                            <div class="calendar-schedule-view-category-name"></div>
4254                        </div>
4255                        <div class="calendar-schedule-view-start-datetime">2019.01.10 14:00</div>
4256                        <div class="calendar-schedule-view-end-datetime">2019.01.30 15:00</div>
4257                    </div>
4258                    <div>
4259                        <div class="calendar-schedule-view-content">
4260                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
4261                        </div>
4262                    </div>
4263                </div>
4264                <div class="modal-body-option">
4265                    <div class="modal-body-option-update">수정하기</div>
4266                    <div class="modal-body-option-delete">삭제하기</div>
4267                </div>
4268            </div>
4269        </div>
4270    </div>
4271</div>
4272
4273<!-- 캘린더 모달 -->
4274<div class="modal in-editor-modal fade" id="CalendarScheduleModal" tabindex="-1" role="dialog">
4275    <div class="modal-dialog modal-bx">
4276        <div class="modal-content">
4277            <div class="modal-body">
4278                <div id="hdCalendarBxData"></div>
4279                <div type="button" class="close" data-dismiss="modal"><span>×</span></div>
4280                <div class="modal-body-title">
4281                    <i class="icon-calendar" aria-hidden="true"></i>
4282                    일정 추가하기                </div>
4283                <div class="modal-body-contents">
4284                    <table class="calendar-schedule-datetime">
4285                        <thead>
4286                            <tr>
4287                                <th>시작일</th>
4288                                <th>종료일</th>
4289                            </tr>
4290                        </thead>
4291                        <tbody>
4292                            <tr>
4293                                <td>
4294                                    <input type="text" class="calendar-schedule-start-date calendar-datepicker" name="calendar-schedule-start-date">
4295                                    <input type="text" class="calendar-schedule-start-time calendar-timepicker" name="calendar-schedule-start-time">
4296                                </td>
4297                                <td>
4298                                    <input type="text" class="calendar-schedule-end-date calendar-datepicker" name="calendar-schedule-end-date">
4299                                    <input type="text" class="calendar-schedule-end-time calendar-timepicker" name="calendar-schedule-end-time">
4300                                </td>
4301                            </tr>
4302                        </tbody>
4303                    </table>
4304                    <div class="calendar-schedule-datetime-everytime-check">
4305                        <label class="checkbox-inline">
4306                            <input type="checkbox" class="calendar-schedule-datetime-everytime" name="" id="calendar-schedule-datetime-everytime" value="1" checked>종일                        </label>
4307                    </div>
4308
4309                    <div>
4310                        <input type="text" class="calendar-schedule-subject" placeholder="제목">
4311                    </div>
4312                    <div>
4313                        <textarea class="calendar-schedule-content" placeholder="내용"></textarea>
4314                    </div>
4315                </div>
4316                <div class="calendar-schedule-confirm">일정 추가하기</div>
4317            </div>
4318        </div>
4319        <div class="calendar-schedule-category"></div>
4320        <div class="calendar-schedule-category-list">
4321            <ul>
4322            </ul>
4323        </div>
4324    </div>
4325</div>
4326
4327
4328<script type="text/javascript">
4329    $("#gallery_board_cancel").click(function () {
4330        $('#gallery_board_image_modal').hide();
4331        $('body').removeClass('modal-open');
4332    });
4333
4334    var viewGalleryBoardImage;
4335    function viewGalleryBoardImageFullSize(obj) {
4336        var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
4337
4338        if ($(obj).find('div.gallery-board-image').length > 0) {
4339            var link = $(obj).parent().data('link');
4340            var target = $(obj).parent().data('target');
4341        }
4342        else {
4343            var link = $(obj).data('link');
4344            var target = $(obj).data('target');
4345        }
4346
4347        if (link == undefined || link == '') { // gallery-board-box data에 link값이 없으면 full size modal을 띄움
4348            $('body').addClass('modal-open');
4349            $('#gallery-board-img01').fadeOut(0, 'linear');
4350
4351            var modal = document.getElementById('gallery_board_image_modal');
4352            var modalImg = document.getElementById("gallery-board-img01");
4353
4354            $('.gallery-board-modal-right').show();
4355            $('.gallery-board-modal-left').show();
4356
4357            if ($(obj).find('.gallery-board-image')[0].tagName == 'IMG') {
4358                var bg = $(obj).find('.gallery-board-image')[0].src;
4359            }
4360            else {
4361                var bg = $(obj).find('.gallery-board-image').css('background-image');
4362                bg = bg.replace('url(', '').replace(')', '').replace(/\"/gi, "");
4363            }
4364            bg = bg.replace(/_800/g, '_1920');
4365            modalImg.src = bg;
4366            modalImg.onload = function() {
4367                $('#gallery-board-img01').fadeIn(120, 'linear');
4368                initGalleryBoardImageModal(modalImg);
4369            };
4370
4371            viewGalleryBoardImage = [];
4372            $(obj).parents('.gallery-board').first().find('.gallery-board-image').each(function (i, val) {
4373                if ($(val)[0].tagName == 'IMG') {
4374                    var bg = $(val)[0].src
4375                }
4376                else {
4377                    var bg = $(val).css('background-image');
4378                    bg = bg.replace('url(', '').replace(')', '').replace(/\"/gi, "");
4379                }
4380                bg = bg.replace(/_800/g, '_1920');
4381                viewGalleryBoardImage.push({'index':i, 'bg':bg});
4382
4383                if ($(val).is($(obj).find('.gallery-board-image'))) {
4384                    $('#gallery_board_image_modal').data('index', i);
4385                }
4386            });
4387
4388            var allowDownload = $(obj).parents('.galleryBox').first().attr('data-allow-download');
4389            var downloadClip = $('#gallery_board_image_modal .gallery-board-modal-download');
4390            if (allowDownload == 'false') {
4391                downloadClip.hide();
4392            }
4393            else {
4394                downloadClip[0].style.removeProperty('display');
4395            }
4396
4397            modal.style.display = "flex";
4398            $(modalImg).removeClass(function (index, className) {
4399                return (className.match (/(^|\s)size-x-\S+/g) || []).join(' ');
4400            });
4401        }
4402        else if (link == 'none') { // none이면 아무 행동도 하지않음
4403            return;
4404        }
4405        else { // gallery-board-box data에 link값이 존재하면 해당 link로 이동
4406            if (!isMobile && (link.indexOf('tel:') > -1 || link.indexOf('sms:') > -1)) {
4407                return; // tel, sms 링크는 모바일에서만
4408            }
4409            //if (link.indexOf('link:') > -1 || link.indexOf('sms:') > -1) { return; }
4410
4411            if (target == 'blank') {
4412                window.open(link);
4413            }
4414            else {
4415                if ($(obj).hasClass('scrollToTop') || $(obj).hasClass('scrollToBottom')) { }
4416                else {
4417                    location.href = link;
4418                }
4419            }
4420
4421            return false;
4422        }
4423    }
4424
4425
4426    function viewImageFullSize(obj) {
4427        $('body').addClass('modal-open');
4428        $('#gallery-board-img01').fadeOut(0, 'linear');
4429
4430        var modal = document.getElementById('gallery_board_image_modal');
4431        var modalImg = document.getElementById("gallery-board-img01");
4432
4433        $('.gallery-board-modal-right').hide();
4434        $('.gallery-board-modal-left').hide();
4435
4436        var bg = $(obj).find('.img-core').css('background-image');
4437        bg = bg.replace('url(', '').replace(')', '').replace(/\"/gi, "");
4438
4439        bg = bg.replace(/_800/g, '_1920');
4440        modalImg.src = bg;
4441        modalImg.onload = function() {
4442            $('#gallery-board-img01').fadeIn(120, 'linear');
4443        };
4444
4445        modal.style.display = "flex";
4446    }
4447
4448    function initGalleryBoardImageModal(img) {
4449        if ($('.gallery-board-modal-content').hasClass('size-original')) {
4450            $(img).css('top', 0);
4451            $(img).css('bottom', 'auto');
4452            $(img).css('left', 'auto');
4453
4454        }
4455
4456        if ((isMobile() && window.innerWidth / img.naturalWidth * img.naturalHeight > window.innerHeight) || // 모바일에서는 비율로 확인한다
4457            (!isMobile() && img.naturalHeight > window.innerHeight)) {
4458            $('.gallery-board-magnifier-original-size').show();
4459        }
4460        else {
4461            $('.gallery-board-magnifier-original-size').hide();
4462            $('.gallery-board-modal-content').removeClass('size-original');
4463            $(img).css('left', 'auto');
4464        }
4465    }
4466
4467    $('#gallery_board_image_modal').delegate(".gallery-board-modal-right", "click", function (e) {
4468        if (viewGalleryBoardImage != undefined) {
4469            $('#gallery-board-img01').fadeOut(150, 'linear', function() {
4470                var index = parseInt($('#gallery_board_image_modal').data('index')) + 1;
4471
4472                var modalImg = document.getElementById("gallery-board-img01");
4473                if (index == viewGalleryBoardImage.length) {
4474                    var val = $.grep(viewGalleryBoardImage, function(e) { return e.index == 0 })[0];
4475                    modalImg.src = val.bg;
4476                    modalImg.onload = function() {
4477                        $('#gallery-board-img01').fadeIn(120, 'linear');
4478                        initGalleryBoardImageModal(modalImg);
4479                    };
4480
4481                    $('#gallery_board_image_modal').data('index', 0);
4482                }
4483                else {
4484                    var val = $.grep(viewGalleryBoardImage, function(e) { return e.index == index })[0];
4485                    modalImg.src = val.bg;
4486                    modalImg.onload = function() {
4487                        $('#gallery-board-img01').fadeIn(120, 'linear');
4488                        initGalleryBoardImageModal(modalImg);
4489                    };
4490
4491                    $('#gallery_board_image_modal').data('index', index);
4492                }
4493            });
4494        }
4495    });
4496    $('#gallery_board_image_modal').delegate(".gallery-board-modal-left", "click", function (e) {
4497        if (viewGalleryBoardImage != undefined) {
4498            $('#gallery-board-img01').fadeOut(150, 'linear', function() {
4499                var index = parseInt($('#gallery_board_image_modal').data('index')) - 1;
4500
4501                var modalImg = document.getElementById("gallery-board-img01");
4502                if (index == -1) {
4503                    var val = $.grep(viewGalleryBoardImage, function (e) { return e.index == viewGalleryBoardImage.length - 1 })[0];
4504                    modalImg.src = val.bg;
4505                    modalImg.onload = function() {
4506                        $('#gallery-board-img01').fadeIn(120, 'linear');
4507                        initGalleryBoardImageModal(modalImg);
4508                    };
4509
4510                    $('#gallery_board_image_modal').data('index', viewGalleryBoardImage.length - 1);
4511                }
4512                else {
4513                    var val = $.grep(viewGalleryBoardImage, function (e) { return e.index == index})[0];
4514                    modalImg.src = val.bg;
4515                    modalImg.onload = function() {
4516                        $('#gallery-board-img01').fadeIn(120, 'linear');
4517                        initGalleryBoardImageModal(modalImg);
4518                    };
4519
4520                    $('#gallery_board_image_modal').data('index', index);
4521                }
4522            });
4523        }
4524    });
4525    $('#gallery_board_image_modal').delegate('.gallery-board-modal-overlay', 'dblclick', function() {
4526        var image = $(this).siblings('.gallery-board-modal-content');
4527        if (image.attr('class').indexOf('size-x-') > 0) {
4528            image.removeClass(function (index, className) {
4529                return (className.match (/(^|\s)size-x-\S+/g) || []).join(' ');
4530            });
4531        }
4532        else {
4533            image.addClass('size-x-2');
4534            image.css('right', 'auto');
4535            image.css('bottom', 'auto');
4536            image.data('size', 2);
4537        }
4538    });
4539    $('#gallery_board_image_modal').delegate('.gallery-board-modal-right, .gallery-board-modal-left', 'click', function () {
4540        var image = $(this).siblings('.gallery-board-modal-content');
4541        if (image.attr('class').indexOf('size-x-') > 0) {
4542            image.removeClass(function (index, className) {
4543                return (className.match (/(^|\s)size-x-\S+/g) || []).join(' ');
4544            });
4545        }
4546    });
4547
4548    $('#gallery_board_image_modal').delegate('.gallery-board-magnifier-add, .gallery-board-magnifier-remove', 'click touch', function() {
4549        var image = $('#gallery_board_image_modal').find('.gallery-board-modal-content');
4550        var prefix = 'size-x-';
4551        if (image.attr('class').indexOf('size-x-') > 0) {
4552            if ($(this).hasClass('gallery-board-magnifier-add')) {
4553                var size = parseInt(image.data('size')) + 1;
4554                if (size > 5) return;
4555                if (size == 2) {
4556                    image.css('top', 0);
4557                    image.css('right', 'auto');
4558                    image.css('bottom', 'auto');
4559                }
4560            }
4561            else if ($(this).hasClass('gallery-board-magnifier-remove')) {
4562                var size = parseInt(image.data('size')) - 1;
4563                if (size < 1) return;
4564                if (size == 1) {
4565                    image.css('top', 0);
4566                    image.css('right', 'auto');
4567                    image.css('bottom', 'auto');
4568                }
4569            }
4570            else { return; }
4571
4572            image.data('size', size);
4573            image.removeClass(function (index, className) {
4574                return (className.match (/(^|\s)size-x-\S+/g) || []).join(' ');
4575            });
4576            image.addClass(prefix + size);
4577        }
4578        else {
4579            if ($(this).hasClass('gallery-board-magnifier-remove')) { return; }
4580            image.addClass('size-x-2');
4581            image.css('top', 0);
4582            image.css('right', 'auto');
4583            image.css('bottom', 'auto');
4584            image.data('size', 2);
4585        }
4586    });
4587
4588    $('#gallery_board_image_modal').delegate('.gallery-board-magnifier-original-size', 'click touch', function() {
4589        var image = $('#gallery_board_image_modal').find('.gallery-board-modal-content');
4590        image.removeClass(function (index, className) {
4591            return (className.match (/(^|\s)size-x-\S+/g) || []).join(' ');
4592        });
4593
4594        if (image.hasClass('size-original')) {
4595            image.css('left', 'auto');
4596            image.removeClass('size-original');
4597        }
4598        else {
4599            image.css('top', 0);
4600            image.css('bottom', 'auto');
4601            image.css('left', 'calc(50% - ' + (document.getElementById('gallery-board-img01').naturalWidth / 2) +  'px)');
4602            image.addClass('size-original');
4603        }
4604    });
4605
4606    /* 2020.03.03 재헌
4607     * 갤러리 이미지 모달에서 이미지 다운로드가 가능하도록 버튼 추가
4608     */
4609    $('#gallery_board_image_modal').delegate('.gallery-board-modal-download', 'click touch', function() {
4610        var url = $('#gallery-board-img01').attr('src');
4611        var name = url.split('/').pop();
4612
4613        if (!url || !name) return;
4614        if (navigator.userAgent.toLowerCase().indexOf('safari') > -1 &&
4615            navigator.userAgent.toLowerCase().indexOf('chrome') == -1) {
4616            var a = $("<a>").attr("href", url).attr("download", name).appendTo("body");
4617            a[0].click();
4618            a.remove();
4619        }
4620        else {
4621            post_redirect('/module/board/download.php', {'url': url, 'name': name}, '_top');
4622        }
4623    });
4624
4625    $(function() {
4626        var curDown = false,
4627            curYPos = 0,
4628            curXPos = 0,
4629            curTop = 0,
4630            curBottom = 0,
4631            curRight = 0;
4632        $('.gallery-board-modal-overlay').on('mousemove touchmove', function(e){
4633            e.preventDefault();
4634            if(curDown === true){
4635                var moveYPos = e.originalEvent.touches ?  e.originalEvent.touches[0].pageY : e.pageY;
4636                var moveXPos= e.originalEvent.touches ?  e.originalEvent.touches[0].pageX : e.pageX;
4637                // bottom 기준
4638                // $('#gallery-board-img01').css('top', 'auto');
4639                // $('#gallery-board-img01').css('bottom',(curBottom + ((curYPos - moveYPos))));
4640
4641                // top 기준
4642                $('#gallery-board-img01').css('top', (curTop + (moveYPos - curYPos)));
4643                $('#gallery-board-img01').css('bottom', 'auto');
4644
4645                // $('#gallery-board-img01').css('right',(curRight + ((curXPos - moveXPos))));
4646            }
4647        });
4648
4649        $('.gallery-board-modal-overlay').on('mousedown touchstart', function(e){
4650            e.preventDefault();
4651            curDown = true;
4652            curYPos = e.originalEvent.touches ?  e.originalEvent.touches[0].pageY : e.pageY;
4653            curXPos = e.originalEvent.touches ?  e.originalEvent.touches[0].pageX : e.pageX;
4654            curTop = parseInt($('#gallery-board-img01').css('top'));
4655            curBottom = parseInt($('#gallery-board-img01').css('bottom'));
4656            curRight = parseInt($('#gallery-board-img01').css('right'));
4657        });
4658
4659        $('.gallery-board-modal-overlay').on('mouseup touchend', function(){
4660            curDown = false;
4661        });
4662
4663        $('.gallery-board-modal-overlay').on('mousewheel', function(e) {
4664            e.preventDefault();
4665            if ($('#gallery_board_image_modal').css('display') != 'none') {
4666                // bottom 기준
4667                // if ($('#gallery-board-img01').css('bottom') == 'auto') {
4668                //     curBottom = (document.getElementById('gallery-board-img01').naturalHeight - window.innerHeight) * -1;
4669                // }
4670                // else {
4671                //     curBottom = parseInt($('#gallery-board-img01').css('bottom'));
4672                // }
4673                //
4674                // var moveYPos = (curBottom + (e.originalEvent.wheelDelta * -1));
4675                // var realHeight =  $("#gallery-board-img01")[0].getBoundingClientRect().height; // scale 조정 후의 높이값을 가져옴
4676                // var topLimit = parseInt(realHeight * -1) + parseInt(window.innerHeight);
4677                // if (moveYPos > 0) { moveYPos = 0; }
4678                // if (moveYPos < topLimit) { moveYPos = topLimit }
4679                //
4680                // $('#gallery-board-img01').css('top', 'auto');
4681                // $('#gallery-board-img01').css('bottom', moveYPos + 'px');
4682
4683                // top 기준
4684                var currentTop = $('#gallery-board-img01').css('top');
4685                currentTop = currentTop == 'auto' ? 0 : parseInt(currentTop);
4686
4687                var moveYPos = currentTop + e.originalEvent.wheelDelta;
4688                var realHeight =  $("#gallery-board-img01")[0].getBoundingClientRect().height; // scale 조정 후의 높이값을 가져옴
4689                var topLimit = parseInt(realHeight * -1) + parseInt(window.innerHeight);
4690                if (moveYPos > 0) { moveYPos = 0; }
4691                if (moveYPos < topLimit) { moveYPos = topLimit; }
4692
4693                $('#gallery-board-img01').css('top', moveYPos + 'px');
4694                $('#gallery-board-img01').css('bottom', 'auto');
4695            }
4696        });
4697    });
4698
4699
4700    function headerSubMenuPop() {
4701        $('#main_container').delegate('.header .mn-item, .header .mn-item-overflow-list', 'mouseenter', function () {
4702            if ($(this).parents('.header-side-nav').length > 0) return;
4703
4704            var main_header = $(this).parents('.header-contents').first().parent();
4705            var main_menu = $(this).parents('ul.mn-ul').first();
4706            /* 2020.02.12 재헌
4707             * 헤더 서브메뉴 가로로 정렬 ( sub-mn-horizontal )
4708             * sub-mn-type-2 일 때 sub-mn 각각의 top을 지정해준다.
4709             */
4710            // if (main_header.hasClass('sub-mn-type-2') && main_header.hasClass('sub-mn-align-horizontal')) {
4711            //     var all_height = 0;
4712            //     $.each(main_header.find('.sub-mn, .header-overflow-pop > ul'), function(i, val) {
4713            //         var target = $(this);
4714            //         var parentMenu = $(this).parent();
4715            //         if (parentMenu.hasClass('mn-item-overflow')) return;
4716            //
4717            //         var is_overflow_list = $(this).parents('.mn-item-overflow-list').length > 0 ? true : false;
4718            //         if (is_overflow_list) {
4719            //             target = $(this).parents('.header-overflow-pop').first();
4720            //             parentMenu = $(this).parents('li.mn-item');
4721            //         }
4722            //
4723            //         parentMenu.addClass('mn-item-hover');
4724            //
4725            //         var top = parentMenu.height() + all_height - $(window).scrollTop();
4726            //         if (!is_InternetExplorer()) {
4727            //             top += parentMenu.offset().top;
4728            //         }
4729            //
4730            //         target.css('top', top);
4731            //         all_height += target.height();
4732            //     });
4733            //
4734            //     var max_height = 0;
4735            //     $.each(main_header.find('ul'), function() {
4736            //         max_height = max_height > $(this).height() ? max_height : $(this).height();
4737            //     });
4738            // }
4739            // else
4740            if (main_header.hasClass('sub-mn-type-2')) {
4741                $.each(main_menu.find('.mn-item'), function() {
4742                    $(this).addClass('mn-item-hover');
4743
4744                    //var top = this.offsetTop + $(this).height() - $(window).scrollTop();
4745
4746                    // 2019.04.29 원본
4747                    //var top = $(this).offset().top + $(this).height() - $(window).scrollTop();
4748                    // 수정본. ie에서 header가 2단이상이면 위치가 정상적으로 잡히지 않는 문제때문에 추가
4749                    var top = $(this).height() - $(window).scrollTop();
4750                    if (!is_InternetExplorer()) { top += $(this).offset().top; }
4751                    else if (is_InternetExplorer() && main_header.hasClass('sub-mn-align-horizontal')) { top += $(this).offset().top; }
4752
4753                    $(this).find('.sub-mn').css('top', top);
4754                    $(this).find('.sub-mn > .mn-item').css('width', $(this).width());
4755                    $(this).find('.header-overflow-pop').css('top', top);
4756                    $(this).find('.header-overflow-pop').width($(this).width());
4757                });
4758
4759                var max_height = 0;
4760                $.each(main_header.find('ul.sub-mn'), function() {
4761                    max_height = max_height > $(this).height() ? max_height : $(this).height();
4762                });
4763
4764                // header overflow pop이 존재하면 해당 항목의 높이와 비교
4765                if ($('.header-overflow-pop').length > 0) {
4766                    var overflow_pop_height = $('.header-overflow-pop').height();
4767                    max_height = max_height > overflow_pop_height ? max_height : overflow_pop_height;
4768                }
4769
4770                if (max_height > 0) {
4771                    var overlay = '<div class="sub-mn-overlay" style="height:' + parseInt(max_height) + 'px;"></div>';
4772                    main_header.find('.sub-mn-overlay').remove();
4773                    main_menu.find('ul.sub-mn, .header-overflow-pop > ul').first().prepend(overlay);
4774                }
4775            }
4776            // else if (main_header.hasClass('sub-mn-type-1')) {
4777            else {
4778                $(this).find('.sub-mn-overlay').remove();
4779                $(this).addClass('mn-item-hover');
4780
4781                // 2019.04.29 원본
4782                //var top = $(this).offset().top + $(this).height() - $(window).scrollTop();
4783                var top = $(this).height() - $(window).scrollTop();
4784                if (!is_InternetExplorer()) { top += $(this).offset().top; }
4785                else if (is_InternetExplorer() && main_header.hasClass('sub-mn-align-horizontal')) { top += $(this).offset().top; }
4786
4787                if ($(this).hasClass('mn-item-overflow-list')) {
4788                    $(this).find('.header-overflow-pop').css('top', top);
4789                    $(this).find('.header-overflow-pop').width('auto');
4790                }
4791                else if ($(this).hasClass('mn-item')) {
4792                    $(this).find('.sub-mn').css('top', top);
4793                }
4794            }
4795        });
4796
4797        //$('#main_container').delegate('.header .mn-item, .header .mn-item-overflow-list', 'mouseleave', function () {
4798        $('#main_container').delegate('.header .mn-item', 'mouseleave', function (e) {
4799            var main_header = $(this).parents('.header-contents').first().parent();
4800            if (main_header.hasClass('sub-mn-type-2')) {
4801                main_header.find('.mn-item').removeClass('mn-item-hover');
4802                main_header.children('.header-op').css('height', 'auto');
4803                main_header.find('.sub-mn-overlay').remove();
4804            }
4805            // else if (main_header.hasClass('sub-mn-type-1')) {
4806            else {
4807                $(this).removeClass('mn-item-hover');
4808                $(this).removeClass('mn-item-overflow-list-hover');
4809            }
4810        });
4811
4812        $(window).on('scroll.headerSubMenuPop', function() {
4813            /* 2020.02.12 재헌
4814             * 헤더 서브메뉴 가로로 정렬 ( sub-mn-horizontal )
4815             * sub-mn-type-2 일 때 sub-mn 각각의 top을 지정해준다.
4816             */
4817            // var main_header = $('.header .mn-item-hover').parents('.header-contents').parent();
4818            // if (main_header.hasClass('sub-mn-type-2') && main_header.hasClass('sub-mn-align-horizontal')) {
4819            //     var all_height = 0;
4820            //     $.each(main_header.find('.sub-mn'), function(i, val) {
4821            //         var parentMenu = $(this).parents('.mn-item').first();
4822            //         parentMenu.addClass('mn-item-hover');
4823            //
4824            //         var top = parentMenu.height() + all_height - $(window).scrollTop();
4825            //         if (!is_InternetExplorer()) { top += parentMenu.offset().top; }
4826            //
4827            //         $(this).css('top', top);
4828            //         all_height += $(this).height();
4829            //     });
4830            // }
4831            // else
4832            if ($('.header .mn-item-hover').length > 0) {
4833                // 원본
4834                //var top = $('.header .mn-item-hover').offset().top + $('.header .mn-item-hover').height() - $(window).scrollTop();
4835                // 수정본. ie에서 header가 2단이상이면 위치가 정상적으로 잡히지 않는 문제때문에 추가
4836                var top = $('.header .mn-item-hover').height() - $(window).scrollTop();
4837                if (!is_InternetExplorer()) { top += $('.header .mn-item-hover').offset().top; }
4838                //
4839                $('.header .mn-item-hover').find('.sub-mn').css('top', top);
4840            }
4841
4842            if ($('.header .mn-item-overflow-list').length > 0) {
4843                // 원본
4844                //var top = $('.header .mn-item-overflow-list').offset().top + $('.header .mn-item-overflow-list').height() - $(window).scrollTop();
4845                var top = $('.header .mn-item-overflow-list').height() - $(window).scrollTop();
4846                if (!is_InternetExplorer()) { top += $('.header .mn-item-overflow-list').offset().top; }
4847                //
4848                $('.header .mn-item-overflow-list').find('.header-overflow-pop').css('top', top);
4849            }
4850        });
4851
4852    }
4853    headerSubMenuPop();
4854
4855    function isMobile() {
4856        return /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
4857    }
4858
4859    // string format
4860    if (!String.prototype.format) {
4861        String.prototype.format = function() {
4862            var args = arguments;
4863            return this.replace(/{(\d+)}/g, function(match, number) {
4864                return typeof args[number] != 'undefined'
4865                    ? args[number]
4866                    : match
4867                    ;
4868            });
4869        };
4870    }
4871
4872    /* 데이터 컨텐츠 페이지 */
4873    </script>
4873
4874
4875<!-- Log -->
4876<script language="javascript" type="text/javascript">
4877    if(typeof qva != "undefined") {
4878        qva.DataSet('account', 'eshux9ze9');
4879        qva.start();
4880    }
4881
4882    function custom_trigger_call(type,id){
4883            }
4884</script>
4884
4885
4886
4887
4888
4889<script>
4890    $(document).ready(function() {
4891        if (!$('body').hasClass('body-fade')) {
4892            $('body').show();
4893        }
4894    });
4895
4896    $(window).bind("load",function(){
4897                    initMapListBox();
4898            initMapBox();
4899            
4900        if ($('body').hasClass('body-fade')) {
4901            $('body').fadeIn(300, 'linear');
4902        }
4903
4904        initAnchor(document.location.pathname + document.location.search);
4905
4906
4907        if (!is_InternetExplorer()) {
4908            initAnimation();
4909        }
4910
4911        setTimeout(function() { initHeaderOverflowMenuResizeEvent(); }, 500);
4912
4913        // 템플릿에서 버튼 클릭되지 않도록 -> iframe 내부에서 호출되면 form, board 작성 불가, 주소 tpl 포함인 페이지에만 적용
4914        if (self !== top) {
4915            // in iframe (template)
4916            if (location.host.indexOf('tpl') == 0) {
4917                $('.form-contents-button, .board-write').css('pointer-events', 'none');
4918            }
4919            // in iframe (others)
4920            else { }
4921        }
4922
4923        
4924        // initMaintainRatioImage();
4925        initMaintainRatioSlider();
4926        initBackgroundFullSizeVideo();
4927
4928        if ($(window).width() < 767) {
4929            initImageBoxAutoResize();
4930        }
4931    });
4932
4933    // 2022.01.21 주석처리
4934    // 항상 원본비율 유지 옵션 추가로 인해 필요성 x
4935    function initMaintainRatioImage() {
4936        if (isMobile() && $(window).width() < 767) return;
4937        var notAllowed = [
4938            '.mobile_ele',
4939            '.boxing',
4940            '.col-sm-1',
4941            '.col-sm-2',
4942            '.col-sm-3',
4943            '.col-sm-4',
4944            '.col-sm-5',
4945            '.col-sm-6',
4946            '.col-sm-7',
4947            '.col-sm-8',
4948            '.col-sm-9',
4949            '.col-sm-10',
4950            '.col-sm-11',
4951        ];
4952
4953        $.each($('#main_container .body .imgBox'), function() {
4954            if ($(this).parents(notAllowed.join(',')).length > 0) return;
4955            var imgcore = $(this).find('.img-core');
4956            var backgroundSize = imgcore.css('background-size');
4957            var backgroundPosition = imgcore.css('background-position');
4958
4959            if (backgroundSize == 'contain' && backgroundPosition == '50% 50%') {
4960                var url = $(this).find('.img-core').css('background-image').replace('url(', '').replace(')', '').replace(/\"/gi, "");
4961                // var height = $(this).attr('data-hei').replace(/px/g, '');
4962                var height = $(this).find('.img-core').height();
4963                $(this).height('auto');
4964                imgcore.hide();
4965                // max-height 지정에서 height 지정으로 변경됨
4966                // 이미지를 확대해서 저장했을 때 에디터화면과 다른 문제 (라이브에서는 원본크기 이상으로 늘어나지 않음)
4967                imgcore.after('<img class="img-core-dummy" src="' + url + '" style="max-width: 100%; max-height: ' + height + 'px;">')
4968            }
4969        });
4970    }
4971
4972    function resizeMaintainRatioImage() {
4973        if (isMobile()) return;
4974        // var interval = setInterval(function() {
4975        //     if ($('#main_container').width() == 0) { return; }
4976        //     else {
4977        //         clearInterval(interval);
4978        //     }
4979        // }, 100);
4980
4981        $.each($('#main_container .imgBox'), function() {
4982            var imgbox = $(this);
4983            var imgcore = $(this).find('.img-core');
4984            var ratio = imgcore.attr('data-ratio');
4985            var w = $(this).width();
4986            var w_data = $(this).attr('data-width');
4987            var background_size = imgcore.css('background-size');
4988
4989            if (!$(this).hasClass('displayed')
4990                || (background_size != 'contain')
4991                || (w == w_data)
4992                || (!ratio)) {
4993                console.log(this.id, 'returned');
4994                return;
4995            }
4996
4997            ratio = parseFloat(ratio);
4998            var ratio_box = imgcore.height() / imgcore.width();
4999            if (ratio_box > ratio) {
5000                imgcore.height(imgcore.width() * parseFloat(ratio));
5001                imgbox.height('auto');
5002                console.log('1', ratio_box, ratio);
5003            }
5004            else {
5005                imgcore.height(imgbox.attr('data-hei'));
5006                console.log('2', ratio_box, ratio);
5007            }
5008
5009            // $(this).attr('data-width', w);
5010            // $(this).height('auto');
5011            // imgcore.height(imgcore.width() * parseFloat(ratio));
5012        });
5013    }
5014
5015    function resizeMaintainRatioSlider() {
5016        /* 2020.03.18 재헌
5017         * IE, FF 에서 해당함수 호출 시 렌더링이 완료되지 않은 상태면 ratio 값을 잘못 측정하는 문제
5018         * 렌더링 완료 기준은 main_container의 width 값이 0인지 아닌지로 확인
5019         * 렌더링이 완료되지 않은 상태에서 호출되었다면 100ms 간격을 두고 함수 재호출
5020         */
5021        var w = $('#main_container').width();
5022        if (w == 0) {
5023            setTimeout(function() {
5024                resizeMaintainRatioSlider();
5025            }, 100);
5026            return;
5027        }
5028
5029        $.each($('#main_container .slider-frm.maintain-ratio .frm, #main_container .slider-frm.maintain-ratio .box'), function() {
5030            var screenWidth = window.screen.width;
5031            // col-sm 비율까지 고려하려면 아래 코드 사용, 일단 main_container 하위 슬라이드만 적용할 것이라 사용하지 않음
5032            //var sliderFrame = $(this).parents('.slider-frm').first();
5033            // var column = sliderFrame.parent()[0].className.split(' ').filter(v => v.indexOf('col-sm') > -1);
5034            // if (column.length > 0) { // [col-sm-4..]
5035            //     var column_num = column[0].replace(/col-sm-/g, '');
5036            //     var column_ratio = 12 / column_num;
5037            //     screenWidth = screenWidth / column_ratio;
5038            // }
5039
5040            var ratio = $(this).parents('.slider-frm').first().width() / screenWidth;
5041            // 상위에 프레임이 하나 더 있는 경우 width가 0으로 잡힌다
5042            ratio = ratio != 0 ? ratio : $(this).parents('.slider-frm').parent().width() / screenWidth;
5043
5044            if(ratio > 0.1) { //IE11,FF load()전 width()값 못가져오는 case 예외처리
5045                var origin_height = parseInt($(this).data('origin-height'));
5046                var height = Math.floor(origin_height * ratio);
5047
5048                if ($(this).hasClass('frm')) {
5049                    if ($(this).parent().hasClass('item')) {
5050                        if (window.innerWidth <= 767) {
5051                            ratio = 1;
5052                            height = $(this).data('origin-height');
5053                            $(this).children('.view').css('transform-origin', '50% 50%');
5054                            $(this).css('background-position-y', '50%'); // frame 백그라운드 이미지 원복
5055                        }
5056                        $(this).parents('.carousel-inner').height(height);
5057                        $(this).children('.view').children('.tb').height(height);
5058                        $(this).children('.view').css('transform', 'scale(' + ratio + ')');
5059
5060                        // column이 여러개인 경우 item의 높이가 column의 수 만큼 크게나와서 아래와 같이 보정
5061                        var itemHeight = $(this).parent('.item').height();
5062                        if (!$(this).parent('.item').hasClass('active')) {
5063                            itemHeight = itemHeight / $(this).children('.view').children('.tb').children('.row').children('.column').length;
5064                        }
5065                        //
5066                        if (itemHeight >= height) {
5067                            var diff = parseFloat(itemHeight - height);
5068                            var rate = itemHeight / 2;
5069                            var column_height = 0;
5070                            $.each($(this).children('.view').children('.tb').children('.row').children('.column'), function () {
5071                                var total = 0;
5072                                $.each($(this).children('.frm, .box'), function () {
5073                                    total += parseInt($(this).data('origin-height'));
5074                                });
5075                                column_height = column_height < total ? total : column_height;
5076                            });
5077                            column_height = column_height * ratio;
5078                            column_height = height - column_height;
5079                            rate = rate - column_height;
5080
5081                            // most 3
5082                            // var diff = parseFloat(itemHeight - height);
5083                            // var column_height = 0;
5084                            // $.each($(this).children('.view').children('.tb').children('.row').children('.column'), function() {
5085                            //     var total = 0;
5086                            //     $.each($(this).children('.frm, .box'), function() {
5087                            //         total += parseInt($(this).data('origin-height'));
5088                            //     });
5089                            //     column_height = column_height < total ? total : column_height;
5090                            // });
5091                            // var rate = (itemHeight + height - (column_height * ratio * 2)) / 2;
5092
5093                            // most 2
5094                            // var diff = parseFloat(itemHeight - height);
5095                            // var rate = diff + diff * Math.sqrt((ratio - 0.5));
5096
5097                            // most 1
5098                            // var diff = itemHeight - height;
5099                            // var rate = diff * (1 + Math.pow(ratio, 2) + (ratizo - 0.5));
5100
5101                            if (window.innerWidth > 767) {
5102                                $(this).children('.view').css('transform-origin', '50% calc(50% - ' + Math.ceil(rate) + 'px)');
5103                                $(this).css('background-position-y', 'calc(50% - ' + parseFloat(diff / 2) + 'px)'); // frame 백그라운드 이미지 보정
5104                            }
5105                        }
5106                    }
5107                }
5108                else {
5109                    // $(this).height(height);
5110
5111                    // if ($(this).hasClass('imgBox')) {
5112                    //     $(this).find('.img-core').height(height);
5113                    // }
5114                }
5115            }
5116        });
5117    }
5118
5119
5120
5121    function initMaintainRatioSlider() {
5122        if ($('#main_container .slider-frm.maintain-ratio').length > 0) {
5123            // ratio slider는 displayed 클래스를 붙여준다.
5124            $.each($('#main_container .slider-frm.maintain-ratio'), function() {
5125                var target = $(this).parents('.frm');
5126                $.merge(target, [$(this)]);
5127                $.merge(target, $(this).find('.frm, .box'));
5128                $.each(target, function() {
5129                    $(this).addClass('displayed');
5130                });
5131            });
5132
5133            // $.each($('#main_container .slider-frm.maintain-ratio .carousel-inner'), function() {
5134            //     $(this).css('height', 'auto');
5135            // });
5136            $.each($('#main_container .slider-frm.maintain-ratio .item > .frm > .view > .tb > .row > .column'), function() {
5137                $(this).css('height', 'auto');
5138                // $(this).css('min-height', 'auto');
5139            });
5140            $.each($('#main_container .slider-frm.maintain-ratio .column'), function() {
5141                $(this).css('min-height', 'auto');
5142            });
5143            $.each($('#main_container .slider-frm.maintain-ratio .frm, #main_container .slider-frm.maintain-ratio .box'), function() {
5144                var h = $(this).hasClass('frm') ? $(this).children('.view').children('.tb').height() : $(this).height();
5145                h = $(this).parent().hasClass('item') ? $(this).parents('.carousel-inner').height() : h;
5146                $(this).data('origin-height', h);
5147            });
5148
5149            // 브라우저가 resize 될 때 마다 slider 크기를 조절한다
5150            $(window).resize(function(){
5151                resizeMaintainRatioSlider();
5152            });
5153
5154            resizeMaintainRatioSlider();
5155        }
5156    }
5157
5158    /* 2020.02.27 재헌
5159     * fixed - relative 기반
5160     */
5161    function initAffixedFrame() {
5162        var affixedFrame = $('.body .frm[data-fixed="true"]');
5163        if (affixedFrame.length == 0) return;
5164
5165        //data-fixed가 존재하는 frame에 z-index 할당
5166        //var zIndex = $('.body > .frm .frm[data-fixed="true"]').length + 10;
5167        var zIndex = $('.body .frm').length + 10;
5168        $.each($('.body .frm'), function() {
5169            $(this).css('z-index', zIndex--);
5170        });
5171
5172        // 고정 컨텐츠의 초기값 지정 및 affixed 클래스 부여, 더미 생성
5173        $.each(affixedFrame, function() {
5174            // displayed 되지 않은 항목은 width, offsetTop 값을 가져오지 못하기 때문에
5175            // 자신과 부모 프레임에 displayed 클래스를 추가한다
5176            $.each($(this).parents('.frm').andSelf(), function() {
5177                $(this).addClass('displayed');
5178            });
5179
5180            var offsetTop = $(this).offsetTop();
5181            var maxHeight = $('.header.useFixed').length > 0 ? 'calc(100vh - ' + offsetTop + 'px)' : '100vh';
5182
5183            // $(this).css('width', $(this).width() + 'px');
5184            $(this).css('max-height', maxHeight);
5185            if (!$(this).is('.qv-ani, .qv-ani-ele')) {
5186                $(this).attr('data-origin-offset-top', offsetTop);
5187            }
5188            $(this).addClass('affixed');
5189
5190            var height = $(this).height() +
5191                parseInt($(this).css('margin-top')) +
5192                parseInt($(this).css('margin-bottom')) +
5193                parseInt($(this).css('padding-top')) +
5194                parseInt($(this).css('padding-bottom'));
5195            $(this).after('<div class="affixed-dummy" id="dummy-' + this.id + '" style="height:' + height + 'px;"></div>');
5196
5197            // $(this).parents('.frm').last().css('z-index', zIndex--);
5198            // $.each($('#fGYLWT').parents('.frm').andSelf(), function() {
5199            //    $(this).css('z-index', 15);
5200            // });
5201        });
5202
5203        var scrollTarget = is_InternetExplorer() ? $('body') : $(document);
5204        scrollTarget.on('scroll', function() {
5205            var currentScrollTop = $(this).scrollTop();
5206            var topWithWindowHeight = $(this).scrollTop() + $(window).height();
5207            console.log(currentScrollTop);
5208            // 모바일 호환
5209            var header = (isMobile() && $('.header-mobile').length > 0) ? $('.header-mobile') : $('.header:not(.useFixed)');
5210            var footer = (isMobile() && $('.footer-frame-mobile').length > 0) ? $('.footer-frame-mobile') : $('.footer-frame');
5211
5212            $.each(affixedFrame, function() {
5213                /* 2020.02.28 재헌
5214                 * data-origin-offset-top 값이 없거나(qv-ani, qv-ani-ele), currentScrollTop이 0이면 재할당하여 수시로 값을 보정한다
5215                 */
5216                if (!$(this).attr('data-origin-offset-top') || currentScrollTop == 0) {
5217                    var offsetTop = $(this).offsetTop() - currentScrollTop;
5218                    $(this).attr('data-origin-offset-top', offsetTop);
5219                }
5220
5221                // 최상위 프레임
5222                if ($(this).parent().is('.body')) {
5223                    if (header.length > 0 && header.height() > currentScrollTop) {
5224                        if (!$(this).is('.affixed-top')) {
5225                            $(this).removeClass (function (index, className) {
5226                                return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5227                            });
5228                            $(this).addClass('affixed-top');
5229                            $('.affixed-dummy#dummy-' + this.id).hide();
5230
5231                            console.log('scroll - header');
5232                        }
5233                    }
5234                    // 스크롤 중 footer에 도달했을 때 (relative)
5235                    else if (footer.length > 0 && footer.offsetTop() < topWithWindowHeight) {
5236                        if (!$(this).is('.affixed-bottom')) {
5237                            var relativePosition = $(window).height();
5238                            var offsetTop = footer.offsetTop() - relativePosition;
5239                            offsetTop = header.length > 0 ? offsetTop - header.height() : offsetTop;
5240                            $(this).css('top', offsetTop + 'px');
5241                            $(this).removeClass (function (index, className) {
5242                                return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5243                            });
5244                            $(this).addClass('affixed-bottom');
5245                            $('.affixed-dummy#dummy-' + this.id).hide();
5246
5247                            console.log('scroll - footer');
5248                        }
5249                    }
5250                    // header, footer와 접하지 않을 때 (fixed)
5251                    else {
5252                        var offsetTop = $(this).attr('data-origin-offset-top');
5253                        offsetTop = header.length > 0 ? offsetTop - header.height() : offsetTop;
5254                        // offsetTop = offsetTop < 0 ? 0 : offsetTop;
5255                        $(this).css('top', offsetTop + 'px');
5256                        $(this).css('width', $(this).width() + 'px');
5257                        $(this).removeClass(function (index, className) {
5258                            return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5259                        });
5260                        $(this).addClass('affixed');
5261                        $('.affixed-dummy#dummy-' + this.id).show();
5262
5263                        console.log('scroll - main');
5264                    }
5265                }
5266                // 하위 프레임
5267                else {
5268                    var parentFrame = $(this).parents('.frm').last();
5269
5270                    // 스크롤 중 부모프레임 최상부에 도달했을 때
5271                    var _offsetTop = parseInt($(this).attr('data-origin-offset-top'));
5272                    if (_offsetTop > currentScrollTop) {
5273                        if (!$(this).is('.affixed-top')) {
5274                            $(this).removeClass (function (index, className) {
5275                                return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5276                            });
5277                            $(this).addClass('affixed-top');
5278                            $('.affixed-dummy#dummy-' + this.id).hide();
5279                        }
5280
5281                        // offset top 갱신 (chrome, ie 에서 offsetTop 값이 다르게나오는 문제)
5282                        var offsetTop = $(this).offsetTop();
5283                        if (_offsetTop != offsetTop) {
5284                            $(this).attr('data-origin-offset-top', offsetTop);
5285                        }
5286                    }
5287                    // 스크롤 중 부모프레임 최하부에 도달했을 때
5288                    else if (parentFrame.offsetTop() + parentFrame.height() < topWithWindowHeight) {
5289                        if (!$(this).is('.affixed-bottom') && !$(this).is('.affixed-top')) { // affixed-top 에서 바로 affixed-bottom 되는 케이스 없도록 함
5290                            var offsetTop = parentFrame.offsetTop() + parentFrame.height() - $(window).height() - parseInt($(this).attr('data-origin-offset-top'));
5291                            $(this).css('top', offsetTop + 'px');
5292                            $(this).removeClass (function (index, className) {
5293                                return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5294                            });
5295                            $(this).addClass('affixed-bottom');
5296                            $('.affixed-dummy#dummy-' + this.id).hide();
5297                        }
5298                    }
5299                    // 부모프레임 최상부,최하부에 접하지 않을 때
5300                    else {
5301                        if (!$(this).is('.affixed')) {
5302                            $(this).css('top', '0px');
5303                            $(this).css('width', $(this).width() + 'px');
5304                            $(this).removeClass(function (index, className) {
5305                                return (className.match(/(^|\s)affix\S+/g) || []).join(' ');
5306                            });
5307                            $(this).addClass('affixed');
5308                            $('.affixed-dummy#dummy-' + this.id).show();
5309                        }
5310                    }
5311                }
5312            });
5313        });
5314        window.scrollTo(window.scrollX, window.scrollY - 1);
5315    }
5316
5317    function initContentsLazyLoad() {
5318        if (is_InternetExplorer() || $.browser.mozilla) {
5319            $('.body').removeClass('pl-h').addClass('pl-n');
5320            initMapListBox();
5321            initMapBox();
5322            return;
5323        }
5324
5325        var correctionValue = isMobile() ? 500 : 300;
5326        var contents = $('#main_container .body > .frm');
5327        var scrollTarget = is_InternetExplorer() ? $('body') : $(document);
5328
5329        if (contents.length == 0) return;
5330        else {
5331            $.each(contents, function () {
5332                var offsetTop = $(this).offsetTop();
5333                var currentScrollTop = scrollTarget.scrollTop();
5334                if (offsetTop < $(window).height() + correctionValue + currentScrollTop) {
5335                    $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5336
5337                    if ($(this).find('.mapListBox').length > 0) {
5338                        $.each($(this).find('.mapListBox'), function() { initMapListBox($(this)); });
5339                    }
5340                    if ($(this).find('.mapBox').length > 0) {
5341                        $.each($(this).find('.mapBox'), function() { initMapBox($(this)); });
5342                    }
5343                }
5344            });
5345        }
5346
5347        var lastScrollTop = 0;
5348        scrollTarget.on('scroll', function() {
5349            var currentScrollTop = window.scrollY;
5350            // var currentScrollTop = $(this).scrollTop();
5351//            var screenHeight = $(window).height();
5352            var screenHeight = window.innerHeight;
5353            var t = currentScrollTop;
5354            var b = currentScrollTop + screenHeight + correctionValue;
5355
5356            if (currentScrollTop > lastScrollTop){ // scroll down
5357                $.each($('#main_container .body > .frm'), function() {
5358                    var height = $(this).height() + parseInt($(this).css('padding-top'))  + parseInt($(this).css('padding-bottom'));
5359                    var offsetTop = $(this).offsetTop();
5360
5361                    if (offsetTop + height < t) { }
5362                    else if (offsetTop < b) {
5363                        $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5364
5365                        if ($(this).find('.mapListBox').length > 0) {
5366                            $.each($(this).find('.mapListBox'), function() { initMapListBox($(this)); });
5367                        }
5368                        if ($(this).find('.mapBox').length > 0) {
5369                            $.each($(this).find('.mapBox'), function() { initMapBox($(this)); });
5370                        }
5371                    }
5372                });
5373            } else { // scroll up
5374                $.each($('#main_container .body > .frm'), function() {
5375                    var height = $(this).height() + parseInt($(this).css('padding-top'))  + parseInt($(this).css('padding-bottom'));
5376                    var offsetTop = $(this).offsetTop();
5377
5378                    if (offsetTop > b) { }
5379                    else if (offsetTop + height > t) {
5380                        $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5381
5382                        if ($(this).find('.mapListBox').length > 0) {
5383                            $.each($(this).find('.mapListBox'), function() { initMapListBox($(this)); });
5384                        }
5385                        if ($(this).find('.mapBox').length > 0) {
5386                            $.each($(this).find('.mapBox'), function() { initMapBox($(this)); });
5387                        }
5388                    }
5389                });
5390            }
5391
5392            lastScrollTop = currentScrollTop;
5393        });
5394    }
5395
5396    /* 2020.02.21 재헌
5397     * an-once 추가
5398     * 해당 클래스가 있으면 애니메이션이 단 한번만 실행된다.
5399     * (기존엔 스크롤했다가 다시 올라오면 애니메이션이 다시 실행 됨)
5400     */
5401    function initAnimation() {
5402        var scrollTarget = is_InternetExplorer() ? $('body') : $(document);
5403        var ani = $('#main_container .qv-ani-ele, #main_container .qv-ani');
5404        if (ani.length == 0) return;
5405        else {
5406            $.each(ani, function () {
5407                var offsetTop = $(this).offsetTop();
5408                var offsetBottom = offsetTop + $(this).height();
5409                var currentScrollTop = getScrollY();
5410                var currentScrollBottom = currentScrollTop + $(window).height() ;
5411
5412                // 부등호 < 에서 <= 로 모두 변경
5413                if ((offsetTop <= currentScrollTop && currentScrollTop <= offsetBottom) ||
5414                    (offsetTop <= currentScrollBottom && currentScrollBottom <= offsetBottom) ||
5415                    (currentScrollTop <= offsetTop && offsetBottom <= currentScrollBottom) ||
5416                    (offsetTop <= currentScrollTop && currentScrollBottom <= offsetBottom)) {
5417                    return;
5418                }
5419                else if ($(this).hasClass('qv-ani-ele')) {
5420                    $(this).toggleClass('qv-ani-ele qv-ani');
5421                }
5422
5423//                if (offsetTop > $(window).height() &&
5424//                    $(this).hasClass('qv-ani-ele')) {
5425//                    $(this).toggleClass('qv-ani-ele qv-ani');
5426//                }
5427            });
5428        }
5429
5430        var lastScrollTop = 0;
5431        scrollTarget.on('scroll', function() {
5432            var currentScrollTop = getScrollY();
5433            // var currentScrollTop = $(this).scrollTop();
5434//            var screenHeight = $(window).height();
5435            var screenHeight = window.innerHeight;
5436            var t = currentScrollTop;
5437            var b = currentScrollTop + screenHeight;
5438
5439            if (currentScrollTop > lastScrollTop) { // scroll down
5440                $.each($('#main_container .qv-ani-ele, #main_container .qv-ani'), function() {
5441                    var height = $(this).height() + parseInt($(this).css('padding-top'))  + parseInt($(this).css('padding-bottom'));
5442                    var offsetTop = $(this).offsetTop();
5443
5444                    if (offsetTop + height < t) {
5445                        if ($(this).is('.qv-ani-ele.an-once')) {
5446                            $(this).removeClass('qv-ani').addClass('qv-ani-ele');
5447                        }
5448                        else if ($(this).hasClass('qv-ani-ele')) {
5449                            $(this).toggleClass('qv-ani-ele qv-ani');
5450                            //console.log(1);
5451                        }
5452                    }
5453                    else if (offsetTop < b) {
5454                        if ($(this).is('.qv-ani-ele.an-once')) {
5455                            $(this).removeClass('qv-ani').addClass('qv-ani-ele');
5456                        }
5457                        else if ($(this).hasClass('qv-ani')) {
5458                            $(this).toggleClass('qv-ani qv-ani-ele');
5459                            //console.log(2);
5460                        }
5461                    }
5462                });
5463            } else { // scroll up
5464                $.each($('#main_container .qv-ani-ele, #main_container .qv-ani'), function() {
5465                    var height = $(this).height() + parseInt($(this).css('padding-top'))  + parseInt($(this).css('padding-bottom'));
5466                    var offsetTop = $(this).offsetTop();
5467
5468                    if (offsetTop > b) {
5469                        if ($(this).is('.qv-ani-ele.an-once')) {
5470                            $(this).removeClass('qv-ani').addClass('qv-ani-ele');
5471                        }
5472                        else if ($(this).hasClass('qv-ani-ele')) {
5473                            $(this).toggleClass('qv-ani-ele qv-ani');
5474                            //console.log(3);
5475                        }
5476                    }
5477                    else if (offsetTop + height > t) {
5478                        if ($(this).is('.qv-ani-ele.an-once')) {
5479                            $(this).removeClass('qv-ani').addClass('qv-ani-ele');
5480                        }
5481                        else if ($(this).hasClass('qv-ani')) {
5482                            $(this).toggleClass('qv-ani qv-ani-ele');
5483                            //console.log(4);
5484                        }
5485                    }
5486                });
5487            }
5488
5489            lastScrollTop = currentScrollTop;
5490        });
5491    }
5492            $('.quv-made .logo, .quv-made .txt').on('click', function() {
5493            window.open('https://qshop.ai?utm_source=owned&utm_medium=display&utm_campaign=quv','_blank');
5494        });
5495        $('.quv-made .logo, .quv-made .btn-quv-start').on('click', function() {
5496            window.open('https://qshop.ai?utm_source=owned&utm_medium=display&utm_campaign=quv','_blank');
5497        });
5498        
5499    function moveArticle(href) {
5500        var page = href.slice(1, href.indexOf('?'));
5501        var query = qv_func.getUrlParams();
5502        var bid = query.bid;
5503        var aid = query.aid;
5504        var table = $('table[data-bid="' + bid + '"]');
5505
5506        if (table.length == 0) return;
5507        if (bid && aid && (QV_BASE_OBJ.spid == page || SITE_URL == page)) {
5508            // 앵커 동작 시 lazyload를 무시하고 displayed 클래스 부여
5509            $.each($('.body > .frm'), function() {
5510                $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5511            });
5512
5513            var type = 'default';
5514            var _pn = page;
5515            var pn = "&pn=" + _pn;
5516
5517            __BID = bid;
5518            __AID = aid;
5519            __PN = QV_BASE_OBJ.spid;
5520
5521            $('#' + bid).attr('data-type', 'default');
5522            checkAuth(bid, aid,
5523                function(obj) { initialize_currentLocation(bid, aid, obj, table); },
5524                function(obj) {
5525                    qvjax_direct(
5526                        "check_board_auth",
5527                        "/module/board/board.php",
5528                        'bid=' + bid + '&aid=' + aid + '&auth_action=read',
5529                        function (data) {
5530                            if (data) {
5531                                if ((obj.is_secret == 1 && obj.writer_account == null)
5532                                    || (obj.is_secret == 1 && $('tr#' + obj.parent).attr('data-type') == 'nm')) {
5533                                    $('.read-body').data('article', obj);
5534                                    $('#ReadPasswordCheckModal').modal('show');
5535                                    $('#ReadPasswordCheckModal').data('article', obj);
5536                                    $('#ReadPasswordCheckModal').data('type', 'check_password');
5537                                    $('#ReadPasswordCheckModal').data('aid', __AID);
5538                                    $('#ReadPasswordCheckModal').data('init-type', type);
5539                                    $('#ReadPasswordCheckModal').data('table', table);
5540                                }
5541                                else if (obj.is_secret == 1) {
5542                                    alert(lang.no_permission);
5543                                    // window.top.close();
5544                                }
5545                                else {
5546                                    initialize_currentLocation(bid, aid, obj, table);
5547                                }
5548                            }
5549                            else { alert(lang.no_permission); }
5550                        },
5551                        function (xhr) { alert(lang.no_permission); }
5552                    );
5553                },
5554                function(obj) {
5555                    //if (obj.is_secret == 1 || obj.writer_account == null) {
5556                    //if (obj.writer_account == null) {
5557                    if (obj.is_secret == 1 && obj.writer_account == null) {
5558                        $('#ReadPasswordCheckModal').modal('show');
5559                        $('#ReadPasswordCheckModal').data('article', obj);
5560                        $('#ReadPasswordCheckModal').data('type', 'check_password');
5561                        $('#ReadPasswordCheckModal').data('aid', __AID);
5562                        $('#ReadPasswordCheckModal').data('init-type', type);
5563                        $('#ReadPasswordCheckModal').data('table', table);
5564                    }
5565                    else if (obj.is_secret == 1) {
5566                        alert(lang.no_permission);
5567                        return;
5568                        // window.top.close();
5569                    }
5570                    else {
5571                        initialize_currentLocation(bid, aid, obj, table);
5572                    }
5573                }
5574            );
5575        }
5576    }
5577
5578    function initAnchor(href) {
5579        var page = href.slice(1, href.indexOf('?'));
5580        var query = qv_func.getUrlParams();
5581        var anchor = "";
5582        var anchor_mobile = "";
5583
5584        if (isMobile() && anchor_mobile) { anchor = anchor_mobile; }
5585        if ($('#' + anchor).length == 0) return;
5586        if (anchor && (QV_BASE_OBJ.spid == page || SITE_URL == page)) {
5587            // 앵커 동작 시 lazyload를 무시하고 displayed 클래스 부여
5588            $.each($('.body > .frm'), function() {
5589                $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5590            });
5591
5592            if (is_InternetExplorer() && $("#" + anchor).offsetTop() == 0) { // ie에서 page load 시 offset 값을 가져ì˜
5592¤ì§€ 못하기 때문에 가져올때까지 setInterval 돌림
5593                var interval = null;
5594                interval = setInterval(function() {
5595                    moveAnchor(anchor);
5596                    clearInterval(interval);
5597                }, 100);
5598            }
5599            else {
5600                setTimeout(function() {
5601                    moveAnchor(anchor);
5602                }, 100)
5603            }
5604        }
5605    }
5606
5607    function moveAnchor(anchor) {
5608        var scrolltop = 0;
5609        var header_height_pc = 0;
5610        $.each($('.header > div[class*=header]'), function() {
5611            if ($(this).attr('data-scr-hei')) {
5612                header_height_pc += parseInt($(this).attr('data-scr-hei'));
5613            }
5614        });
5615        header_height_pc = header_height_pc == 0 ? $('.header').height() : header_height_pc;
5616
5617        var header_height = isMobile() ? $('.header-mobile').height() : header_height_pc;
5618
5619        /* 2021.09.28
5620         * 동일 아이디를 가진 anchor 객체가 존재하는 경우가 있음 (PC/Mobile)
5621         * 구분하여 각 환경에 맞게 앵커객체 할당
5622         */
5623        let anchorTarget = $('div[id="' + anchor + '"]').filter(function(i, a) {
5624            const mobileParents = $(a).parents('.mobile_ele');
5625            return isMobile() ? mobileParents.length > 0 : mobileParents.length === 0;
5626        });
5627        anchorTarget = anchorTarget.length > 0 ? anchorTarget : $('#' + anchor);
5628
5629        if (anchorTarget.parents('.slider-frm').length > 0) {
5630            scrolltop = anchorTarget.parents('.slider-frm').offsetTop() - header_height;
5631            scrolltop = is_InternetExplorer() ? scrolltop + $('body').scrollTop() : scrolltop;
5632
5633            var slider_index = anchorTarget.parents('.item').index();
5634            anchorTarget.parents('.carousel.slide').carousel(slider_index);
5635            anchorTarget.parents('.item').first().css('transform', 'translate3d(0, 0, 0)');
5636
5637            if (anchorTarget.parents('.fullpage ').length > 0) {
5638                if (anchorTarget.parents('.item').prev('.item').length > 0 ) {
5639                    anchorTarget.parents('.item').prev('.item').css('transform', 'translate3d(0, -100%, 0)');
5640                }
5641                if (anchorTarget.parents('.item').next('.item').length > 0 ) {
5642                    anchorTarget.parents('.item').next('.item').css('transform', 'translate3d(0, 100%, 0)');
5643                }
5644            }
5645        }
5646        else if (anchorTarget.parents('.tab-frm').length > 0) {
5647            scrolltop = anchorTarget.parents('.tab-frm').offsetTop() - header_height;
5648            scrolltop = is_InternetExplorer() ? scrolltop + $('body').scrollTop() : scrolltop;
5649
5650            if (anchor.indexOf('tab-') > -1) {
5651                var tab_id = anchor;
5652            }
5653            else {
5654                var tab_id = anchorTarget.parent()[0].id;
5655            }
5656            anchorTarget.parents('.tab-frm').find('a[href*="#' + tab_id + '"]').trigger('click');
5657
5658            /* 2020.03.19 재헌
5659             * 탭을 mobile_ele로 복사하여 넣은 경우 헤더의 탭 앵커가 동작하지 않기 때문에(id가 달라서)
5660             * 이름으로 찾아 활성화한다
5661             */
5662            if (isMobile()) {
5663                var tab = anchorTarget.parents('.tab-frm');
5664                var target_tab = tab.find('a[href*="#' + tab_id + '"]');
5665                var tab_name = target_tab.text();
5666                $.each($('.mobile_ele .tab-frame-nav a'), function() {
5667                    if ($(this).text() == tab_name) {
5668                        $(this).trigger('click');
5669                    }
5670                });
5671            }
5672        }
5673        else {
5674            scrolltop = $("#" + anchor).offsetTop() - header_height;
5675            scrolltop = is_InternetExplorer() ? scrolltop + $('body').scrollTop() : scrolltop;
5676        }
5677
5678        $('html, body').animate({
5679            scrollTop: scrolltop
5680        }, 700);
5681
5682
5683        // mn-link 클릭하면 header-side-nav 닫음
5684        if (isMobile() && $('.header-side-nav').hasClass('active')) {
5685            $('.header-side-nav').removeClass('active');
5686
5687            if ($(this).parents('.header-mobile').length > 0) {
5688                $(this).parents('.header1, .header2, .header3, .header9').removeClass('z-index-9999');
5689            }
5690        }
5691    }
5692
5693    //$('.mn-link').on('click', function() {
5694    $('a[href*="qvac"]').on('click', function() {
5695        var href = $(this).attr('href');
5696        if (href != undefined && href != '') {
5697            var page = href.slice(1, href.indexOf('?'));
5698            var params = qv_func.getUrlParams('?' + href.split('?')[1]);
5699            var anchor = params.qvac;
5700            var anchor_mobile = params.qvmac;
5701
5702            if (isMobile() && anchor_mobile) { anchor = anchor_mobile; }
5703            if ($('#' + anchor).length == 0) return;
5704            //side menu close
5705            if($(this).parents(".header-mobile-side-nav").length > 0){
5706                $('.header-mobile').removeClass('active-side-nav');
5707            }
5708            if (anchor && (QV_BASE_OBJ.spid == page || SITE_URL == page)) {
5709                // 앵커 동작 시 lazyload를 무시하고 displayed 클래스 부여
5710                $.each($('.body > .frm'), function() {
5711                    $(this).find('.frm:not(".dp-none-important"), .box:not(".dp-none-important")').addClass('displayed');
5712                });
5713
5714                if (is_InternetExplorer() && $("#" + anchor).offsetTop() == 0) { // ie에서 page load 시 offset 값을 가져ì˜
5714¤ì§€ 못하기 때문에 가져올때까지 setInterval 돌림
5715                    var interval = null;
5716                    interval = setInterval(function() {
5717                        moveAnchor(anchor);
5718                        clearInterval(interval);
5719                    }, 100);
5720                }
5721                else {
5722                    setTimeout(function() {
5723                        moveAnchor(anchor);
5724                    }, 100)
5725                }
5726                return false;
5727            }
5728        }
5729    });
5730
5731    $('a.mn-link[href*="tab"]').on('click', function(e) {
5732        var href = $(this).attr('href');
5733        if (href != undefined && href != '') {
5734            var page = href.slice(1, href.indexOf('#'));
5735            var anchor = href.split('#')[1];
5736            if ($('#' + anchor).length == 0) return;
5737            else {
5738                if (anchor && (QV_BASE_OBJ.spid == page || SITE_URL == page)) {
5739                    e.preventDefault();
5740                    moveAnchor(anchor);
5741                }
5742            }
5743        }
5744    });
5745
5746    function isMobile() {
5747        return /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
5748    }
5749
5750    //원래 initHeaderOverflowMenuResizeEvent 위치
5751
5752
5753    //var resize_frames = [];
5754    function imageBoxAutoResize() {
5755        $.each($('#main_container .imgBox'), function() {
5756            var img_box = $(this);
5757            var bg_size = $(this).find('.img-core').css('background-size');
5758            var bg_image = $(this).find('.img-core').css('background-image');
5759
5760            if (bg_image) {
5761                bg_image = bg_image.replace('url(', '').replace(')', '').replace(/\"/gi, "");
5762            }
5763
5764            // displayed 클래스가 없으면 리사이징 하지않는다.
5765            if (!img_box.hasClass('displayed')) return;
5766
5767            // 컬럼 2개 이상 존재하는 프레임에 속해있으면 리사이징 하지않는다.
5768            if (isMobile() || window.innerWidth <= 767) {
5769                if (img_box.parents('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
5770            }
5771            else {
5772                if (img_box.parents('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
5773            }
5774
5775            // 탭, 슬라이드 내의 이미지는 리사이징 하지않는다.
5776            if (img_box.parents('.tab-frm, .slider-frm').length > 0) return;
5777
5778            if (bg_size == 'contain') {
5779                var tmpImg = new Image();
5780                tmpImg.src = bg_image;
5781                $(tmpImg).one('load',function(){
5782                    var ratio = tmpImg.width / tmpImg.height;
5783                    var height_origin = parseInt(getDataHeight(img_box));
5784                    var width_resize = img_box.width();
5785                    var height_resize = width_resize / ratio;
5786                    height_resize = height_resize > height_origin ? height_origin : height_resize;
5787
5788                    var diff = height_origin - height_resize;
5789                    //console.log(diff);
5790
5791                    if (height_origin === 0) return;
5792                    else if (!isMobile() && window.innerWidth > 767) {
5793                        img_box.height(height_origin - diff);
5794                        img_box.find('.img-core').height(height_origin - diff);
5795                    }
5796                    else {
5797                        /*
5798                         * 모바일에서는 에디터 width 375px 기준으로 비율을 맞춰서 크기를 조정한다
5799                         * 모바일객체는 height important가 적용되어있는 경우가 많아 height 조정 시 important를 붙여줘야 함
5800                         */
5801                        var mobile_width = 375 - (parseInt(img_box.parents('.frm').last().css('padding-left')) * 2); // 에디터(375px) 기준
5802                        var mobile_ratio = mobile_width / height_origin;
5803                        img_box[0].style.setProperty('height', (width_resize / mobile_ratio) + 'px', 'important');
5804                        img_box.find('.img-core')[0].style.setProperty('height', (width_resize / mobile_ratio) + 'px', 'important');
5805                    }
5806                });
5807            }
5808        });
5809
5810        $.each($('.body > .frm'), function() {
5811            // 컬럼 2개 이상 존재하는 프레임에 속해있으면 리사이징 하지않는다.
5812            if (isMobile() || window.innerWidth <= 767) {
5813                if ($(this).parents('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11').length > 0) return;
5814                if ($(this).find('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11').length > 0) return;
5815            }
5816            else {
5817                if ($(this).parents('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
5818                if ($(this).find('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
5819            }
5820
5821
5822            // 탭, 슬라이드 내의 이미지는 리사이징 하지않는다.
5823            if ($(this).parents('.tab-frm, .slider-frm').length > 0) return;
5824            if ($(this).hasClass('tab-frm') || $(this).hasClass('slider-frm')) return;
5825
5826            var re = 0;
5827            var image_count = 0;
5828            $.each($(this).find('.box.imgBox'), function() {
5829                // displayed 클래스가 없으면 리사이징 하지않는다.
5830                if (!$(this).hasClass('displayed')) return;
5831
5832                // 컬럼 2개 이상 존재하는 프레임에 속해있으면 리사이징 하지않는다.
5833                if (isMobile() || window.innerWidth <= 767) {
5834                    if ($(this).parents('.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11').length > 0) return;
5835                }
5836                else {
5837                    if ($(this).parents('.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11').length > 0) return;
5838                }
5839
5840                // 탭, 슬라이드 내의 이미지는 리사이징 하지않는다.
5841                if ($(this).parents('.tab-frm, .slider-frm').length > 0) return;
5842
5843                re += getDataHeight($(this)) - $(this).height();
5844                image_count++;
5845            });
5846
5847            if (image_count > 0) {
5848                $.each($(this).find('.frm').andSelf(), function () {
5849                    var h = getDataHeight($(this));
5850                    if (h == 'auto' || h == 0 || re > h) return;
5851                    if ($(this).is($('.body > .frm').first()) && $('.header').length > 0) {
5852                        $.each($('.header > div'), function() { // 헤더 크기가 가변적이기 때문에 data-hei 값을 가져다쓴다
5853                            var header_height = $(this).attr('data-hei');
5854                            if (header_height == '' || header_height == undefined) { return; }
5855                            h += parseInt(header_height);
5856                        });
5857                        //h += $('.header').height();
5858                    } // 최상단 프레임은 헤더 높이 추가
5859                    h -= re;
5860                    //$(this).children('.view').children('.tb').height(h);
5861                    if (isMobile() || window.innerWidth <= 767) {
5862                        $(this).css('height', 'auto');
5863                    }
5864                    else {
5865                        $(this).height(h);
5866                    }
5867                });
5868            }
5869            image_count = 0;
5870        });
5871
5872//    $.each(resize_frames, function() {
5873//        var frame = $('#' + this.id);
5874//        var height_data = frame.attr('data-hei');
5875//        if ((height_data == '' || height_data == undefined || height_data == null)) return;
5876//        if (this.diff <= 0) return;
5877//        var height_origin_frm = parseInt(height_data);
5878//        frame.height(height_origin_frm - this.diff);
5879//        console.log('id : ' + this.id + ' / diff : ' + (height_origin_frm - this.diff).toString());
5880//
5881//        this.diff = 0; // 프레임 높이 조정 후 diff:0 으로 할당
5882//    });
5883    }
5884
5885    function getDataHeight($obj) {
5886        var retval;
5887        if (window.innerWidth <= 767 || isMobile()) {
5888            retval = $obj.attr('data-m-hei');
5889        }
5890        else {
5891            retval = $obj.attr('data-hei');
5892        }
5893
5894        if (retval == '' || retval == 'auto' || retval == undefined || retval == null || retval == 'NaNpx') {
5895            retval = $obj.height();
5896        }
5897        else {
5898            retval = parseInt(retval);
5899            retval -= parseInt($obj.css('margin-top'));
5900            retval -= parseInt($obj.css('margin-bottom'));
5901            retval -= parseInt($obj.css('padding-top'));
5902            retval -= parseInt($obj.css('padding-bottom'));
5903        }
5904
5905        return retval;
5906    }
5907
5908    function initImageBoxAutoResize() {
5909        $.each($('#main_container .frm'), function() {
5910            $(this).css('transition', '0.1s ease height');
5911
5912            if ($(this).hasClass('tab-frm')) return;
5913            if ($(this).parents('.tab-frm').length > 0) return;
5914            if ($(this).hasClass('slider-frm')) return;
5915            if ($(this).parents('.slider-frm').length > 0) return;
5916
5917            var hei = $(this).attr('data-hei');
5918            if (hei == '' || hei == 'auto' || hei == undefined || hei == null || hei == 'NaNpx') {
5919                hei = $(this).height();
5920                hei += parseInt($(this).css('margin-top'));
5921                hei += parseInt($(this).css('margin-bottom'));
5922                hei += parseInt($(this).css('padding-top'));
5923                hei += parseInt($(this).css('padding-bottom'));
5924                $(this).attr('data-hei', hei);
5925            }
5926//            $(this).attr('data-hei', $(this).height());
5927        });
5928
5929        $.each($('#main_container .imgBox'), function() {
5930            var m_hei = $(this).attr('data-m-hei');
5931            if (m_hei == '' || m_hei == 'auto' || m_hei == undefined || m_hei == null || m_hei == 'NaNpx') {
5932                m_hei = $(this).height();
5933                m_hei += parseInt($(this).css('margin-top'));
5934                m_hei += parseInt($(this).css('margin-bottom'));
5935                m_hei += parseInt($(this).css('padding-top'));
5936                m_hei += parseInt($(this).css('padding-bottom'));
5937                $(this).attr('data-m-hei', m_hei + 'px');
5938            }
5939        });
5940
5941        $.each($('#main_container .imgBox .img-core'), function() {
5942            $(this).css('transition', 'none');
5943        });
5944
5945        // 0.2초 마다 갱신
5946        setInterval(imageBoxAutoResize, 200);
5947
5948
5949//        window.onresize = function(event) {
5950//            imageBoxAutoResize();
5951//        };
5952//        $(window).bind('resizeEnd', function() {
5953//            setTimeout(imageBoxAutoResize(), 50)
5954//        });
5955    }
5956
5957    /* 2020.03.10 재헌
5958     * 백그라운드 비디오 크기 설정 (16:9)
5959     * frame/box의 크기를 확인 후 맞는 사이즈의 클래스를 부여함
5960     */
5961    function initBackgroundFullSizeVideo() {
5962        var backgroundVideo = $('.box-background-video-fullwidth .video-iframe');
5963        if (backgroundVideo.length == 0) { return; }
5964        else {
5965            var w = $('#main_container').width();
5966            if (w == 0) {
5967                setTimeout(function() {
5968                    initBackgroundFullSizeVideo();
5969                }, 100);
5970                return;
5971            }
5972            else {
5973                resizeBackgroundFullSizeVideo();
5974                $(window).resize(function () {
5975                    resizeBackgroundFullSizeVideo();
5976                });
5977            }
5978        }
5979    }
5980    function resizeBackgroundFullSizeVideo() {
5981        $.each($('.box-background-video-fullwidth .video-iframe'), function() {
5982            var $t = $(this).parents('.frm, .box').first();
5983            var w = $t.width();
5984            var h = $t.height();
5985
5986            // 모바일에서 vimeo 배경설정 시 '소리 켜기' 버튼이 생기는 문제 때문에 전체 크기 상향 조정
5987            // if (isMobile()) {
5988            //     w += 100;
5989            //     h += 100;
5990            // }
5991
5992            if ($t.parents('.slider-frm').length > 0) {
5993                w = $t.parents('.slider-frm').width();
5994                h = $t.parents('.slider-frm').height();
5995            }
5996            else if ($t.parents('.tab-frm').length > 0) {
5997                w = $t.parents('.tab-frm').width();
5998                h = $t.parents('.tab-frm').height();
5999            }
6000            else if (w == 0 || h == 0) {
6001                $t.addClass('displayed');
6002                $t.parents('.frm').addClass('displayed');
6003                w = $t.width();
6004                h = $t.height();
6005            }
6006
6007            h += parseInt($t.css('padding-top'));
6008            h += parseInt($t.css('padding-bottom'));
6009            h += parseInt($t.css('margin-top'));
6010            h += parseInt($t.css('margin-bottom'));
6011
6012            var resolution = 'resolution-1920x1080'; // default;
6013            var resolution_array = [
6014                { w:320, h:180 },
6015                { w:480, h:270 },
6016                { w:640, h:360 },
6017                { w:800, h:450 },
6018                { w:864, h:486 },
6019                { w:960, h:540 },
6020                { w:1024, h:576 },
6021                { w:1152, h:648 },
6022                { w:1280, h:720 },
6023                { w:1366, h:768 },
6024                { w:1440, h:810 },
6025                { w:1600, h:900 },
6026                { w:1760, h:990 },
6027                { w:1920, h:1080 },
6028                { w:2048, h:1152 },
6029                { w:2560, h:1440 },
6030                { w:2880, h:1620 },
6031                { w:3200, h:1800 },
6032                { w:3840, h:2160 },
6033                { w:4096, h:2304 },
6034                { w:5120, h:2880 },
6035            ];
6036            $.each(resolution_array.reverse(), function() {
6037                if (w > this.w || h > this.h) { return false; }
6038                else {
6039                    resolution = 'resolution-' + this.w + 'x' + this.h;
6040                }
6041            });
6042
6043            if ($(this).hasClass(resolution)) return;
6044            else {
6045                $(this).removeClass(function (index, className) {
6046                    return (className.match(/(^|\s)resolution-\S+/g) || []).join(' ');
6047                });
6048                $(this).addClass(resolution);
6049            }
6050        });
6051    }
6052
6053    function is_InternetExplorer() {
6054        var agent = navigator.userAgent.toLowerCase();
6055        return (navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (agent.indexOf("msie") != -1);
6056    }
6057
6058    /* 2020.03.11 재헌
6059     * IE, Chrome이 $t.offset().top 값을 다르게 출력하기 때문에 아래와 같이 처리
6060     */
6061    const _ZOOM = Number(window.getComputedStyle(document.body).zoom) || 1;
6062    $.fn.offsetTop = function() {
6063        if (_ZOOM === 1) {
6064            var offsetTop = $(this).offset().top - parseInt($(this).css('margin-top'));
6065            return is_InternetExplorer() ? offsetTop + $('body').scrollTop() : offsetTop;
6066        } else {
6067            return window.scrollY + (this[0].getBoundingClientRect().y * _ZOOM);
6068        }
6069    };
6070
6071    function isIpadOS() {
6072        return navigator.maxTouchPoints &&
6073            navigator.maxTouchPoints > 2 &&
6074            /MacIntel/.test(navigator.platform);
6075    }
6076
6077    function getScrollY() {
6078        if (isIpadOS()) {
6079            return window.scrollY / _ZOOM;
6080        } else {
6081            return window.scrollY;
6082        }
6083    };
6084
6085
6086    /* 2020.05.18 재헌
6087     * 동영상 컨텐츠 로딩 시 다른 컨텐츠의 로딩까지 느려지는 부분 개선
6088     * 로딩 순서 (동영상 외) -> (동영상)
6089     *
6090     * 2026.08 - 여기서 전량 주입하던 로직을 제거했다.
6091     * iframe 이 display:none(0x0) 인 상태에서 src 가 주입되면 유튜브가
6092     * 저해상도 썸네일을 확정해버리는 문제가 있었다.
6093     * script.inc.html 의 initVideoLazyLoad() 가 대신 처리한다.
6094     */
6095
6096    $(document).ready(function() {
6097        if ($('.read-content-next')) {
6098            $('.read-content-next').text('이전글');
6099            $('.read-content-prev').text('다음글');
6100        }
6101
6102        $("#main_container").delegate('.board-table-1 tr.board-tbody-tr, .board-table-2 tr.board-tbody-tr, .read-content-next, .read-content-prev', 'click', function (e) {
6103            const customInterval = setInterval(function() {
6104                if ($('.read-content-next')) {
6105                    $('.read-content-next').text('이전글');
6106                    $('.read-content-prev').text('다음글');
6107                    clearInterval(customInterval);
6108                }
6109            }, 1000)
6110        });
6111    });
6112</script>
vendor: 1 bytes, line 6112
6112

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.