PageSourceSearch

https://smitechnology.com/news

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

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.