PageSourceSearch

https://www.khvatec.com/assets/common/common.js?v250401

js khvatec.com collected 2026-10-08 19:23:49 UTC 25,967 bytes, 657 lines download raw bytes

1
2var khvatec = (function (khvatec, $, undefined) {
3  var $win = $(window);
4  var $doc = $(document);
5  var _nav = {
6    step: 0,
7    opened_sub: null,
8    init: typeof (_nav_init) == 'undefined' ? '' : _nav_init.split('/'),
9    init_type: 0
10  };
11  var _main = {};
12  var _map = {};
13  var _SL = {};
14  var _pr = {};
15
16  $(function () {
17    var doc = $doc;
18    var nav = _nav;
19
20    nav.wrap = doc.find('#nav');
21    nav.h1 = nav.wrap.find('h1');
22    nav.link = nav.wrap.find('.ml');
23    nav.clip = nav.wrap.find('#nav_clip');
24    nav.prev = nav.wrap.find('#nav_prev');
25    nav.sub_wrap = nav.wrap.find('#nav_sub_wrap');
26    nav.sub = nav.sub_wrap.find('.sub');
27    nav.mobile_opener = doc.find('#mobile_nav_opener');
28    nav.family_sites = nav.wrap.find('#family_sites');
29    nav.collaboration = nav.wrap.find('#collaboration');
30    nav.blind = doc.find('#blind');
31    nav.opened = 1;
32
33    nav.toggle = function (i, p) {
34      var pos_1 = (i == 2) ? -220 : 0;
35      var pos_2 = (i == 2 || p == true) ? 0 : '100%';
36      this.opened = i;
37      this.wrap.stop().animate({ 'left': pos_1 }, 700, 'easeOutExpo');
38      this.blind.stop().animate({ 'width': pos_2 }, 700, 'easeOutExpo');
39    };
40
41    if (nav.wrap.hasClass('admin') != true) {
42      _setNav();
43    }
44    _setGlobalAction(doc);
45    _setAction(doc);
46
47    doc = null;
48  });
49
50  function _setNav() {
51    var nav = _nav;
52
53    nav.init_type = nav.init.length;
54
55    if (nav.init_type > 1) {
56      nav.sub_wrap.css('margin-top', -nav.sub.hide().eq(nav.init[0]).find('a').eq(nav.init[1]).addClass('current').end().end().show().height() / 2 - 10);
57      nav.clip.css({ 'left': -220 });
58      nav.h1.stop().css({ 'margin-left': 40, 'width': 110 });
59    }
60
61    nav.link
62      .each(function (i) {
63        $(this).data('idx', i);
64      })
65      .on('click', { nav: nav }, function (event) {
66        var idx = $(this).data('idx');
67        var nav = event.data.nav;
68        nav.sub_wrap.css('margin-top', -nav.sub.hide().eq(idx).show().height() / 2 - 10); //ko nav var 수정
69        nav.clip.stop().animate({ 'left': -220 }, 700, 'easeInOutQuint');
70        nav.h1.stop().animate({ 'margin-left': 40, 'width': 110 }, 700, 'easeInOutQuint');
71      })
72      .on('touchstart', { nav: nav }, function (event) {
73        var idx = $(this).data('idx');
74        var nav = event.data.nav;
75        nav.sub_wrap.css('margin-top', -nav.sub.hide().eq(idx).show().height() / 2 - 10); //en nav var 수정
76        nav.clip.stop().animate({ 'left': -220 }, 700, 'easeInOutQuint');
77        nav.h1.stop().animate({ 'margin-left': 40, 'width': 110 }, 700, 'easeInOutQuint');
78        event.preventDefault();
79      });
80
81    nav.prev.on('click', { nav: nav }, function (event) {
82      var nav = event.data.nav;
83      nav.clip.stop().animate({ 'left': 0 }, 700, 'easeOutExpo');
84      nav.h1.stop().animate({ 'margin-left': 0, 'width': 132 }, 700, 'easeInOutQuint');
85    });
86
87    nav.mobile_opener.on('click', { nav: nav }, function (event) {
88      var nav = event.data.nav;
89      if (nav.opened == 1) {
90        nav.toggle(2);
91        $(this).removeClass('opened');
92      } else {
93        nav.toggle(1);
94        $(this).addClass('opened');
95      }
96    });
97
98    nav.family_sites.on({
99      'mouseenter': function () { $(this).find('.select_list').show().animate({ 'height': 110 }, 300); },
100      'mouseleave': function () {
101        $(this).find('.select_list').stop().animate({ 'height': 0 }, 150, function () { $(this).hide(); });
102      }
103    });
104
105    nav.collaboration.on({
106      'mouseenter': function () { $(this).find('.select_list').show().animate({ 'height': 80 }, 300); },
107      'mouseleave': function () {
108        $(this).find('.select_list').stop().animate({ 'height': 0 }, 150, function () { $(this).hide(); });
109      }
110    });
111
112    if (window.CSSBS_mobile) {
113      nav.opened = 2;
114      nav.wrap.css('left', -220);
115      nav.blind.css('width', 0);
116      return;
117    }
118
119    $win.on('resize', _setNavSize).trigger('resize');
120
121    nav = null;
122  };
123
124  function _setNavSize() {
125    var win = $win;
126    var nav = _nav;
127
128    if (win.width() < 900) {
129      nav.toggle(2);
130    } else {
131      nav.toggle(1, true);
132    }
133  };
134
135  function _setGlobalAction(scope) {
136
137    var $scope = scope || $doc;
138    var $form = $scope.find('.form');
139
140    _SL.cache = $scope.find('.SL').find('.row').eq(0);
141
142    $scope
143      .find('.SL').on('click', '.row', { sl: _SL }, function (event) {
144        if ($(this).hasClass('current') == true) {
145          $(this).removeClass('current').next().removeClass('current_next');
146          return;
147        }
148        if (event.data.sl.cache && event.data.sl.cache.hasClass('current')) {
149          event.data.sl.cache.toggleClass('current').next().toggleClass('current_next');
150        }
151        event.data.sl.cache = $(this);
152        $(this).toggleClass('current').next().toggleClass('current_next');
153      }).end()
154      .on('click', 'span.logo', function () {
155        location.href = '/ko/main';
156      })
157      .find('select').customSelect()
158      .filter('.change_update').on('change', function () {
159        var $this = $(this);
160        $.post($this.attr('href'), { 'year': $this.val() }, function (r) {
161          $($this.attr('rel')).html(r).trigger('change');
162        });
163      }).end()
164      .filter('.change_link').on('change', function () {
165        location.href = $(this).val();
166      }).end()
167      .end();
168
169    if ($form.length > 0) {
170      $form
171        .on('click', '.radio', function () {
172          $(this)
173            .removeClass('off')
174            .addClass('on')
175            .find('input')
176            .prop('checked', true)
177            .attr('checked', true)
178            .trigger('change')
179            .closest('.radio_group')
180            .find('.radio')
181            .not(this)
182            .removeClass('on')
183            .addClass('off')
184            .find('input')
185            .prop('checked', false)
186            .removeAttr('checked')
187            .trigger('change');
188          return false;
189        }).find('.radio').each(function (i, e) {
190          var $this = $(e);
191          var _rel = $this.attr('rel');
192          if (typeof _rel !== typeof undefined && _rel !== false) {
193            $this.on('change', 'input', function () {
194              var $target = $(_rel);
195              if ($(this).is(':checked') == true) {
196                $target.show();
197              } else {
198                $target.hide();
199              }
200            }).find('input').trigger('change');
201          }
202        }).end()
203        .on('click', '.checkbox', function () {
204          var $this = $(this);
205          if ($this.hasClass('off')) {
206            $this
207              .removeClass('off')
208              .addClass('on')
209              .find('input')
210              .prop('checked', true)
211              .attr('checked', true)
212              .trigger('change');
213          } else {
214            $this
215              .removeClass('on')
216              .addClass('off')
217              .find('input')
218              .prop('checked', false)
219              .removeAttr('checked')
220              .trigger('change');
221          }
222          return false;
223        }).end()
224        .find('input[type=file]').on('change', function () {
225          $(this).closest('.file').find('span.v').html($(this).val());
226        }).end()
227        .find('.datepicker').datepicker({ showAnim: 'slideDown', changeMonth: true, changeYear: true, yearRange: '1930:2025' }).end();
228
229      $scope.find('form').validate({
230        debug: true,
231        submit: {
232          settings: {
233            inputContainer: ".FDS",
234            allErrors: true,
235            trigger: null,
236            errorListClass: '',
237            errorListContainer: '.validation_msg'
238          },
239          callback: {
240            onInit: function () {
241              //console.log('초기화');
242            },
243            onValidate: function (node) {
244              var v = '', e;
245              if (node.attr('id') == 'sinmoongo_form' || node.attr('id') == 'qa_form') {
246                e = node.find('#inform_content');
247                v = e.val();
248                if (v.indexOf('http://') != -1 || v.indexOf('https://') != -1) {
249                  e.next().text('내용에 URL을 포함할 수 없습니다.').end().closest('.FDS').addClass('error');
250                  if (node.attr('id') == 'sinmoongo_form') {
251                    node.addError({ "inputName": "inform_content" });
252                  } else {
253                    node.addError({ "inputName": "content" });
254                  }
255                } else {
256                  e.next().text('').end().closest('.FDS').removeClass('error');
257                }
258              }
259            },
260            onSubmit: function (node) {
261              if (node.attr('id') == 'investor_search_form') {
262                /* Written by SP Hong */
263                //window.investor.getDataEX(node.serialize());
264                window.investor.getDataEX();
265              } else {
266                if (node.attr('id') == 'sinmoongo_form' || node.attr('id') == 'qa_form') {
267                  if (grecaptcha.getResponse() == '') {
268                    $('#g-recaptcha-wrap').addClass('error');
269                    return false;
270                  } else {
271                    $('#g-recaptcha-wrap').removeClass('error');
272                  }
273                  if (node.find('#inform_content').closest('.FDS').hasClass('error') == true) {
274                    return false;
275                  }
276                }
277                node.get(0).submit();
278              }
279            }
280          }
281        }
282      });
283    }
284  };
285
286  function _setPlayMain() {
287    var main = _main;
288    main.scope = $doc.find('#main');
289    main.scene_wrap = main.scope.find('.scene_wrap');
290    main.scene = main.scene_wrap.find('.scene');
291    main.scene_1_txt = main.scene_wrap.find('#scene_1_txt');
292    main.graphic = main.scope.find('.graphic');
293    main.nav = main.scope.find('#main_nav').find('a').hide();
294    main.sw = main.scene_wrap.width() + 60;
295    main.sh = $win.height();
296    main.sequence = 0;
297    main.outro = 0;
298    main.is_mobile = false;
299    main.is_init = false;
300    main.mobile_sequence = 0;
301
302    main.pos = [
303      ['-13%', '50.2%', '20%', '120%', '50%', '200%'],
304      ['35%', '0%', '20%', '30%', '-3%', '85%', '-25%', '140%'],
305      ['100%', '0%', '83%', '30%', '100%', '0%'],
306      ['30%', '100%', '75%', '15%', '100%', '-25%'],
307      ['60%', '-150%', '6%', '0%'],
308      ['32%', '160%', '50%', '100%'],
309      ['-13%', '50.2%', '-40%', '100%']
310    ];
311
312    main.scene.on('click', function () {
313      if ($(this).attr('href')) {
314        location.href = $(this).attr('href');
315      }
316    });
317
318    main.mobile = $doc.find('#main_mobile');
319    main.mobile_bg = main.mobile.find('.bg');
320    main.mobile_txt = main.mobile.find('.txt');
321
322    main.mobile_tl_bg = new TimelineMax({ repeat: -1, repeatDelay: 3 });
323    main.mobile_tl_bg.add(TweenLite.to(main.mobile_bg, 1.7, { ease: Power3.easeInOut, delay: 2.8, left: 0 }));
324    main.mobile_tl_bg.add(TweenLite.to(main.mobile_bg, 1.7, { ease: Power3.easeInOut, delay: 2.8, left: '-100%' }));
325    main.mobile_tl_bg.add(TweenLite.to(main.mobile_bg, 1.7, { ease: Power3.easeInOut, delay: 2.8, left: '-200%' }));
326    main.mobile_tl_bg.add(TweenLite.to(main.mobile_bg, 1.7, { ease: Power3.easeInOut, delay: 2.8, left: '-300%' }));
327    main.mobile_tl_bg.add(TweenLite.to(main.mobile_bg, 1.7, { ease: Power3.easeInOut, delay: 5.8, left: '-400%' }));
328
329    main.mobile_tl_txt = new TimelineMax({ repeat: -1, repeatDelay: 3 });
330    main.mobile_tl_txt.add(TweenLite.to(main.mobile_txt, 1.5, { ease: Power2.easeInOut, delay: 3, left: 0 }));
331    main.mobile_tl_txt.add(TweenLite.to(main.mobile_txt, 1.5, { ease: Power2.easeInOut, delay: 3, left: '-100%' }));
332    main.mobile_tl_txt.add(TweenLite.to(main.mobile_txt, 1.5, { ease: Power2.easeInOut, delay: 3, left: '-200%' }));
333    main.mobile_tl_txt.add(TweenLite.to(main.mobile_txt, 1.5, { ease: Power2.easeInOut, delay: 3, left: '-300%' }));
334    main.mobile_tl_txt.add(TweenLite.to(main.mobile_txt, 1.5, { ease: Power2.easeInOut, delay: 6, left: '-400%' }));
335
336    if (window.CSSBS_mobile) {
337      main.is_mobile = true;
338      main.scope.remove();
339      main.mobile.show();
340
341      return;
342    }
343
344    $win.on('resize', _responsiveMain).trigger('resize');
345  };
346
347  function _pauseMain() {
348    var main = _main;
349    if (main.is_mobile === false) {
350      clearInterval(main.timer);
351    }
352  };
353
354  function _responsiveMain() {
355    var main = _main;
356    var win = $win;
357
358    if (win.width() < 900) {
359      main.is_mobile = true;
360      main.scope.hide();
361      main.mobile.show();
362      main.mobile_tl_bg.play();
363      main.mobile_tl_txt.play();
364    } else {
365      main.is_mobile = false;
366      main.scope.show();
367      if (main.is_init == false) {
368        _playMain();
369      } else {
370      }
371      main.mobile.hide();
372      main.mobile_tl_bg.pause();
373      main.mobile_tl_txt.pause();
374    }
375
376  };
377
378  function _playMain() {
379    var main = _main, g = main.graphic;
380    var controller = new ScrollMagic.Controller();
381
382    var scene_1 = document.getElementById('scene_1');
383    var scene_2 = document.getElementById('scene_2');
384    var scene_3 = document.getElementById('scene_3');
385
386    var tw_0, tw_1, tw_2, tw_3, tw_4, tw_5, tw_6;
387    var sc_0, sc_1, sc_2, sc_3, sc_4, sc_5, sc_6;
388
389    main.timer = setInterval(_setMainAutoPlay, 5000)
390
391    tw_0 = TweenMax.fromTo(g.get(6), 1, { left: main.pos[6][0], top: main.pos[6][1] }, { left: main.pos[6][2], top: main.pos[6][3], ease: Sine.easeInOut });
392    tw_1 = TweenMax.fromTo(g.get(0), 1, { yPercent: -100, left: main.pos[0][0], top: main.pos[0][1] }, { left: main.pos[0][2], top: main.pos[0][3], ease: Sine.easeInOut });
393    tw_2 = TweenMax.fromTo(g.get(1), 1, { yPercent: -100, left: main.pos[1][0], top: main.pos[1][1] }, { left: main.pos[1][2], top: main.pos[1][3], ease: Sine.easeInOut });
394    tw_3 = TweenMax.fromTo(g.get(2), 1, { yPercent: -100, left: main.pos[2][0], top: main.pos[2][1] }, { left: main.pos[2][2], top: main.pos[2][3], ease: Sine.easeInOut });
395    tw_4 = TweenMax.fromTo(g.get(3), 1, { left: main.pos[3][0], top: main.pos[3][1] }, { left: main.pos[3][2], top: main.pos[3][3], ease: Sine.easeInOut });
396    tw_5 = TweenMax.fromTo(g.get(4), 1, { left: main.pos[4][0], top: main.pos[4][1] }, { left: main.pos[4][2], top: main.pos[4][3], ease: Sine.easeInOut });
397    tw_6 = TweenMax.fromTo(g.get(5), 1, { yPercent: -100, left: main.pos[5][0], top: main.pos[5][1] }, { left: main.pos[5][2], top: main.pos[5][3], ease: Sine.easeInOut });
398
399    sc_0 = new ScrollMagic.Scene({ triggerElement: scene_1, duration: main.sh, triggerHook: 0 }).setTween(tw_0).addTo(controller);
400    sc_1 = new ScrollMagic.Scene({ triggerElement: scene_1, duration: main.sh, triggerHook: 0 }).setTween(tw_1).addTo(controller);
401    sc_2 = new ScrollMagic.Scene({ triggerElement: scene_1, duration: main.sh, triggerHook: 0 }).setTween(tw_2).addTo(controller);
402    sc_3 = new ScrollMagic.Scene({ triggerElement: scene_1, duration: main.sh, triggerHook: 0 }).setTween(tw_3).addTo(controller);
403    sc_4 = new ScrollMagic.Scene({ triggerElement: scene_2, duration: main.sh, triggerHook: 0 }).setTween(tw_4).addTo(controller);
404    sc_5 = new ScrollMagic.Scene({ triggerElement: scene_3, duration: main.sh, triggerHook: 0 }).setTween(tw_5).addTo(controller);
405    sc_6 = new ScrollMagic.Scene({ triggerElement: scene_3, duration: main.sh, triggerHook: 0 }).setTween(tw_6).addTo(controller);
406
407    //.addIndicators()
408
409    main.controller = controller;
410
411    sc_1.on('enter', function (event) { main.nav.removeClass('current').eq(0).addClass('current'); main.sequence = 0; });
412    sc_4.on('enter', function (event) { main.nav.removeClass('current').eq(1).addClass('current'); main.sequence = 1; });
413    sc_5.on('enter', function (event) { main.nav.removeClass('current').eq(2).addClass('current'); main.sequence = 2; });
414    sc_5.on('leave', function (event) {
415      if (event.scrollDirection == 'FORWARD') {
416        main.nav.removeClass('current').eq(3).addClass('current');
417        main.sequence = 3;
418      }
419    });
420
421    sc_3.on('end', function (event) { if (event.state == 'AFTER') { _setSceneOutro(1); } });
422    sc_4.on('end', function (event) { if (event.state == 'AFTER') { _setSceneOutro(2); } });
423
424    controller.scrollTo(function (newpos) { TweenMax.to(window, 0.8, { scrollTo: { y: newpos } }); });
425
426    main.nav.on('click', function (e) {
427      var id = $(this).attr('href');
428      e.preventDefault();
429
430      controller.scrollTo(id);
431
432      main.nav.not($(this).addClass('current')).removeClass('current');
433      /*
434            if (window.history && window.history.pushState) {
435              history.pushState("", document.title, id);
436            }
437      */
438    }).fadeIn().eq(0).trigger('click');
439
440    main.is_init = true;
441
442  };
443
444  function _setMainAutoPlay() {
445    var main = _main;
446    if (main.is_mobile == false) {
447      main.sequence = (main.sequence >= 4) ? 0 : main.sequence + 1;
448      main.nav.eq(main.sequence).trigger('click');
449    }
450  };
451
452  function _setSequence(no) {
453    var main = _main;
454    if (main.is_mobile == false) {
455      main.sequence = no;
456    }
457  };
458
459  function _setSceneOutro(no) {
460    var main = _main, g = main.graphic;
461    var t1, t2, t3;
462    var s1, s2, s3;
463    var scene_2 = document.getElementById('scene_2');
464    var scene_3 = document.getElementById('scene_3');
465
466    if (main.outro > 0 && no == 1) {
467      return;
468    } else if (main.outro == 2 && no == 2) {
469      return;
470    }
471
472    if (no == 1) {
473      t1 = TweenMax.fromTo(g.get(0), 2, { yPercent: -100, left: main.pos[0][2], top: main.pos[0][3] }, { left: main.pos[0][4], top: main.pos[0][5], ease: Sine.easeInOut });
474      t2 = TweenMax.fromTo(g.get(1), 2, { yPercent: -100, left: main.pos[1][2], top: main.pos[1][3] }, { left: main.pos[1][4], top: main.pos[1][5], ease: Sine.easeInOut });
475      t3 = TweenMax.fromTo(g.get(2), 2, { yPercent: -100, left: main.pos[2][2], top: main.pos[2][3] }, { left: main.pos[2][4], top: main.pos[2][5], ease: Sine.easeInOut });
476      s1 = new ScrollMagic.Scene({ triggerElement: scene_2, duration: main.sh, triggerHook: 0 }).setTween(t1).addTo(main.controller);
477      s2 = new ScrollMagic.Scene({ triggerElement: scene_2, duration: main.sh, triggerHook: 0 }).setTween(t2).addTo(main.controller);
478      s3 = new ScrollMagic.Scene({ triggerElement: scene_2, duration: main.sh, triggerHook: 0 }).setTween(t3).addTo(main.controller);
479    } else if (no == 2) {
480      t1 = TweenMax.fromTo(g.get(3), 2, { left: main.pos[3][2], top: main.pos[3][3] }
480, { left: main.pos[3][4], top: main.pos[3][5], ease: Sine.easeInOut });
481      t2 = TweenMax.fromTo(g.get(1), 3, { yPercent: -100, left: main.pos[1][4], top: main.pos[1][5] }, { left: main.pos[1][6], top: main.pos[1][7], ease: Sine.easeInOut });
482      s1 = new ScrollMagic.Scene({ triggerElement: scene_3, duration: main.sh, triggerHook: 0 }).setTween(t1).addTo(main.controller);
483      s2 = new ScrollMagic.Scene({ triggerElement: scene_3, duration: main.sh, triggerHook: 0 }).setTween(t2).addTo(main.controller);
484    }
485
486    main.outro = no;
487  };
488
489  function _setAction(scope) {
490    var $scope = scope || $doc;
491
492    $scope.on('click', '.BT.delete_confirm', function () {
493      if (confirm('삭제하시면 복구할 수 없습니다. 정말 삭제하시겠습니까?')) {
494        if ($('input[name="board_no[]"]').length > 0) {
495
496          if ($(this).attr('href')) {
497            return true
498          }
499
500          var targetList = [];
501
502          $('input[name="board_no[]"]').each(function () {
503            if ($(this).is(':checked') === true) {
504              targetList.push($(this).val());
505            }
506          });
507
508          if (targetList.length === 0) {
509            alert('삭제할 대상을 선택하세요.');
510            return false;
511          }
512
513          var path = window.location.pathname;
514          var pathArray = path.split('/');
515
516          var $csrf = $(this).closest('form').find('[name="csrf_token"]');
517
518          $.post(
519            '/admin/' + pathArray[2] + '/list_delete/',
520            {
521              target: JSON.stringify(targetList),
522              csrf_token: $csrf.val()
523            },
524            function (data) {
525              //console.log( data );
526              $csrf.val(data.csrf_hash);
527              location.reload();
528            }
529          );
530          return false;
531        }
532      } else {
533        return false;
534      }
535    });
536  };
537
538  function _setContact(map, myLatLng) {
539    var scope = $doc.find('#customer');
540    var anchors = scope.find('a');
541    var lists = scope.find('.list');
542    var map = map;
543    var myLatLng = myLatLng;
544
545    var center = null;
546
547    anchors
548      .on('click', { pos: myLatLng, anchors: anchors, lists: lists, map: map }, function (e) {
549        var me = $(this).addClass('FB_L');
550        var targetIdx = me.attr('href');
551        var mapIdx = parseInt(me.attr('idx'));
552        var mapZoom = (mapIdx == 8) ? 2 : 14;
553        var mapCenter = new google.maps.LatLng(e.data.pos[mapIdx]);
554
555        targetIdx = parseInt(targetIdx.charAt(targetIdx.length - 1)) - 1;
556
557        e.data.anchors.not(me).removeClass('FB_L');
558        e.data.lists.hide().eq(targetIdx).show();
559
560        e.data.map.panTo(mapCenter);
561        e.data.map.setZoom(mapZoom);
562      });
563
564    google.maps.event.addDomListener(window, "resize", function () {
565      var mapCenter = map.getCenter();
566      google.maps.event.trigger(map, "resize");
567      map.setCenter(mapCenter);
568    });
569
570  };
571
572  function resizePRVideo() {
573    if (_pr.video == undefined) {
574      _pr.video = $doc.find('#pr_video');
575    }
576
577    _pr.video.height(_pr.video.width() * 0.5625);
578  };
579
580  return {
581    getDocument: function () {
582      return $doc;
583    },
584    setPlayMain: _setPlayMain,
585    setSequence: _setSequence,
586    pauseMain: _pauseMain,
587    setContact: _setContact,
588    bindResizeEventPRVideo: function () {
589      $win.on('resize', resizePRVideo).trigger('resize');
590    }
591  }
592
593})(window.khvatec || {}, jQuery);
594
595Number.prototype.format = function () {
596  if (this == 0) return 0;
597
598  var reg = /(^[+-]?\d+)(\d{3})/;
599  var n = (this + '');
600
601  while (reg.test(n)) n = n.replace(reg, '$1' + ',' + '$2');
602
603  return n;
604};
605
606String.prototype.format = function () {
607  var num = parseFloat(this);
608  if (isNaN(num)) return "0";
609
610  return num.format();
611};
612
613
614// tab
615$(document).ready(function () {
616
617  $('.tab_link').click(function () {
618    var tabid = $(this).attr('data-tab');
619
620    $('.tab_link').removeClass('current');
621    $('.tab_content').removeClass('current');
622
623    $(this).addClass('current');
624    $("#" + tabid).addClass('current');
625  })
626
627});
628
629
630
631
632// go top
633$(document).ready(function () {
634  var speed = 500; // 스크롤속도
635  $(".btn_top").css("cursor", "pointer").click(function () {
636    $('body, html').animate({ scrollTop: 0 }, speed);
637  });
638});
639
640
641
642
643
644/*
645 CSS Browser Selector js v0.5.3 (July 2, 2013)
646
647 -- original --
648 Rafael Lima (http://rafael.adm.br)
649 http://rafael.adm.br/css_browser_selector
650 License: http://choosealicense.com/licenses/mit/
651 Contributors: http://rafael.adm.br/css_browser_selector#contributors
652 -- /original --
653
654 Fork project: http://code.google.com/p/css-browser-selector/
655 Song Hyo-Jin (shj at xenosi.de)
656 */
657function css_browser_selector(e) { var i = e.toLowerCase(), r = function (e) { return i.indexOf(e) > -1 }, t = "gecko", o = "webkit", a = "safari", n = "chrome", s = "opera", d = "mobile", c = 0, l = window.devicePixelRatio ? (window.devicePixelRatio + "").replace(".", "_") : "1", p = [!/
657opera|webtv/.test(i) && /msie\s(\d+)/.test(i) && (c = 1 * RegExp.$1) ? "ie ie" + c + (6 == c || 7 == c ? " ie67 ie678 ie6789" : 8 == c ? " ie678 ie6789" : 9 == c ? " ie6789 ie9m" : c > 9 ? " ie9m" : "") : /edge\/(\d+)\.(\d+)/.test(i) && (c = [RegExp.$1, RegExp.$2]) ? "ie ie" + c[0] + " ie" + c[0] + "_" + c[1] + " ie9m edge" : /trident\/\d+.*?;\s*rv:(\d+)\.(\d+)\)/.test(i) && (c = [RegExp.$1, RegExp.$2]) ? "ie ie" + c[0] + " ie" + c[0] + "_" + c[1] + " ie9m" : /firefox\/(\d+)\.(\d+)/.test(i) && (re = RegExp) ? t + " ff ff" + re.$1 + " ff" + re.$1 + "_" + re.$2 : r("gecko/") ? t : r(s) ? s + (/version\/(\d+)/.test(i) ? " " + s + RegExp.$1 : /opera(\s|\/)(\d+)/.test(i) ? " " + s + RegExp.$2 : "") : r("konqueror") ? "konqueror" : r("blackberry") ? d + " blackberry" : r(n) || r("crios") ? o + " " + n : r("iron") ? o + " iron" : !r("cpu os") && r("applewebkit/") ? o + " " + a : r("mozilla/") ? t : "", r("android") ? d + " android" : "", r("tablet") ? "tablet" : "", r("j2me") ? d + " j2me" : r("ipad; u; cpu os") ? d + " chrome android tablet" : r("ipad;u;cpu os") ? d + " chromedef android tablet" : r("iphone") ? d + " ios iphone" : r("ipod") ? d + " ios ipod" : r("ipad") ? d + " ios ipad tablet" : r("mac") ? "mac" : r("darwin") ? "mac" : r("webtv") ? "webtv" : r("win") ? "win" + (r("windows nt 6.0") ? " vista" : "") : r("freebsd") ? "freebsd" : r("x11") || r("linux") ? "linux" : "", "1" != l ? " retina ratio" + l : "", "js portrait"].join(" "); return window.jQuery && !window.jQuery.browser && (window.jQuery.browser = c ? { msie: 1, version: c } : {}), p } !function (e, i) { var r = css_browser_selector(navigator.userAgent), t = e.documentElement; t.className += " " + r; var o = r.replace(/^\s*|\s*$/g, "").split(/ +/); i.CSSBS = 1; for (var a = 0; a < o.length; a++)i["CSSBS_" + o[a]] = 1; var n = function (i) { return e.documentElement[i] || e.body[i] }; i.jQuery && !function (e) { function r() { if (0 == m) { try { var e = n("clientWidth"), i = n("clientHeight"); if (e > i ? u.removeClass(a).addClass(s) : u.removeClass(s).addClass(a), e == b) return; b = e } catch (r) { } m = setTimeout(o, 100) } } function o() { try { u.removeClass(w), u.addClass(360 >= b ? d : 640 >= b ? c : 768 >= b ? l : 1024 >= b ? p : "pc") } catch (e) { } m = 0 } var a = "portrait", s = "landscape", d = "smartnarrow", c = "smartwide", l = "tabletnarrow", p = "tabletwide", w = d + " " + c + " " + l + " " + p + " pc", u = e(t), m = 0, b = 0; i.CSSBS_ie ? setInterval(r, 1e3) : e(i).on("resize orientationchange", r).trigger("resize"), e(i).load(r) }(i.jQuery) }(document, window);

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.