PageSourceSearch

https://www.hwgeneralins.com/js/common.js

js hwgeneralins.com collected 2026-10-01 15:36:07 UTC 49,758 bytes, 1,522 lines download raw bytes

1/* **********************************************
2 * 네임스페이스 생성
3*********************************************** */
4;(function(window, $){
5	'use strict';
6
7	var global = "$utils", nameSpace = "HANWHA.utils", nameSpaceRoot = null;
8
9	function createNameSpace(identifier, module){
10		var win = window, name = identifier.split('.'), p, i = 0;
11
12		if(!!identifier){
13			for (i = 0; i < name.length; i += 1){
14				if(!win[ name[ i ] ]){
15					if(i === 0){
16						win[ name[ i ] ] = {};
17						nameSpaceRoot = win[ name[ i ] ];
18					} else {
19						win[ name[ i ] ] = {};
20					}
21				}
22				win = win[ name[ i ] ];
23			}
24		}
25		if(!!module){
26			for (p in module){
27				if(!win[ p ]){
28					win[ p ] = module[ p ];
29				} else {
30					throw new Error("module already exists! >> " + p);
31				}
32			}
33		}
34		return win;
35	}
36
37	if(!!window[ global ]){
38		throw new Error("already exists global!> " + global);
39	}
40
41	/* ---------------------------------------------------------------------------
42		namespace HANWHA.utils
43
44		* 네임스페이스 생성
45		* method namespace
46		* memberof HANWHA.utils
47		* param {Object} identifier 구분자
48		* param {Object} module 네임스페이스 하위로 생성 할 객체
49		* return createNameSpace
50		* example
51
52			$utils.namespace('a.b.c', {
53				functionA: function(){
54					console.log("call a!");
55				},
56				functionB: function {
57					console.log("call b!");
58				}
59			});
60
61			a.b.c.functionA(); // call a!
62			a.b.c.functionB(); // call b!
63	--------------------------------------------------------------------------- */
64	window[ global ] = createNameSpace(nameSpace, {
65		namespace : function(identifier, module){
66			return createNameSpace(identifier, module);
67		}
68	});
69})(window, jQuery);
70
71var ui;
72
73/* **********************************************
74 * HANWHA.common
75*********************************************** */
76;(function(window, $) {
77	'use strict';
78	/* ui script 초기화
79		@memberof HANWHA.common
80	*/
81	ui = $utils.namespace('HANWHA.common', {
82		/* 레이아웃 : GNB ***************************************************** */
83		navGnb : function(){
84			var $nav = $('#uiNavGnb');
85			var $nav_menu = $nav.find('> li');
86			var $nav_menu_el = $nav.find('> li > a');
87			var $nav_menu_sub = $nav.find('> li ul a');
88			var $nav_menu_area1 = $nav.find('.sub_area');
89			var $nav_menu_area2 = $('.banner_gnb');
90			var $nav_timer = null;
91			var $nav_index = null;
92			var $sitemap = $('#uiSitemap');
93
94			//빈노드삭제
95			$nav.find("ul").each(function(){
96				if($(this).find('>li').length<1){
97					$(this).remove();
98				}
99			});
100
101			//1차메뉴 이벤트설정
102			$nav_menu_el
103				.on("focus mouseover", function() {
104					if(!$sitemap.hasClass('open') && !$('#uiSectionSearch').hasClass('open')){
105						clearTimeout($nav_timer);
106						$nav.removeClass("menu_on"+($nav_index+1));
107						$nav_index = $nav_menu_el.index($(this));
108						$nav.addClass("open");
109						$nav.addClass("menu_on"+($nav_index+1));
110						$nav_menu.removeClass('on');
111						$(this).parent('li').addClass('on');
112					}
113				})
114				.on("blur mouseout", function() {
115					setGnbTimer();
116				});
117			
118			//2차메뉴 이하 이벤트 설정
119			$nav_menu_sub
120				.on("focus", function() {
121					clearTimeout($nav_timer);
122				})
123				.on("blur", function() {
124					setGnbTimer();
125				});
126
127			//GNB기타영역
128			$nav_menu_area1
129				.on("mouseover", function() {
130					clearTimeout($nav_timer);
131				})
132				.on("mouseout", function() {
133					setGnbTimer();
134				});
135
136			$nav_menu_area2
137				.on("focus mouseover", function() {
138					clearTimeout($nav_timer);
139				})
140				.on("blur mouseout", function() {
141					setGnbTimer();
142				});
143
144			//GNB 닫기기능
145			function setGnbTimer(){
146				$nav_timer = setTimeout(function(){
147					$nav_menu.removeClass('on');
148					$nav.removeClass("open");
149					$nav.removeClass("menu_on"+($nav_index+1));
150					$nav_index = null;
151				},50);
152			}
153		},
154		/* 레이아웃 : TNB / TOP버튼 ***************************************** */
155		navTnb : function(){
156			//TNB : 기본설정
157			$('#aside').addClass('on');
158			var $nav = $('#aside .linemap .select_list');
159			var $nav_menu = $nav.find('a');
160			var $nav_timer = null;
161
162			$nav.each(function(){
163				$plugin.selectlist($(this));
164			});
165
166			//TNB : 이벤트설정
167			$nav_menu.on("focus mouseover", function() {
168				clearTimeout($nav_timer);
169				$(this).parents('ul').eq(0).find('>li > a').removeClass('active');
170				$(this).addClass('active');
171			});
172
173			$nav_menu.on("blur mouseout", function() {
174				$nav_timer = setTimeout(function(){
175					$nav_menu.removeClass('active');
176					$('.select_on').removeClass('select_on');
177				},400);
178			});
179
180			/* TNB : 확대축소 */
181			var $btn_zoom1 = $('#uiZoomBtn1');
182			var $btn_zoom2 = $('#uiZoomBtn2');
183			var $zoom_text = $('#uiZoomText');
184			var $zoom_cnt = 5;
185			var $zoom_value = new Array("75%","80%","85%","90%","95%","100%","105%","110%","115%","120%","125%","130%","135%","140%","145%","150%");
186
187			$btn_zoom1.on("click", function() {
188				resetZoomDoc(true);
189			});
190
191			$btn_zoom2.on("click", function() {
192				resetZoomDoc(false);
193			});
194
195			function resetZoomDoc(modevalue){
196				if(modevalue){
197					$zoom_cnt ++;
198					if($zoom_cnt>=$zoom_value.length){
199						$zoom_cnt = $zoom_value.length-1;
200						alert("150% 초과 비율은 제한됩니다.");
201					}
202				}else{
203					$zoom_cnt --;
204					if($zoom_cnt<0){
205						$zoom_cnt = 0;
206						alert("75% 미만 비율은 제한됩니다.");
207					}
208				}
209
210				if($.browser.className=="msie8"){
211					document.body.style.zoom = $zoom_value[$zoom_cnt];
212					$zoom_text.text($zoom_value[$zoom_cnt].replace('%',''));
213				}else{
214					for(var i in $zoom_value){
215						$('body').removeClass("zoom"+$zoom_value[i].replace('%',''));
216					}
217					$('body').addClass("zoom"+$zoom_value[$zoom_cnt].replace('%',''));
218					$zoom_text.text($zoom_value[$zoom_cnt].replace('%',''));
219				}
220			}
221		},
222		/* 레이아웃 : 퀵메뉴 / TOP버튼 ************************************** */
223		navQuick : function(){
224			var $btn_top = $('#asideQuick .nav_top');
225
226			$(document).on("click",'.btn_top',function(e){
227				e.preventDefault();
228				$('html,body').animate({scrollTop : $($(this).attr('href')).offset().top},200);
229			});
230
231			$(window).on('scroll resize',function(e){
232				if($(window).scrollTop() >= $(document).outerHeight(true) - $(window).outerHeight(true) - ($('#footer').outerHeight(true))){
233					var new_position = $('#footer').outerHeight(true) - ($(document).outerHeight(true) -  ($(window).scrollTop() + $(window).outerHeight(true))) + 16;
234					$btn_top.css({
235						'bottom' : new_position
236					});
237
238					if($('.nav_mymenu').length>0){
239						if(new_position + $btn_top.outerHeight() >= $(window).height() - $('.nav_mymenu').position().top - $('.nav_mymenu').outerHeight()) $btn_top.addClass("off");
240						else $btn_top.removeClass("off");
241					}
242				}else{
243					$btn_top.css({ 'bottom' : 20}).removeClass('off');
244				}
245			});
246
247			/* 퀵메뉴 토글기능 */
248			$plugin.togglecon($('.nav_mymenu dt'),{
249				toggle_type : 'toggle',
250				selector_group : true,
251				selector_btn: '>a',
252				selector_con: 'dd',
253				callback_before : function(){
254					$('.nav_mymenu').addClass('open');
255				},
256				callback_after : function(){
257					if($('.nav_mymenu dt.on').length<1){
258						$('.nav_mymenu').removeClass('open');
259					}
260				}
261			});
262		},
263		/* 레이아웃 : 상단고정 *********************************************** */
264		scrollFixed : function(){
265			var $base_position = 0;
266			var $base_scroll = $('#header').height();
267			var $base_height = 0;
268			var $sub_position = 0;
269			var $sub_el = $('.page_submain .section_visual').eq(0);
270
271			if($('#container').length) $base_position = $('#container').offset().top;
272
273			scrollReposition();
274
275			$(window).on('scroll',function(e){
276				scrollReposition();
277			});
278
279			function scrollReposition(){
280				//브라우저스크롤 발생시 : scroll 클래스
281				if($(window).scrollTop() >= $base_scroll){
282					$('body').addClass('scroll');
283				}else{
284					$('body').removeClass('scroll');
285				}
286
287				//TNB 상단위치시 : scrolling 클래스
288				if($('#container').length){
289					if($('#wrapper').hasClass('scrolling')){
290						if($(window).scrollTop() <= $base_position){
291							$('#wrapper').removeClass('scrolling');
292						}
293					}else{
294						//if($(window).scrollTop() >= $('#aside').outerHeight() + $('#aside').offset().top){
295						if($(window).scrollTop()> $('#header').outerHeight(true) && $(window).scrollTop() >= $('#container').offset().top){
296							$base_position = $('#container').offset().top;
297							//$('#header .logo').css({"opacity":0}).animate({opacity : 1},500);
298
299							$('#wrapper').addClass('scrolling');
300							/*
301							$('#aside').stop().css({'marginTop' : -$('#aside').outerHeight()/2}).animate({
302								marginTop : 0
303							},400);
304							*/
305						}
306					}
307				}
308
309				//서브메인 비주얼영역 기준 스크롤: fixedscroll 클래스
310				if($('#content').hasClass("page_submain")){
311					if($('#wrapper').hasClass('fixedscroll')){
312						if($(window).scrollTop() <= $sub_position){
313							$('#wrapper').removeClass('fixedscroll');
314						}
315					}else{
316						if($(window).scrollTop() >= $sub_el.offset().top + $sub_el.outerHeight(true)){
317							$sub_position = $sub_el.offset().top + $sub_el.outerHeight(true);
318							$('#wrapper').addClass('fixedscroll');
319						}
320					}
321				}
322			}
323
324			$(document).on("click",'.list_navi a',function(e){
325				e.preventDefault();
326				ui.targetScroll($($(this).attr('href')));
327			});
328		},
329		/* 테이블 summary 설정 ********************************************* */
330		setTableSummary : function(){
331			$("table").each(function() {
332				var $this    = $(this),
333					thText   = "",
334					count    = 0,
335					thLength = $this.find("th").length,
336					thList = null;
337				
338
339				if( !$this.hasClass("ui_summary_on") ) {
340
341					if($this.find('thead').length>0){
342						thList = $this.find("thead th");
343					}else{
344						thList = $this.find("th");
345					}
346					thList.each(function() {
347						var $this = $(this);
348						count += 1;
349						thText += $this.text() + ( thLength === count ? "": ", " );
350					});
351
352					$this.attr("summary", $this.find('caption').eq(0).text()+"("+thText+")").addClass("ui_summary_on");
353				}
354			});
355		},
356		/* 폼객체 : 셀렉트박스 디자인 **************************************** */
357		selectBoxCall : function(){
358			$('.select_list:not(.link), .select_list2:not(.link) ').each(function(){
359				if(!$(this).attr("id")){
360					$plugin.selectlist($(this),{
361						selectType : 'form',
362						selectEvent : 'button'
363					});
364				}
365			});
366
367			$('.select_list.link, .select_list2.link').each(function(){
368				if(!$(this).attr("id")){
369					$plugin.selectlist($(this));
370				}
371			});
372		},
373		/* 폼객체 :  placeholder 기능 : 타이틀형 ****************************** */
374		setPlaceholder : function(){
375			$('.placeholder').each(function(){
376				if($(this).val()=="" || $(this).val()==$(this).attr("title")){
377					$(this).val($(this).attr("title"));
378					$(this).addClass("holder_on");
379				}
380			});
381
382			$(document).on('blur', '.placeholder', function(){
383				if($(this).val()==$(this).attr("title") || $(this).val()==""){
384					$(this).val($(this).attr("title"));
385					$(this).addClass("holder_on");
386				}
387			});
388
389			$(document).on('focus', '.placeholder:not([readonly="readonly"])', function(){
390				if($(this).val()==$(this).attr("title")){
391					$(this).val("");
392					$(this).removeClass("holder_on");
393				}
394			});
395		},
396		/* 폼객체 :  placeholder 기능 : label형 ******************************** */
397		setFormholder : function(){
398			$('.placetext').each(function(){
399				if($(this).val()!="") $(this).addClass("valueon");
400				else $(this).removeClass("valueon");
401			});
402			$(document).on('focus click', 'input.placetext, textarea.placetext', function(){
403				if($(this).val()=="") $(this).addClass("labelon");
404				else $(this).addClass("valueon");
405			})
406			.on('keyup change', 'input.placetext, textarea.placetext', function(){
407				if($(this).val()==""){
408					$(this).removeClass("valueon");
409				}
410				else{
411					$(this).addClass("valueon");
412					$(this).addClass("labelon");
413				}
414			})
415			.on('blur', 'input.placetext, textarea.placetext', function(){
416				if($(this).val()==""){
417					$(this).removeClass("valueon");
418					$(this).removeClass("labelon");
419				}
420				else{
421					$(this).addClass("valueon");
422					$(this).addClass("labelon")
423				}
424			})
425
426			$(document).on('click', '.form_holder > label', function(){
427				$('#'+$(this).attr('for')).focus();
428			});
429		},
430		/* 폼객체 : 파일업로드 디자인 **************************************** */
431		selFormFile : function(){
432			$('input[type="file"]').each(function(){
433				if($.browser.name=="firefox"){
434					$('label[for="'+$(this).attr("id")+'"]').unbind("click.hanwha").bind("click.hanwha",function(){
435						$("#"+$(this).attr("for")).trigger("click");
436					});
437				}
438			});
439			$('input[type="file"]')
440				.unbind("change.hanwha").bind("change.hanwha", function() {
441					if($(this).val()) $('label[for="'+$(this).attr("id")+'"]').addClass("on");
442					else $('label[for="'+$(this).attr("id")+'"]').removeClass("on");
443					$(this).next(".name").text($(this).val());
444				});
445		},
446		/* 폼객체 : 라디오,체크박스 : IE8이하 디버깅용 *********************** */
447		setFormCheck : function(){
448			$('input:checked').parent('label').addClass('on');
449			$('input:not(:checked)').parent('label').removeClass('on');
450
451			$('input:disabled').parent('label').removeClass('on').addClass('disabled');
452			$('input:not(:disabled)').parent('label').removeClass('disabled');
453
454			$(document).on('click', 'input[type="radio"], input[type="checkbox"]', function(){
455				var $that = $(this);
456				if ($that.is('input[type="checkbox"]')) {
457					if($that.prop('checked')) $that.parent().addClass('on');
458					else $that.parent().removeClass('on');
459				} else if ($that.is('input[type="radio"]')) {
460					$('input[name="'+ $that.attr('name') +'"]').each(function() {
461						if (this == $that[0]) $(this).parent().addClass('on');
462						else $(this).parent().removeClass('on');
463					});
464				}
465			})
466			.on('focus', 'input[type="radio"], input[type="checkbox"]', function() {
467				$(this).parent().addClass('focus');
468			})
469			.on('blur', 'input[type="radio"], input[type="checkbox"]', function() {
470				$(this).parent().removeClass('focus');
471			});
472		},
473		/* 폼객체 : 스크롤박스디자인 ***************************************** */
474		customScrollbar : function(){
475			//세로스크롤
476			var $targets = $(".custom-scroll");
477
478			$targets.each(function() {
479				var $this = $(this);
480				$this.mCustomScrollbar({theme:"minimal-dark"});
481			});
482
483			//가로스크롤
484			var $targets2 = $(".wrap_scroll");
485
486			$targets2.each(function() {
487				var $this = $(this);
488				$this.mCustomScrollbar({axis : "x",theme:"minimal-dark"});
489			});
490		},
491		/* 폼객체 : datepicker ************************************************* */
492		setDatepicker : function(){
493			$(".form_date").each(function(){
494				if(!$(this).attr("id")){
495					var $that= $(this);
496					var $buttonText = $that.find(">.hd").text();
497					if($that.find("input.text").length>1){
498						$(this).find("input.text").eq(0).datepicker({
499							dateFormat : "yy.mm.dd",
500							showOn: "button",
501							showOtherMonths : true,
502							showMonthAfterYear : true,
503							showButtonPanel: true,
504							changeYear : true,
505							changeMonth : true,
506							maxDate : "+1y",
507							dayNamesMin : ['일','월','화','수','목','금','토'],
508							monthNamesShort : ['01','02','03','04','05','06','07','08','09','10','11','12'],
509							buttonText : $buttonText+" 검색시작일 달력으로 선택<span></span>",
510							onClose: function( selectedDate ) {
511								$that.find("input.text").eq(1).datepicker( "option", "minDate", selectedDate );
512								$(this).removeClass("blank");
513							}
514						});
515						$(this).find( "input.text").eq(1).datepicker({
516							dateFormat : "yy.mm.dd",
517							showOn: "button",
518							showOtherMonths : true,
519							showMonthAfterYear : true,
520							showButtonPanel: true,
521							changeYear : true,
522							changeMonth : true,
523							maxDate : "+1y",
524							dayNamesMin : ['일','월','화','수','목','금','토'],
525							monthNamesShort : ['01','02','03','04','05','06','07','08','09','10','11','12'],
526							buttonText : $buttonText+"검색종료일 달력으로 선택<span></span>",
527							onClose: function( selectedDate ) {
528								$that.find("input.text").eq(0).datepicker( "option", "maxDate", selectedDate );
529								$(this).removeClass("blank");
530							}
531						});
532					}else{
533						$that.find("input.text").eq(0).datepicker({
534							dateFormat : "yy.mm.dd",
535							showOn: "button",
536							showOtherMonths : true,
537							showMonthAfterYear : true,
538							showButtonPanel: true,
539							changeYear : true,
540							changeMonth : true,
541							yearRange : "1900 : 2026",
542							maxDate : "+1y",
543							dayNamesMin : ['일','월','화','수','목','금','토'],
544							monthNamesShort : ['01','02','03','04','05','06','07','08','09','10','11','12'],
545							buttonText : $buttonText+" 달력으로 선택<span></span>"
546						});
547					}
548				}
549			});
550		},
551		/* 폼객체 : 선택값에 의한 디스플레이 설정 ************************** */
552		formDisplayControl : function(obj){
553			var form_el = obj;
554			if(obj.eq(0).prop("type")=="radio"){
555				$(document).on("click", form_el, function(event) {
556					$('[class*="ui_'+form_el.prop("name")+'_"]').removeClass('on');
557				
558					form_el.each(function(){
559						if($(this).prop("checked")){
560							$('.ui_'+$(this).prop("name")+'_'+$(this).val()).addClass('on');
561						}
562					});
563				});
564			}else{
565				$(document).on("click", form_el, function(event) {
566					if($(this).prop("checked")){
567						$('.ui_'+$(this).prop("name")+'_'+$(this).val()).addClass('on');
568					}else{
569						$('.ui_'+$(this).prop("name")+'_'+$(this).val()).removeClass('on');
570					}
571				});
572			}
573		},
574		/* 스크롤 : 객체영역 스크롤이동 ************************************* */
575		targetScroll : function(obj){
576			$('html,body').animate({scrollTop : obj.offset().top - 50},300);
577		},
578		/* 레이어 : 툴팁호출 ************************************************** */
579		setTooltip : function(){
580			$(".pop_tooltip").each(function(){
581				$plugin.popmodal($('#'+$(this).attr('id')),{
582					position_target : true,
583					overlay : false,
584					modal_type : 'tooltip'
585				});
586			});
587
588			$(".ui_pop_autocall").each(function(){
589				$plugin.popmodal($('#'+$(this).attr('id')));
590			});
591
592			$plugin.togglecon($('.wrap_tooltip'),{
593				selector_btn : 'dt > a',
594				selector_close : '.ui-close'
595			});
596		},
597		/* init reload : 동적생성 컨텐츠중 재호출이 필요한 함수 *************/
598		initReload : function(){
599			ui.customScrollbar();
600			ui.setDatepicker();
601			ui.setFormCheck();
602			ui.setPlaceholder();
603			ui.setFormholder();
604		},
605		/* ui.init ************************************************************* */
606		init: function() {
607			/* body addClass : css디버깅용 */
608			if($.browser.name == 'msie'){
609				$('body').addClass("msie "+$.browser.className);
610			} else {
611				$('body').addClass($.browser.name);
612			}
613			ui.navQuick();
614			ui.scrollFixed();
615			ui.setDatepicker();
616			ui.setTableSummary();
617			ui.selectBoxCall();
618			ui.customScrollbar();
619			ui.setPlaceholder();
620			ui.setFormholder();
621			ui.selFormFile();
622			ui.setFormCheck();
623			ui.setTooltip();
624			//가이드용
625			if($("#header").children().length<1){
626				ui.navTnb();
627			}
628		}
629	});
630	$(document).ready(ui.init);
631} )(window, jQuery);
632
633/* **********************************************
634 * PLUGIN [popmodal]
635 * 레이어팝업
636*********************************************** */
637;(function(window, $){
638	'use strict';
639	var short = '$plugin';
640
641	window[short] = window['$utils'].namespace('HANWHA.plugins', {
642		popmodal : function(element, options){
643			var version = "0.0.1",
644				pluginName = "publish.popmodal",
645				methods = {},
646				el = element,
647				el_idvalue = element.attr('id'),
648				el_ev = $('[href="#'+el_idvalue+'"]'),
649				length = el.size(),
650				pops = [],
651				popmodals,
652				defaults = {
653					overlay : true,
654					overlay_fixed : false,
655					overlay_click : false,
656					class_overlay : "modal_overlay",
657					class_open : "open",
658					selector_close : '.ui-close',
659					selector_return : false,
660					position_top : null,
661					position_target : false,
662					position_auto : true,
663					load_display : false,
664					load_img : false,
665					load_animation : false,
666					load_only : false,
667					load_only_expect : false,
668					scroll_doc : true,
669					auto_focus : true,
670					modal_type : "modal",
671					callback_before: null,
672					callback_load : null,
673					callback_after: null
674				};
675
676			if (length < 1) return;
677			if (length > 1){
678				el.each(function(i, tar){
679					pops.push(window[short].popmodal($(tar), options));
680				});
681				return pops;
682			}
683			if (el.data(pluginName)) return;
684
685			/* ---------------------------------------------------------------------------
686				popmodal.init : 초기화
687			--------------------------------------------------------------------------- */
688			methods.init = function(){
689				methods.initVars();
690				methods.initEvent();
691				//methods.validation();
692			};
693
694			/* ---------------------------------------------------------------------------
695				popmodal.initVars : 변수선언
696			--------------------------------------------------------------------------- */
697			methods.initVars = function(){
698				el.options = $.extend({}, defaults, options);
699				el.vars = {
700					id : pluginName + "-" + new Date().getTime(),
701					pop : null,
702					pop_ev : null,
703					pop_close : null,
704					popWidth : null,
705					popHeight : null,
706					modal : null,
707					modalTop : null,
708					active : false,
709					overflow : null,
710					docFlag : false
711				};
712			};
713
714			/* ---------------------------------------------------------------------------
715				popmodal.initEvent : 이벤트선언
716			--------------------------------------------------------------------------- */
717			methods.initEvent = function(){
718				el.vars.pop = $("#"+el_idvalue);
719
720				$(document).on("click.popmodal", 'a[href="#'+el_idvalue+'"]', function(event) {
721					event.preventDefault();
722					var href = el_ev.filter("a").attr("href") || el_ev.find("a").attr("href");
723					el.vars.pop_ev = $(this);
724
725					if(el.options.modal_type=="toggle"){
726						if(!methods.display()){
727							if (typeof el.options.callback_before === 'function'){
728								if(!el.options.callback_before.call(el.vars.pop_ev)) return;
729							};
730							methods.pop();
731						}else{
732							el.vars.pop_close.trigger('click');
733						}
734					}else{
735						if(!methods.display()){
736							if (typeof el.options.callback_before === 'function'){
737								if(!el.options.callback_before.call(el.vars.pop_ev)) return;
738							};
739							methods.pop();
740						}
741					}
742				});
743
744				if(el.options.load_display){
745					if (typeof el.options.callback_before === 'function'){
746						if(!el.options.callback_before.call(el.vars.pop_ev)) return;
747					};
748					methods.popCall();
749				}
750			};
751
752			/* ---------------------------------------------------------------------------
753				popmodal.validation :
754			--------------------------------------------------------------------------- */
755			methods.validation = function(){
756			};
757
758			/* ---------------------------------------------------------------------------
759				popmodal.pop : 팝업호출
760			--------------------------------------------------------------------------- */
761			methods.pop = function(){
762				//사이즈
763				el.vars.overflow = $("body").css("overflow");
764				el.vars.popWidth = el.vars.pop.width();
765				el.vars.popHeight = el.vars.pop.height();
766				el.vars.active = true;
767
768				if(el.options.load_only){
769					popmodals.each(function(index){
770						if(popmodals[index]!=el && !popmodals[index].options.load_only_expect){
771							popmodals[index].closeOutput();
772						}
773					});
774				}
775
776				if(el.options.modal_type=="tooltip"){
777					//외부영역 클릭시 닫기
778					$(document).on('click.modalcon', function(e){
779						if(!$(e.target).closest(el.vars.this_btn).length && !$(e.target).closest(el.vars.pop_ev).length) {
780							el.vars.docFlag = true;
781							methods.popHide();
782						}
783					});
784
785					/*
786					popmodals.each(function(index){
787						if(popmodals[index]!=el && popmodals[index].options.modal_type=="tooltip"){
788							popmodals[index].closeOutput();
789						}
790					});
791					**/
792				}
793
794				//팝업오픈
795				methods.popShow();
796
797				//리사이즈
798				$(window).resize(function(){
799					methods.setResize();
800				});
801
802				if(el.options.overlay_fixed){
803					$(window).on("scroll",function(){
804						if (!!el.vars.modal){
805							el.vars.modal.css({ marginTop : $(window).scrollTop()*(-1) });
806						}
807					});
808				}
809
810			};
811			/* ---------------------------------------------------------------------------
812				popmodal.pop : 팝업호출 콜함수
813			--------------------------------------------------------------------------- */
814			methods.popCall = function(){
815				el.vars.pop = el;
816				if(el.options.selector_return) el.vars.pop_ev = $(el.options.selector_return);
817				methods.pop();
818			};
819			/* ---------------------------------------------------------------------------
820				popmodal.popShow : 팝업오픈
821			--------------------------------------------------------------------------- */
822			methods.popShow = function(){
823				if(el.options.load_only_expect){
824					$('body').addClass('ui-banner-open');
825				}
826
827				if(el.options.load_animation){
828					el.vars.pop.delay(10).slideDown(0,function(){
829						$(this).addClass(el.options.class_open);
830					});
831				}else{
832					el.vars.pop.addClass(el.options.class_open);
833				}
834				if(el.vars.pop_ev!=null) el.vars.pop_ev.addClass(el.options.class_open);
835				methods.setResize();
836
837				//모달생성
838				methods.modalCreate();
839
840				//닫기버튼 이벤트 설정
841				if (!!el.options.selector_close){
842					el.vars.pop_close = el.find(el.options.selector_close);
843					if(el.vars.pop_close){
844						if(el.options.auto_focus) el.vars.pop_close.eq(0).focus();
845						else $(el.vars.pop).focus();
846					}
847					el.vars.pop_close.on("click.popmodal", function(event){
848						event.preventDefault();
849						methods.close();
850					});
851				}
852
853				//바닥페이지 스크롤설정
854				if(!el.options.scroll_doc) $('body').on('touchmove.Modal', function(e){e.preventDefault()});
855
856				//이미지컨텐츠 로드후 리사이즈 설정
857				if(el.options.load_img){
858					el.vars.pop.find("img").load(function(){
859						methods.setResize();
860					});
861				}
862
863				//스크롤레이어의 경우 함수호출
864				if(el.vars.pop.find('.content.custom-scroll:not(.mCustomScrollbar)').length>0){
865					el.vars.pop.find('.content.custom-scroll:not(.mCustomScrollbar)').mCustomScrollbar({theme:"minimal-dark"});
866				}
867
868				//콜백함수
869				if (typeof el.options.callback_load === 'function'){
870					el.options.callback_load.call(el.vars.pop);
871				};
872			};
873			/* ---------------------------------------------------------------------------
874				popmodal.setResize : 팝업사이즈설정
875			--------------------------------------------------------------------------- */
876			methods.setResize = function(){
877				if(el.options.position_auto){
878					var browser_width = $(window).width();
879					var browser_height = $(window).height();
880					var layer_width = el.vars.pop.outerWidth();
881					var layer_height = el.vars.pop.outerHeight();
882					var margin_left = Math.floor(layer_width /2) * (-1) + 'px';
883					var position_top = $(window).scrollTop() + ((browser_height-layer_height)/2);
884
885					var margin_left = (-1)*(layer_width/2);
886
887					if(browser_height<=layer_height) position_top = $(window).scrollTop();
888					if(el.options.position_top) position_top  = el.options.position_top + $(window).scrollTop();
889					//position_top  = el.options.position_top;
890
891					if(el.options.position_target){
892						var position_left = el.vars.pop_ev.offset().left;
893
894						if(el.vars.pop_ev.offset().left+el.vars.pop.outerWidth()>$(window).width()){
895							position_left = position_left - ((el.vars.pop_ev.offset().left+el.vars.pop.outerWidth())-$(window).width());
896						}
897
898						el.vars.pop.css({
899							"top" : el.vars.pop_ev.offset().top,
900							//"left" : el.vars.pop_ev.position().left + el.vars.pop_ev.outerWidth(true)
901							"left" : position_left
902						});
903					}else{
904						el.vars.pop.css({
905							"top" : position_top,
906							"marginLeft" : margin_left
907						});
908					}
909				}
910			};
911			/* ---------------------------------------------------------------------------
912				el.close : 외부호출 : 닫기
913			--------------------------------------------------------------------------- */
914			el.closeOutput = function(){
915				methods.popHide();
916			};
917			/* ---------------------------------------------------------------------------
918				el.close : 외부호출 : 열기
919			--------------------------------------------------------------------------- */
920			el.openOutput = function(etarget){
921				if(etarget){
922					if(etarget.tagName=="SPAN") etarget = $(etarget).parent();
923					el.vars.pop_ev = $(etarget);
924				}
925				methods.popCall();
926			};
927			/* ---------------------------------------------------------------------------
928				el.openCheck : 팝업오픈상태
929			--------------------------------------------------------------------------- */
930			el.openCheck = function(){
931				return methods.display();
932			};
933			methods.display = function(){
934				return el.vars.active;
935			};
936			/* ---------------------------------------------------------------------------
937				popmodal.close : 팝업닫기호출
938			--------------------------------------------------------------------------- */
939			methods.close = function(){
940				if (typeof el.options.callback_after === 'function'){
941					el.options.callback_after.call();
942				};
943				methods.popHide();
944			};
945			/* ---------------------------------------------------------------------------
946				popmodal.popHide : 팝업닫기
947			--------------------------------------------------------------------------- */
948			methods.popHide = function(){
949				$(window).off("resize.popmodal");
950
951				if(el.options.load_only_expect){
952					$('body').removeClass('ui-banner-open');
953				}
954
955				if (!!el.vars.pop){
956					if(el.options.load_animation){
957						el.vars.pop.slideUp(function(){
958							$(this).removeClass(el.options.class_open);
959						});
960					}else{
961						el.vars.pop.removeClass(el.options.class_open);
962					}
963					if(el.vars.pop_ev!=null) el.vars.pop_ev.removeClass(el.options.class_open);
964				}
965
966				methods.modalRemove();
967
968				if (!!el.vars.this_close){
969					el.vars.this_close.off("click.popmodal");
970				}
971				el.vars.active = false;
972
973				if(!el.vars.docFlag){
974					if(!!el.vars.pop_ev) el.vars.pop_ev.focus();
975				}else{
976					el.vars.docFlag = false;
977				}
978
979				if(!el.options.scroll_doc) $('body').unbind('touchmove.Modal');
980			};
981			/* ---------------------------------------------------------------------------
982				popmodal.modalCreate : 모달생성
983			--------------------------------------------------------------------------- */
984			methods.modalCreate = function(zindex){
985				if (!!el.options.overlay){
986					var id = el_idvalue + "Overlay";
987					if(!el.vars.modal){
988						var modal_el = $('<div id="' + id + '" class="'+el.options.class_overlay+'"></div>')
989						el.before(modal_el);
990						el.vars.modal = modal_el;
991
992						el.vars.modal = el.vars.modal.css({
993							"width" : $(document).width(),
994							"height" : $(document).height()
995						});
996
997						if(el.options.overlay_fixed){
998							el.vars.modal.css({ marginTop : $(window).scrollTop()*(-1) });
999						}
1000
1001						if(el.options.overlay_click){
1002							el.vars.modal.on("click.popmodal", function(event){
1003								methods.close();
1004							});
1005						}
1006					}
1007				}
1008
1009				if(!el.options.overlay && el.options.overlay_click){
1010					$(document).on('click.popmodal', function(e){
1011						if (!$(e.target).closest(el.vars.pop).length && !$(e.target).closest(el.vars.pop_ev).length) {
1012							methods.close();
1013						}
1014					});
1015				}
1016			};
1017			/* ---------------------------------------------------------------------------
1018				popmodal.modalRemove : 모달삭제
1019			--------------------------------------------------------------------------- */
1020			methods.modalRemove = function(){
1021				if (!!el.vars.modal){
1022					el.vars.modal.off("click.popmodal");
1023					el.vars.modal.remove();
1024					el.vars.modal = null;
1025				}
1026			};
1027
1028			methods.init();
1029
1030			popmodals = $(document).data(pluginName);
1031			if (!popmodals){
1032				popmodals = $([]);
1033			}
1034
1035			if ($.inArray(el, popmodals) === -1){
1036				popmodals.push(el);
1037			}
1038			$(document).data(pluginName, popmodals);
1039			el.data(pluginName, el);
1040			return el;
1041		}
1042	});
1043})(window, jQuery);
1044
1045/* **********************************************
1046 * PLUGIN [togglecon]
1047 * 토글형컨텐츠
1048*********************************************** */
1049;(function(window, $){
1050	'use strict';
1051	var short = '$plugin';
1052
1053	window[short] = window['$utils'].namespace('HANWHA.plugins', {
1054		togglecon : function(element, options){
1055			var version = "0.0.1",
1056				pluginName = "publish.togglecon",
1057				methods = {},
1058				el = element,
1059				length = el.size(),
1060				toggles = [],
1061				togglecons,
1062				defaults = {
1063					toggle_type : 'toggle',
1064					selector : "",
1065					selector_group : false,
1066					selector_btn : '.ui-toggle-btn',
1067					selector_con : '.ui-toggle-con',
1068					selector_close : '.ui-toggle-close',
1069					event_btn : 'click',
1070					doc_event : false,
1071					class_open : "on",
1072					auto_scroll : false,
1073					load_animation : false,
1074					txt_state : false,
1075					txt_state_open : "열기",
1076					txt_state_close : "닫기",
1077					callback_before : null,
1078					callback_after : null
1079				};
1080
1081			if (length < 1) return;
1082			if (length > 1){
1083				el.each(function(i, tar){
1084					toggles.push(window[short].togglecon($(tar), options));
1085				});
1086				return toggles;
1087			}
1088			if (el.data(pluginName)) return;
1089
1090			/* ---------------------------------------------------------------------------
1091				togglecon.init : 초기화
1092			--------------------------------------------------------------------------- */
1093			methods.init = function(){
1094				methods.initVars();
1095				methods.initEvent();
1096			};
1097
1098			/* ---------------------------------------------------------------------------
1099				togglecon.initVars : 변수설정
1100			--------------------------------------------------------------------------- */
1101			methods.initVars = function(){
1102				el.options = $.extend({}, defaults, options);
1103				el.vars = {
1104					this_group : null,
1105					this_wrapper : null,
1106					this_btn : null,
1107					this_con : null,
1108					this_close : null
1109				};
1110			};
1111
1112			/* ---------------------------------------------------------------------------
1113				togglecon.initEvent : 이벤트설정
1114			--------------------------------------------------------------------------- */
1115			methods.initEvent = function(){
1116				el.vars.this_wrapper = el;
1117
1118				/* 포커스 */
1119				if(el.options.event_btn=="focus"){
1120					$(el.find(el.options.selector_btn)).on('focus mouseover', function(event) {
1121						el.vars.this_btn = $(this);
1122						if(el.options.selector_con=="#href") el.vars.this_con = $(this).attr("href");
1123						else el.vars.this_con = el.find(el.options.selector_con);
1124						methods.conShow();
1125					}).on('click', function(event) {
1126						//event.preventDefault();
1127					});
1128
1129					if(!el.options.selector_group){
1130						$(el.find(el.options.selector_btn)).on('blur mouseout', function(event) {
1131							methods.conHide();
1132						});
1133					}
1134				}else{
1135					$(el.find(el.options.selector_btn)).on('click.togglecon', function(event) {
1136						event.preventDefault();
1137						el.vars.this_btn = $(this);
1138
1139						if(el.options.selector_con=="#href"){
1140							el.vars.this_con = $(this).attr("href");
1141						}else{
1142							el.vars.this_con = el.find(el.options.selector_con);
1143						}
1144
1145						if(el.options.toggle_type=="form"){
1146							if($(this).val()=="Y"){
1147								methods.conShow();
1148							}else{
1149								methods.conHide();
1150							}
1151						}else{
1152							if (!el.vars.this_wrapper.hasClass(el.options.class_open) || el.options.toggle_type=="tab") {
1153								methods.conShow();
1154							} else {
1155								methods.conHide();
1156							}
1157						}
1158					});
1159				}
1160
1161				//컨텐츠 내부 닫기기능
1162				if (!!el.options.selector_close){
1163					el.vars.this_close = el.vars.this_wrapper.find(el.options.selector_close);
1164					el.vars.this_close.on("click.togglecon", function(event){
1165						//event.preventDefault();
1166						methods.conHide();
1167						$(el.vars.this_btn).focus();
1168					});
1169				}
1170
1171				if(el.options.txt_state && el.vars.this_wrapper.hasClass(el.options.class_open)){
1172					$(el.find(el.options.selector_btn)).each(function(){
1173						$(this).attr('title',$(this).attr('title').replace(el.options.txt_state_open,el.options.txt_state_close));
1174					});
1175				}
1176				//$(el.find(el.options.selector_btn));
1177			};
1178
1179			/* ---------------------------------------------------------------------------
1180				togglecon.conShow : 열기
1181			--------------------------------------------------------------------------- */
1182			methods.conShow = function(){
1183
1184				if(el.options.selector_group){
1185					//if(el.options.selector){
1186					//	$(el.options.selector).removeClass(el.options.class_open);
1187					//}else{
1188						el.vars.this_wrapper.siblings().removeClass(el.options.class_open);
1189					//}
1190					if(el.options.txt_state){
1191						el.vars.this_wrapper.siblings().find(el.options.selector_btn).each(function(){
1192							$(this).attr('title',$(this).attr('title').replace(el.options.txt_state_close,el.options.txt_state_open));
1193							$(this).html($(this).html().replace(el.options.txt_state_close,el.options.txt_state_open));
1194						});
1195					}
1196				}
1197
1198				if(el.options.load_animation){
1199					el.vars.this_con.delay(10).slideDown(400,function(){
1200						el.vars.this_wrapper.addClass(el.options.class_open);
1201					});
1202				}else{
1203					el.vars.this_wrapper.addClass(el.options.class_open);
1204				}
1205
1206				if (typeof el.options.callback_before === 'function'){
1207					el.options.callback_before.call(el);
1208				};
1209
1210				if(el.options.txt_state){
1211					el.vars.this_btn.attr('title',el.vars.this_btn.attr('title').replace(el.options.txt_state_open,el.options.txt_state_close));
1212					el.vars.this_btn.html(el.vars.this_btn.html().replace(el.options.txt_state_open,el.options.txt_state_close));
1213				}
1214
1215				if(el.options.selector_con=="#href"){
1216					$(el.vars.this_con).addClass(el.options.class_open);
1217					el.vars.this_wrapper.siblings().find(el.options.selector_btn).each(function(){
1218						$($(this).attr('href')).removeClass(el.options.class_open);
1219					});
1220				}
1221
1222				if(el.options.toggle_type=="position"){
1223					if($(el.vars.this_con).hasClass('bottom')){
1224						var position_left = $(el.vars.this_btn).position().left - ($(el.vars.this_con).outerWidth(true)/2) + 5;
1225						var position_top = $(el.vars.this_btn).position().top - ($(el.vars.this_con).outerHeight(true));
1226						//if(position_left<0) position_left = 0;
1227					}else{
1228						var position_left = $(el.vars.this_btn).position().left + $(el.vars.this_btn).outerWidth(true) + 5;
1229						var position_top = $(el.vars.this_btn).position().top;
1230					}
1231					$(el.vars.this_con).css({
1232						left : position_left,
1233						top : position_top
1234					});
1235				}
1236
1237				if(el.options.auto_scroll){
1238					var scroll_value = $(el.vars.this_btn).offset().top - 180;
1239					$('html,body').delay(100).animate({scrollTop : scroll_value},400);
1240				}
1241
1242				//외부영역 클릭시 닫기
1243				if(el.options.doc_event){
1244					$(document).on('click.togglecon', function(e){
1245						if(!$(e.target).closest(el.vars.this_btn).length) {
1246							methods.conHide();
1247						}
1248					});
1249				}
1250			};
1251			/* ---------------------------------------------------------------------------
1252				togglecon.conHide : 컨텐츠닫기
1253			--------------------------------------------------------------------------- */
1254			methods.conHide = function(){
1255
1256				el.vars.this_wrapper.removeClass(el.options.class_open);
1257
1258				if (typeof el.options.callback_after === 'function'){
1259					el.options.callback_after.call(el);
1260				};
1261
1262				if(el.options.txt_state){
1263					el.vars.this_btn.attr('title',el.vars.this_btn.attr('title').replace(el.options.txt_state_close,el.options.txt_state_open));
1264					el.vars.this_btn.html(el.vars.this_btn.html().replace(el.options.txt_state_close,el.options.txt_state_open));
1265				}
1266
1267				if(el.options.selector_con=="#href"){
1268					$(el.vars.this_con).removeClass(el.options.class_open);
1269				}
1270
1271				/*
1272				if (el.vars.this_close){
1273					el.vars.this_close.off("click.togglecon");
1274				}
1275				*/
1276			};
1277
1278			methods.init();
1279
1280			togglecons = $(document).data(pluginName);
1281
1282			if (!togglecons){
1283				togglecons = $([]);
1284			}
1285
1286			if ($.inArray(el, togglecons) === -1){
1287				togglecons.push(el);
1288			}
1289			$(document).data(pluginName, togglecons);
1290			el.data(pluginName, el);
1291			return el;
1292		}
1293	});
1294})(window, jQuery);
1295
1296/***********************************************
1297 * PLUGIN [selectlist]
1298 *셀렉트박스형 목록
1299************************************************/
1300;(function(window, $){
1301	'use strict';
1302	var short = '$plugin';
1303
1304	window[short] = window['$utils'].namespace('HANWHA.plugins', {
1305		selectlist : function(element, options){
1306			var version = "0.0.1",
1307				pluginName = "publish.selectlist",
1308				methods = {},
1309				el = element,
1310				length = el.size(),
1311				toggles = [],
1312				selectlists,
1313				defaults = {
1314					selectType : "link",	//link, form
1315					containerClass : "select_list",
1316					onClass : "select_on",
1317					focusClass : "focus",
1318					headline : ".headline",
1319					headlineDefault : false,
1320					list : "ul",
1321					selectEl : "li",
1322					selectEvent : "a",	//a / button
1323					selectedClass : "selected",
1324					listWidth : 158,
1325					callBack : null,
1326					focusFlag : false
1327				};
1328
1329			if (length < 1) return;
1330			if (length > 1){
1331				el.each(function(i, tar){
1332					selectlists.push(window[short].selectlist($(tar), options));
1333				});
1334				return selectlists;
1335			}
1336			if (el.data(pluginName)) return;
1337
1338			/* ---------------------------------------------------------------------------
1339				selectlist.init : 초기화
1340			--------------------------------------------------------------------------- */
1341			methods.init = function(){
1342				methods.initVars();
1343				methods.initEvent();
1344			};
1345
1346			/* ---------------------------------------------------------------------------
1347				selectlist.initVars : 변수설정
1348			--------------------------------------------------------------------------- */
1349			methods.initVars = function(){
1350				el.options = $.extend({}, defaults, options);
1351				el.vars = {
1352					this_headline : null,
1353					this_list : null,
1354					this_list_option : null,
1355					this_list_option_e : null,
1356					this_form : null
1357				};
1358			};
1359
1360			/* ---------------------------------------------------------------------------
1361				selectlist.initEvent : 이벤트설정
1362			--------------------------------------------------------------------------- */
1363			methods.initEvent = function(){
1364				//기본설정
1365				var $selected_index = 0;
1366
1367				el.vars.this_headline = el.find(el.options.headline).eq(0);
1368				el.vars.this_list = el.find(el.options.list);
1369				el.vars.this_list_option = el.find(el.options.list).find(el.options.selectEl);
1370				el.vars.this_list_option_e = el.find(el.options.list).find(el.options.selectEvent);
1371				el.vars.this_form = el.find('input[type="hidden"]').eq(0);
1372
1373				var default_text = "";
1374
1375				if(el.options.selectType=="form"){
1376					if(el.vars.this_form.val()!="" && el.vars.this_list_option.find('button[name="'+el.vars.this_form.val()+'"]').length >0){
1377						default_text  = el.vars.this_list_option.find('button[name="'+el.vars.this_form.val()+'"]').eq(0).html().split('<span>')[0];
1378						el.vars.this_list_option.find('button[name="'+el.vars.this_form.val()+'"]').eq(0).parent('li').addClass(el.options.selectedClass);
1379					}else{
1380						default_text = "선택";
1381					}
1382				}else{
1383					if(el.vars.this_list.find("."+el.options.selectedClass).length){
1384						$selected_index = el.vars.this_list_option.index(el.vars.this_list.find(el.options.selectEl+"."+el.options.selectedClass));
1385						var default_text = el.vars.this_list_option_e.eq($selected_index).html();
1386					}
1387				}
1388
1389				if(default_text=="") default_text = el.vars.this_headline.text();
1390
1391				//$list.addClass("hidden");
1392
1393				if(el.options.headlineDefault){
1394					el.vars.this_headline.empty().append(el.options.headlineDefault);
1395				}else{
1396					el.vars.this_headline.empty().append(default_text);
1397				}
1398
1399				var maxWidthValue = 0;
1400				el.vars.this_list_option_e.each(function(){
1401					if($(this).outerWidth(true) > maxWidthValue) maxWidthValue = $(this).outerWidth(true);
1402				});
1403				el.css("min-width",maxWidthValue+20);
1404				el.vars.this_list.addClass('hide');
1405
1406				if(el.options.focusFlag) el.vars.this_headline.focus();
1407
1408				//기본 이벤트설정
1409				el.vars.this_headline.unbind();
1410				el.vars.this_headline
1411					.on("click",function(event){
1412						event.stopPropagation();
1413						event.preventDefault();
1414						if(el.hasClass(el.options.onClass)){ methods.conHide(); }
1415						else{ methods.conShow();}
1416					})
1417					.on("focus",function(){el.addClass(el.options.focusClass);})
1418					.on("blur",function(){el.removeClass(el.options.focusClass);});
1419
1420				$(document).on('click', function() {
1421					if(el.hasClass(el.options.onClass)){ methods.conHide(); }
1422				});
1423
1424				//$list.css("min-width",el.options.listWidth+"px");
1425				if($.browser.className=="msie7"){ el.vars.this_list_option_e.css("width", el.options.listWidth-(el.vars.this_list_option_e.outerWidth()-el.vars.this_list_option_e.width())); }
1426
1427				//옵션이벤트설정
1428				el.vars.this_list_option_e.unbind();
1429				el.vars.this_list_option_e
1430					.on("click",function(event){
1431						el.vars.this_list_option.removeClass(el.options.selectedClass);
1432						$(this).parent().addClass(el.options.selectedClass);
1433
1434						if(el.options.selectType=="form"){
1435							el.vars.this_headline.empty().append($(this).html());
1436							if(el.vars.this_form.val() != $(this).attr("name")){
1437								el.vars.this_form.val($(this).attr("name"));
1438								el.vars.this_form.attr("title",$(this).html().split(/<span>/i)[0]);
1439								el.vars.this_form.trigger("change");
1440							}
1441						}else{
1442							if($(this).attr('href').indexOf('#none') == -1 && $(this).attr("target")!="_blank"){
1443								//event.preventDefault();
1444								el.vars.this_headline.empty().append($(this).html());
1445							}else{
1446								//el.vars.this_headline.empty().append($(this).html());
1447								return true;
1448							}
1449						}
1450
1451						//selectClose();
1452						if(typeof el.options.callBack === 'function') {
1453							return el.options.callBack.call(this);
1454						}
1455					})
1456					.on("focus mouseover",function(){
1457						el.addClass(el.options.focusClass);
1458						$(this).parent().addClass("focus");
1459					})
1460					.on("blur mouseout",function(){
1461						el.removeClass(el.options.focusClass);
1462						$(this).parent().removeClass("focus");
1463					});
1464			};
1465
1466			/* ---------------------------------------------------------------------------
1467				selectlist.initReload : 이벤트 재설정
1468			--------------------------------------------------------------------------- */
1469			el.reloadOutput = function(){
1470				el.css("min-width","");
1471				methods.initEvent();
1472				//el.vars.this_form.val("");
1473				//el.vars.this_headline.html("선택");
1474			};
1475			el.closeOutput = function(){
1476				methods.conHide();
1477			};
1478			/* ---------------------------------------------------------------------------
1479				selectlist.conShow : 열기
1480			--------------------------------------------------------------------------- */
1481			methods.conShow = function(){
1482
1483				$("."+el.options.onClass).removeClass(el.options.onClass);
1484				selectlists.each(function(index){
1485					if(selectlists[index]!=el){
1486						selectlists[index].closeOutput();
1487					}
1488				});
1489				el.addClass(el.options.onClass);
1490				//$cont.parents(".wrap").addClass("wrap-on");
1491				el.vars.this_list.removeClass("hide");
1492				//selectUlPos();
1493			};
1494			/* ---------------------------------------------------------------------------
1495				selectlist.conHide : 컨텐츠닫기
1496			--------------------------------------------------------------------------- */
1497			methods.conHide = function(){
1498
1499				el.removeClass(el.options.onClass);
1500				el.vars.this_list.addClass("hide");
1501				el.vars.this_list_option_e.removeClass('active');
1502				//$cont.parents(".wrap").removeClass("wrap-on");
1503				//el.vars.this_headline.focus();
1504			};
1505
1506			methods.init();
1507
1508			selectlists = $(document).data(pluginName);
1509
1510			if (!selectlists){
1511				selectlists = $([]);
1512			}
1513
1514			if ($.inArray(el, selectlists) === -1){
1515				selectlists.push(el);
1516			}
1517			$(document).data(pluginName, selectlists);
1518			el.data(pluginName, el);
1519			return el;
1520		}
1521	});
1522})(window, jQuery);

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.