PageSourceSearch

https://snunuclear.net/common/plugin/jquery.shuvic.customTag/jquer…stomTags.shuvic.min.js?serial=1774514425200

js snunuclear.net collected 2026-10-08 08:34:28 UTC 56,231 bytes, 1,506 lines download raw bytes

1var ajaxDuplicate = {
2	"actviceUrls": new Array(),
3	"remove": function ( url ) {
4		if ( this.actviceUrls.length ) {
5			for ( var i = 0; i < this.actviceUrls.length; i++ ) {
6				if ( url == this.actviceUrls[ i ] ) {
7					try {
8						delete this.actviceUrls[ i ];
9					} catch ( e ) {}
10				}
11			}
12		}
13	},
14	"interceptor": function ( url ) {
15		if ( this.actviceUrls.length ) {
16			for ( var i = 0; i < this.actviceUrls.length; i++ ) {
17				if ( url == this.actviceUrls[ i ] ) return false;
18			}
19		}
20		this.actviceUrls.push( url );
21		return true;
22	}
23};
24if ( !global.isMobile ) {
25	$.fn.__tabs = $.fn.tabs;
26	$.fn.tabs = function ( a, b, c, d, e, f ) {
27		var base = location.href.replace( /#.*$/, '' );
28		var $tabs = this;
29		$( 'ul:first>li>a[href^="#"]', this ).each( function () {
30			var href = $( this ).attr( 'href' );
31			$( this ).data( "href", href );
32			$( this ).attr( 'href', base + href );
33			if ( !$( this ).closest( ".ui-dialog" ).length ) {
34				$( this ).click( function ( e ) {
35					e.preventDefault();
36					var params = $tabs.data( "params" );
37					if ( params && params.nonScrollYn ) return;
38					if ( location.href != base + href ) location.href = base + href;
39				} );
40			}
41		} );
42		$( this ).__tabs( a, b, c, d, e, f );
43	};
44}
45window.addEventListener( 'unload', function ( event ) {
46	ajaxDuplicate.actviceUrls = new Array();
47} );
48window.addEventListener( 'beforeunload', function ( event ) {
49	global[ "beforeunload" ] = true;
50} );
51window.addEventListener( 'focus', function ( event ) {
52	if ( global[ "beforeunload" ] ) {
53		global[ "beforeunload" ] = false;
54	}
55} );
56window.onhashchange = function ( e ) {
57	if ( $( ".ui-dialog-content" ).length ) {
58		if ( location.href.indexOf( $( ".ui-dialog-content:last" ).attr( "id" ) ) == -1 ) {
59			$( ".ui-dialog-content:last" ).dialog( "close" );
60		}
61	} else if ( location.href.indexOf( "#TOP_MENU" ) == -1 && $( ".POSITION_CENTER" ).is( ":hidden" ) ) {
62		$( ".navMenuBtn" ).click();
63	}
64};
65var commonErrCdAction = function ( xhr, data ) {
66	if ( xhr.getResponseHeader( "err_cd" ) ) {
67		if ( $( document ).find( "textarea[name='contents.mtext']" ).length ) {
68			$.localStorage.set( 'mtext', $( document ).find( "textarea[name='contents.mtext']" ).val() );
69		}
70		if ( xhr.getResponseHeader( "err_cd" ).match( /^000(2)$/ ) ) {
71			$.loginPop();
72		} else {
73			$.alert( $.base64Decode( global.errCdMsg[ xhr.getResponseHeader( "err_cd" ) ] ) );
74		}
75		return true;
76	}
77	return false;
78};
79/* 로딩 임시 제거 */
80var openLoading = function () {
81	/* if ( !$( ".ui-widget-overlay" ).length ) {
82		$( "body" ).addClass( "AJAX-LOADING" );
83	}
84	if ( global.isMobile ) {
85		if ( !$( "#AJAX_LOADING" ).length ) {
86			$( "body" ).append( '<div id="AJAX_LOADING" class="dp_no"><div class="loading_layer  rel"><div class="loading_letter"><div class="loading_cir"></div><img class="loading_letter2 letter1" src="/common/mobile/css/images/loading/loading2_1.png" /><img class="loading_letter2 letter2" src="/common/mobile/css/images/loading/loading2_2.png" /><img class="loading_letter2 letter3" src="/common/mobile/css/images/loading/loading2_3.png" /><img class="loading_letter2 letter4" src="/common/mobile/css/images/loading/loading2_4.png" /><img class="loading_letter2 letter5" src="/common/mobile/css/images/loading/loading2_5.png" /><img class="loading_letter2 letter6" src="/common/mobile/css/images/loading/loading2_6.png" /><img class="loading_letter2 letter7" src="/common/mobile/css/images/loading/loading2_7.png" /></div></div></div>' );
87		}
88	} else {
89		$( "<div style='text-align:center;'><img src='/common/plugin/jquery.shuvic.customTag/images/loading.gif'></div>" ).attr( "id", "AJAX_LOADING" ).layout( {
90			"title": "loading",
91			"width": 200,
92			"dialogClass": "COMMON_LOADING_DIALOG",
93			"buttons": []
94		} );
95	} */
96};
97var removeLoading = function () {
98	if ( global.isMobile ) {
99		$( "#AJAX_LOADING" ).remove();
100	} else {
101		$( "#AJAX_LOADING" ).dialog( 'close' );
102	}
103	$( "body" ).removeClass( "AJAX-LOADING" );
104};
105$.ajaxSetup( {
106	"method": 'POST',
107	"duplicate": false,
108	"encrypt": true,
109	"contentType": "application/x-www-form-urlencoded; charset=UTF-8",
110	"beforeSend": function ( xhr, opts ) {
111		try {
112			if ( this.dataType == "text" && commonErrCdAction( xhr ) ) {
113				return false;
114			}
115			if ( !ajaxDuplicate.interceptor( opts.url ) && !opts.duplicate ) {
116				xhr.abort();
117				return false;
118			}
119		} catch ( e ) {}
120		var success = this.success;
121		this.success = function ( result, status, xhr ) {
122			if ( !commonErrCdAction( xhr ) ) {
123				var chgResult = result;
124				if ( this.dataType == "text" && xhr.responseText && global && global.env == "local" ) {
125					try {
126						if ( $( xhr.responseText ).is( ".COMMON_DIALOG_LAYOUT" ) ) {
127							var $div = $( '<div></div>' );
128							$div.append( $( xhr.responseText ) );
129							$div.find( ".COMMON_DIALOG_LAYOUT" ).attr( "data-dialog-url", this.url );
130							chgResult = $div.html();
131						}
132					} catch ( e ) {
133						success( result, status, xhr );
134					}
135				}
136				success( chgResult, status, xhr );
137			}
138		};
139		if ( this.dataType != "script" && !this.disabledLoading ) {
140			openLoading();
141		}
142		try {
143			if ( this.url.match( /\/dialog\//g ) ) {
144				console.log( "%c" + this.url, "color: blue; font-size: large" );
145			} else {
146				console.log( "%c" + this.url, "color: red; font-size: large" );
147			}
148		} catch ( e ) {}
149	},
150	"error": function ( xhr, data ) {
151		try {
152			ajaxDuplicate.remove( this.url );
153		} catch ( e ) {}
154		var flag = commonErrCdAction( xhr, data );
155		if ( this.dataType != "script" && !this.disabledLoading ) {
156			removeLoading();
157		}
158		console.log( xhr )
159		console.log( data )
160		if ( xhr.statusText === 'timeout' ) {
161			alert( '서버 응답 제한시간이 초과되었습니다. 새로고침 후 다시 시도해 주세요.' );
162		} else if ( !flag ) {
163			$.alert( "요청하신 작업을 처리하는 중에 문제가 발생하였습니다.\n\n나중에 다시 시도해 주십시오. \n\n\n이 문제가 계속 발생하면, 관리자에게 연락하여주시기바랍니다.", {
164				"close": function () {}
165			} );
166		}
167	},
168	"complete": function ( xhr, status ) {
169		try {
170			if ( ( this.url.match( /(.+)(midxToMphon|memberInfoSetList|encMidxDecrpt|decryptMemberValue|chkMemInfoViewTyCd|\/dialog\/memberInfo).do$/g ) || !global[ "beforeunload" ] ) && !this.url.match( /(.+)saveBoard.do$/g ) ) {
171				ajaxDuplicate.remove( this.url );
172			}
173		} catch ( e ) {}
174		if ( this.dataType != "script" ) {
175			removeLoading();
176		}
177		return false;
178	}
179} );
180/**
181 * 다이얼로그 닫을때 자동 포커스 방지
182 */
183$.ui.dialog.prototype._focusTabbable = function () {};
184jQuery.fn.extend( {
185	"customTags": function () {
186		var $this = $( this );
187		var $dataTypeBindTarget = $this.find( ":input[data-type],:input[data-maxlength],:input[data-minlength],[class*=\\{][class*=\\}]" );
188		if ( $dataTypeBindTarget.length ) {
189			$dataTypeBindTarget.each( function () {
190				$node = $( this );
191				var info = {};
192				if ( $node.is( "[class*=\\{][class*=\\}]" ) ) {
193					var info = $node.classData();
194					if ( info.ime ) {
195						info[ "type" ] = info.ime;
196					}
197				} else {
198					var info = {
199						"required": $node.data( "required" ) ? $node.data( "required" ) : false,
200						"maxlength": $node.data( "maxlength" ) ? $node.data( "maxlength" ) : null,
201						"minlength": $node.data( "minlength" ) ? $node.data( "minlength" ) : null,
202						"minDate": $node.data( "mindate" ) ? $node.data( "mindate" ) : null,
203						"maxDate": $node.data( "maxdate" ) ? $node.data( "maxdate" ) : null,
204						"target": $node.data( "target" ) ? $node.data( "target" ) : null,
205						"type": $node.data( "type" ) ? $node.data( "type" ) : $node.data( "ime" ) ? $node.data( "ime" ) : null,
206						"ime": $node.data( "type" ) ? $node.data( "type" ) : $node.data( "ime" ) ? $node.data( "ime" ) : null,
207					};
208				}
209				if ( info.maxlength ) {
210					$node.attr( "maxlength", info.maxlength );
211				}
212				if ( info.ime ) {
213					if ( info.ime == "tel" || info.ime == "phone" ) {
214						var placeholder = $( this ).attr( "placeholder" ) ? $( this ).attr( "placeholder" ) : "번호를 입력해 주세요.";
215						$node.attr( "placeholder", placeholder ).keydown( function ( e ) {
216							if ( e.ctrlKey && e.keyCode && e.keyCode.toString().match( /^(67|86|88)$/ ) ) {
217								return true;
218							} else if ( e.keyCode.toString().match( /^(8|46)$/ ) ) {
219								return true;
220							} else if ( e.keyCode > 36 && e.keyCode < 41 ) {
221								return true;
222							} else if ( ( !e.key.match( /([0-9]|\-|Arrow(Up|Down|Left|Right)|Delete|Backspace|Tab)/ ) ) ) {
223								return false;
224							}
225						} );
226						$node.bind( "change blur", function ( e ) {
227							if ( $( this ).parents( "form" ).attr( "lang" ) != "en" ) {
228								$( this ).val( $.telFormat( $( this ).val().replace( /[^0-9]/gi, '' ) ) );
229							}
230						} ).change();
231					} else if ( info.ime == "px" ) {
232						$node.addClass( "COMMON_PX_INPUT" ).css( {
233							"text-align": "center"
234						} );
235						$node.keydown( function ( e ) {
236							if ( e.ctrlKey && e.keyCode && e.keyCode.toString().match( /^(67|86|88)$/ ) ) {
237								return true;
238							} else if ( e.keyCode.toString().match( /^(8|46)$/ ) ) {
239								return true;
240							} else if ( e.keyCode > 36 && e.keyCode < 41 ) {
241								return true;
242							} else if ( e.keyCode == 9 ) {
243								return true;
244							} else if ( ( !e.key.match( /([0-9]|Arrow(Up|Down|Left|Right)|Delete|Backspace|Tab)/ ) ) ) {
245								return false;
246							}
247						} );
248						$node.bind( "change blur", function ( e ) {
249							$( this ).val( $( this ).val().replace( /[^0-9]/gi, '' ) );
250						} ).change();
251					} else if ( info.ime == "num" ) {
252						$node.keydown( function ( e ) {
253							if ( e.ctrlKey && e.keyCode && e.keyCode.toString().match( /^(67|86|88)$/ ) ) {
254								return true;
255							} else if ( e.keyCode.toString().match( /^(8|46)$/ ) ) {
256								return true;
257							} else if ( e.keyCode > 36 && e.keyCode < 41 ) {
258								return true;
259							} else if ( e.keyCode == 9 ) {
260								return true;
261							} else if ( ( !e.key.match( /([0-9]|Arrow(Up|Down|Left|Right)|Delete|Backspace|Tab)/ ) ) ) {
262								return false;
263							}
264						} );
265						$node.bind( "change blur", function ( e ) {
266							$( this ).val( $( this ).val().replace( /[^0-9]/gi, '' ) );
267						} ).change();
268					} else if ( info.ime == "price" ) {
269						$node.css( {
270							"text-align": "right"
271						} );
272						$node.keydown( function ( e ) {
273							if ( e.ctrlKey && e.keyCode && e.keyCode.toString().match( /^(67|86|88)$/ ) ) {
274								return true;
275							} else if ( e.keyCode.toString().match( /^(8|46)$/ ) ) {
276								return true;
277							} else if ( e.keyCode > 36 && e.keyCode < 41 ) {
278								return true;
279							} else if ( e.keyCode == 9 ) {
280								return true;
281							} else if ( ( !e.key.match( /([0-9]|\,|Arrow(Up|Down|Left|Right)|Delete|Backspace|Tab)/ ) ) ) {
282								return false;
283							}
284						} );
285						$node.bind( "change blur", function ( e ) {
286							$( this ).val( $.numberFormat( $( this ).val().replace( /[^0-9]/gi, '' ) ) );
287						} ).change();
288					} else if ( info.ime == "float" ) {
289						$node.css( {
290							"text-align": "right"
291						} );
292						$node.keydown( function ( e ) {
293							if ( e.ctrlKey && e.keyCode && e.keyCode.toString().match( /^(67|86|88)$/ ) ) {
294								return true;
295							} else if ( e.keyCode.toString().match( /^(8|46)$/ ) ) {
296								return true;
297							} else if ( e.keyCode > 36 && e.keyCode < 41 ) {
298								return true;
299							} else if ( ( !e.key.match( /([0-9]|\.|Arrow(Up|Down|Left|Right)|Delete|Backspace|Tab)/ ) ) ) {
300								return false;
301							}
302						} );
303						$node.bind( "change blur", function ( e ) {
304							$( this ).val( $( this ).val().replace( /[^0-9\\.]/gi, '' ) );
305						} ).change();
306					} else if ( info.ime == "date" ) {
307						$node.attr( "placeholder", function () {
308							return $node.attr( "placeholder" ) ? $node.attr( "placeholder" ) : "년도-월-일";
309						} ).addClass( "w-130px" ).datepicker( {
310							monthNames: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ],
311							dayNames: [ '일', '월', '화', '수', '목', '금', '토' ],
312							dayNamesShort: [ '일', '월', '화', '수', '목', '금', '토' ],
313							dayNamesMin: [ '일', '월', '화', '수', '목', '금', '토' ],
314							dayNames: [ '일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일' ],
315							dateFormat: 'yy-mm-dd',
316							showMonthAfterYear: true,
317							yearSuffix: '년',
318							autoSize: false,
319							changeYear: true,
320							yearRange: 'c-200:c+30',
321							showAnim: '',
322							minDate: info.minDate ? info.minDate : null,
323							maxDate: info.maxDate ? info.maxDate : null,
324							beforeShow: function () {}
325						} );
326						if ( info.maxDate && $( info.maxDate ) ) {
327							$node.datepicker( "option", "maxDate", $( info.maxDate ).val() );
328							$node.datepicker( "option", "onClose", function ( selectedDate ) {
329								$( info.maxDate ).datepicker( "option", "minDate", selectedDate );
330							} );
331						}
332						if ( info.minDate && $( info.minDate ) ) {
333							$node.datepicker( "option", "minDate", $( info.minDate ).val() );
334							$node.datepicker( "option", "onClose", function ( selectedDate ) {
335								$( info.minDate ).datepicker( "option", "maxDate", selectedDate );
336							} );
337						}
338					} else if ( info.ime == "time(H:i)" ) {
339						$node.attr( "placeholder", "시:분" ).timepicker_( {
340							'timeFormat': 'H:i',
341							'step': 5
342						} );
343					} else if ( info.ime == "time(H:i:s)" ) {
344						$node.attr( "placeholder", "시:분:초" ).timepicker_( {
345							'timeFormat': 'H:i:s',
346							'step': 5
347						} );
348					} else if ( info.ime == "dateTime" ) {
349						var dateTimeParams = {
350							monthNames: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ],
351							dayNames: [ '일', '월', '화', '수', '목', '금', '토' ],
352							dayNamesShort: [ '일', '월', '화', '수', '목', '금', '토' ],
353							dayNamesMin: [ '일', '월', '화', '수', '목', '금', '토' ],
354							dayNames: [ '일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일' ],
355							dateFormat: 'yy-mm-dd',
356							changeYear: true,
357							currentText: '현재시간',
358							closeText: '닫기',
359							yearRange: 'c-250:c+2',
360							showAnim: '',
361							timeText: "시:분:초",
362							hourText: "시",
363							minuteText: "분",
364							secondText: "초",
365							millisecText: "Millisecond",
366							microsecText: "Microsecond",
367							timezoneText: "Timezone",
368							showSecond: true,
369							timeFormat: 'HH:mm:ss',
370							stepHour: 1,
371							controlType: 'select',
372							oneLine: true,
373							stepMinute: 1,
374							onSelect: function ( a, b ) {
375								b.inline = false;
376							}
377						}
378						if ( info.dateFormat == "H:i" ) {
379							$node.attr( "placeholder", "년-월-일 시:분" );
380							dateTimeParams = $.extend( dateTimeParams, {
381								timeText: "시:분",
382								timeFormat: "HH:ss"
383							} );
384						} else {
385							$node.attr( "placeholder", "년-월-일 시:분:초" );
386						}
387						$node.datetimepicker_( dateTimeParams );
388					} else if ( info.ime == "onlyEng" ) {
389						$node.css( {
390							"ime-mode": "disabled"
391						} );
392					}
393				}
394			} );
395		}
396		$this.find( "[data-title]" ).each( function () {
397			var $target = $( this );
398			$target.hover( function () {
399				var text = $target.data( "title" );
400				var body = $target.data( "title-body" );
401				var bodyUrl = $target.data( "title-body-url" );
402				if ( text ) {
403					var $tooltipItem = $( '<span>' ).addClass( "shuvic-tooltip" ).css( {
404						"visibility": "hidden"
405					} ).html( '<i></i>' + text );
406					$( "body" ).append( $tooltipItem );
407					var callback = function () {
408						var winScrollTop = $( window ).scrollTop() + $( window ).outerHeight( true );
409						var offset = $target.offset();
410						var top = offset.top + $target.outerHeight( true ) + 6;
411						$target.addClass( "shuvic-tooltip-parent" );
412						$tooltipItem.css( {
413							"left": offset.left,
414							"top": top,
415							"visibility": "visible"
416						} );
417						if ( winScrollTop < top + $tooltipItem.outerHeight( true ) ) {
418							$tooltipItem.css( {
419								"left": offset.left,
420								"top": top - ( $tooltipItem.outerHeight( true ) + $target.outerHeight( true ) ) - 12
421							} ).addClass( "reversePos" );
422						}
423					};
424					if ( bodyUrl ) {
425						var $bodyUrlWrap = $( '<div class="tooltip-body" style="min-width:100px;">Loading..</div>' );
426						$tooltipItem.append( "<hr>" );
427						$tooltipItem.append( $bodyUrlWrap );
428						callback();
429						$.ajax( {
430							"url": bodyUrl,
431							"loading": false,
432							"dataType": "json",
433							"method": "post",
434							"success": function ( result ) {
435								var str = $.textHTML( $.trim( result.data ) );
436								while ( str.match( /^<br(\w)?(\/)?\>/gi ) ) {
437									str = str.replace( /^<br(\w)?(\/)?\>/gi, "" );
438								}
439								while ( str.match( /<br(\w)?(\/)?\><br(\w)?(\/)?\>/gi ) ) {
440									str = str.replace( /<br(\w)?(\/)?\><br(\w)?(\/)?\>/gi, "<br/>" );
441								}
442								$target.data( "title-body", str ).data( "title-body-url", null );
443								if ( result.data ) {
444									$bodyUrlWrap.html( str );
445								} else {
446									$bodyUrlWrap.remove();
447								}
448								callback();
449							}
450						} );
451					} else if ( body ) {
452						$tooltipItem.append( '<hr><div class="tooltip-body">' + $.textHTML( $.trim( body ).replace( /\\r\\n/gi, "\r\n" ) ) + "</div>" );
453						callback();
454					} else {
455						callback();
456					}
457				}
458			}, function () {
459				$( "body" ).find( ".shuvic-tooltip" ).remove();
460				$target.removeClass( "shuvic-tooltip-parent" );
461			} );
462		} );
463		$this.find( "input[type='text']" ).not( "[name='srchValu'], #cmnSrchAddrForm [name='addr']" ).keydown( function ( e ) {
464			if ( e.keyCode && e.keyCode.toString().match( /^(13)$/ ) ) return false;
465			return true;
466		} );
467		$this.find( "a[href^='/redirect']" ).click( function ( e ) {
468			if ( e.ctrlKey || $.nvl( $( this ).attr( "target" ), "_parent" ) != "_parent" || window.onbeforeunload != null ) return true;
469			openLoading();
470		} );
471		$( ".CMN_BOOKMARK_BTN" ).click( function ( e ) {
472			e.preventDefault();
473			$.bookmark();
474		} );
475		$this.find( "form" ).not( "[name='loginForm']" ).submit( function () {
476			openLoading();
477		} );
478		if ( $this.find( ".COMMOM_SWIPER" ).length ) {
479			$this.find( ".COMMOM_SWIPER" ).each( function () {
480				new Swiper( $( this ), $.extend( {
481					slidesPerView: 3,
482					spaceBetween: 10,
483					freeMode: true,
484					pagination: {
485						clickable: true,
486					},
487				}, $( this ).data( "params" ) ) );
488			} );
489		}
490		/* 멤버쉽 버튼 이벤트 */
491		$this.find( ".memshpBtn" ).click( function ( e ) {
492			e.preventDefault();
493			$.ajax( {
494				"url": "/mem/dialog/memshpCardInfo.do",
495				"method": "post",
496				"dataType": "text",
497				"success": function ( text ) {
498					var $html = $( text );
499					$html.layout( {
500						"width": 400,
501						"create": function ( data ) {
502							$html.find( ".memberAdListBtn" ).click( function () {
503								$.location( "/redirect", {
504									"url": "/mem/memberAdList.do?memshpUseYn=1"
505								} );
506							} );
507						}
508					} );
509				}
510			} );
511		} );
512		/* 회원수첩 퀵메뉴 버튼 이벤트 */
513		if ( $this.find( ".memQuickMenuLinkBtn" ).length ) {
514			$( "body" ).addClass( "useQuickFunc" )
515			var $bottomMenuMask = $( "<div>" ).css( {
516				position: "fixed",
517				"left": 0,
518				"top": 0,
519				"z-index": "999",
520				"background-color": "#000",
521				"opacity": ".7",
522				"width": "100%",
523				"height": "100vh",
524				"display": "none"
525			} );
526			$( "body" ).prepend( $bottomMenuMask );
527			$bottomMenuMask.click( function () {
528				$( "body" ).css( {
529					"overflow": ""
530				} )
531				$( this ).fadeOut( 200 );
532				$( ".memQuickMenuLinkWrap" ).find( ".memQuickBtn" ).addClass( "d-none" );
533			} )
534			$this.find( ".memQuickMenuLinkBtn" ).click( function ( e ) {
535				e.preventDefault();
536				var $this = $( this );
537				var $memQuickMenuLinkWrap = $this.closest( ".memQuickMenuLinkWrap" );
538				if ( $memQuickMenuLinkWrap.find( ".d-none" ).length ) {
539					$memQuickMenuLinkWrap.find( ".memQuickBtn" ).removeClass( "d-none" );
540					$( "body" ).css( {
541						"overflow": "hidden"
542					} );
543					$this.find( ".chgIco" ).removeClass( "fa-plus" ).addClass( "fa-times" );
544					/*
545					 * $this.css( { "background-color" : "#333333" } );
546					 */
547					$( "#mask" ).removeClass( "d-none" );
548					$bottomMenuMask.fadeIn( 200 );
549				} else {
550					$memQuickMenuLinkWrap.find( ".memQuickBtn" ).addClass( "d-none" );
551					$( "body" ).css( {
552						"overflow": ""
553					} );
554					$this.find( ".chgIco" ).removeClass( "fa-times" ).addClass( "fa-plus" );
555					/*
556					 * $this.css( { "background-color" : "#1b51f0" } );
557					 */
558					$( "#mask" ).addClass( "d-none" );
559					$bottomMenuMask.fadeOut( 200 );
560				}
561			} );
562		}
563		$.each( $this.find( "select.form-control-multiselect" ), function () {
564			var params = $( this ).data( "params" );
565			if ( params && typeof params == "string" ) {
566				params = $.JSONDecode( params.replace( /\'/g, '"' ) );
567			}
568			$( this ).attr( {
569				"multiple": "multiple",
570			} ).multiselect( $.extend( {
571				"nonSelectedText": $( this ).attr( "title" ),
572				"buttonWidth": "100%",
573				"includeSelectAllOption": true,
574				"selectAllText": "전체 선택",
575				"nSelectedText": "개 선택",
576				"allSelectedText": "전체 선택",
577				"numberDisplayed": 1
578			}, params ? params : {} ) );
579			$( this ).closest( ".multiselect-native-select" ).find( ".btn-group" ).append( $( '<button type="submit" class="btn btn-primary multiselect_srch_btn"><i class="fad fa-search mr-1"></i>검색</button>' ) )
580		} );
581		/* 인맥관리 버튼 이벤트 */
582		$this.find( ".prsnlcnntBtn" ).click( function ( e ) {
583			e.preventDefault();
584			$.location( "/redirect", {
585				"url": "/myPage/myPagePrsnlcnntMngtList.do"
586			} );
587		} );
588		/* 내가본회원 버튼 이벤트 */
589		$this.find( ".memIntsInqBtn" ).click( function ( e ) {
590			e.preventDefault();
591			$.location( "/redirect", {
592				"url": "/myPage/myPageMemIntsInqList.do"
593			} );
594		} );
595		/* 1일 행사참석 버튼 이벤트 */
596		$this.find( ".dayAttntBtn" ).click( function ( e ) {
597			e.preventDefault();
598			$.location( "/redirect", {
599				"url": "/auspc/clubAuspcBasList.do"
600			} );
601		} );
602		$this.find( ".closeQrBtn" ).click( function ( e ) {
603			e.preventDefault();
604			$( this ).parents( ".fixed-btn" ).hide();
605			return false;
606		} );
607		$this.find( ".COMMON_LINK_COMBO" ).click( function ( e ) {
608			$( this ).change( function () {
609				e.preventDefault();
610				if ( !$( this ).val() ) {
611					return;
612				}
613				var url = $( this ).val();
614				if ( url.match( /^\/(.+)$/ ) ) {
615					$.location( "/redirect", {
616						"url": url
617					} );
618				} else {
619					window.open( url );
620				}
621			} );
622		} );
623		// 메뉴 동기화
624		window.addEventListener( 'pageshow', function ( event ) {
625			var syncMenuSelect = function ( selectId ) {
626				var $select = $( '#' + selectId );
627				if ( $select.length == 0 ) return;
628				var currentUrl = location.pathname + location.search;
629				$select.find( 'option' ).each( function ( idx, opt ) {
630					if ( $( opt ).val() == currentUrl ) {
631						return false;
632					}
633				} );
634			};
635			syncMenuSelect( 'menuList_1dep' );
636			syncMenuSelect( 'menuList_2dep' );
637		} );
638		if ( $this.find( ".COMMON_ACCORDION" ).length ) {
639			$this.find( ".COMMON_ACCORDION" ).accordion();
640		}
641		$this.find( ".shuvic_toolbar" ).each( function () {
642			if ( !$( this ).data( "midx" ) ) {
643				$( this ).removeClass( "shuvic_toolbar" ).addClass( "remove_shuvic_toolbar" );
644			}
645			$( this ).attr( "title", $( this ).text() );
646		} );
647		/** 로그인폼을 제외한 자동완성을 사용하지 않도록 설정한다. */
648		$this.find( "form" ).not( "[name='loginForm']" ).attr( "autocomplete", "off" );
649		$this.find( ".JS_FB_LINK" ).click( function ( e ) {
650			e.preventDefault();
651			var params = $( this ).data( "params" );
652			var queryString = "";
653			if ( params && params.bidx > 0 ) {
654				queryString = "bidx=" + params.bidx;
655			} else if ( params && params.midx > 0 && params.bzhpShrgTyCd ) {
656				queryString = "midx=" + params.midx;
657			} else {
658				queryString = global.queryString;
659			}
660			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do" : global.mappingUrl.replace( /Form\.do/, "Info.do" );
661			if ( !queryString ) {
662				window.open( "http://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent( location.protocol + "//" + location.host + mappingUrl ) );
663			} else {
664				window.open( "http://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent( location.protocol + "//" + location.host + mappingUrl + "?" + queryString ) );
665			}
666
667		} );
668		$this.find( ".JS_FB_MEMBER_AD_LINK" ).click( function ( e ) {
669			e.preventDefault();
670			var params = $( this ).data( "params" );
671			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do?midx=" : "/mem/memberAdInfo.do?midx=";
672			var url = ( global.isHttps ? "https://" : "http://" ) + global.serverName + mappingUrl + params.midx
673			window.open( "http://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent( url ) );
674		} );
675		$this.find( ".JS_TW_LINK" ).click( function ( e ) {
676			e.preventDefault();
677			var params = $( this ).data( "params" );
678			var queryString = "";
679			if ( params && params.bidx > 0 ) {
680				queryString = "bidx=" + params.bidx;
681			} else if ( params && params.midx > 0 && params.bzhpShrgTyCd ) {
682				queryString = "midx=" + params.midx;
683			} else {
684				queryString = global.queryString;
685			}
686			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do" : global.mappingUrl.replace( /Form\.do/, "Info.do" );
687			window.open( "https://twitter.com/intent/tweet?text=" + encodeURIComponent( params.text ) + "&url=" + encodeURIComponent( location.protocol + "//" + location.host + mappingUrl + "?" + queryString ) );
688		} );
689		$this.find( ".JS_TW_MEMBER_AD_LINK" ).click( function ( e ) {
690			e.preventDefault();
691			var params = $( this ).data( "params" );
692			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do?midx=" : "/mem/memberAdInfo.do?midx=";
693			var url = ( global.isHttps ? "https://" : "http://" ) + global.serverName + mappingUrl + params.midx
694			window.open( "https://twitter.com/intent/tweet?text=" + encodeURIComponent( params.text ) + "&url=" + encodeURIComponent( url ) );
695		} );
696		$this.find( ".JS_BD_LINK" ).click( function ( e ) {
697			e.preventDefault();
698			var params = $( this ).data( "params" );
699			var queryString = "";
700			if ( params && params.bidx > 0 ) {
701				queryString = "bidx=" + params.bidx;
702			} else if ( params && params.midx > 0 && params.bzhpShrgTyCd ) {
703				queryString = "midx=" + params.midx;
704			} else {
705				queryString = global.queryString;
706			}
707			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do" : global.mappingUrl.replace( /Form\.do/, "Info.do" );
708			var url = ( params.url ? params.url : location.protocol + "//" + location.host + mappingUrl + "?" + queryString );
709			window.open( "https://band.us/plugin/share?body=" + encodeURIComponent( $( params.target ).text() + "\n" + url ) + "&route=" + encodeURIComponent( url ) );
710		} );
711		$this.find( ".JS_BD_MEMBER_AD_LINK" ).click( function ( e ) {
712			e.preventDefault();
713			var params = $( this ).data( "params" );
714			var mappingUrl = params.bzhpShrgTyCd == "0002" ? "/mem/emptyMemberAdInfo.do?midx=" : "/mem/memberAdInfo.do?midx=";
715			var url = ( global.isHttps ? "https://" : "http://" ) + global.serverName + mappingUrl + params.midx;
716			window.open( "https://band.us/plugin/share?body=" + encodeURIComponent( $( params.target ).text() + "\n" + url ) + "&route=" + encodeURIComponent( url ) );
717		} );
718		$this.find( "table" ).find( ":input" ).each( function () {
719			var $th = $( this ).closest( "td" ).prev();
720			if ( $th.is( "th" ) && $( this ).classData().required ) {
721				if ( !$th.children( "span.data-required" ).length && !$th.find( ":checkbox" ).length ) {
722					$th.prepend( '<span class="data-required">*<span>&nbsp;' );
723				}
724			}
725		} );
726		$this.find( ".NO_RESULT" ).each( function () {
727			var $this = $( this );
728			var colspan = ( function () {
729				var colspan = 0;
730				$this.parents( "table" ).find( "thead tr:first th" ).each( function () {
731					colspan += $( this ).attr( "colspan" ) ? $.toInt( $( this ).attr( "colspan" ) ) : 1;
732				} );
733				return colspan;
734			} )();
735			$this.attr( "colspan", colspan );
736		} );
737		$( this ).find( "input[type='text'],input[type='password'],textarea" ).each( function () {
738			if ( !$( this ).attr( "title" ) || $( this ).attr( "placeholder" ) ) {
739				return;
740			}
741			$( this ).attr( "placeholder", $( this ).attr( "title" ) );
742		} );
743		$( this ).find( "a:not([href])" ).attr( "href", "#" );
744		$( this ).find( "a[href='#']" ).click( function ( e ) {
745			e.preventDefault();
746		} );
747		$( this ).find( "a[href^='http://okdongchang.net/addService_ver2/okshot'],a[href^='https://okdongchang.net/addService_ver2/okshot']" ).click( function ( e ) {
748			e.preventDefault();
749			var url = $( this ).attr( "href" );
750			if ( global.midx > 0 ) {
751				$.ajax( {
752					"url": "/common/addService/ajax/addServiceTotalMember.do",
753					"method": "post",
754					"dataType": "json",
755					"success": function ( data ) {
756						$.submit( url.indexOf( "/itemize.php" ) != -1 ? "http://okdongchang.net/addService_ver2/okshot/service/itemize.php" : "http://okdongchang.net/addService_ver2/okshot/service/charge1.htm", {
757							"iMemIdx": data.totalMember.sMemId,
758							"AUTH_USER_ID": data.totalMember.sMemId,
759							"AUTH_USER_SID": data.totalMember.sDbId
760						}, "_blank" );
761					}
762				} );
763			} else {}
764			return false;
765		} );
766		/**
767		 * app2.okdongchang.kr 웹뷰띄우기
768		 */
769		if ( global.nativeDomain ) {
770			$( "img" ).each( function () {
771				var $this = $( this );
772				var src = $this.attr( "src" );
773				var regex = new RegExp( "((http?:)?\/\/)(www\.)?" + global.nativeDomain, 'gi' );
774				if ( src && regex ) {
775					$this.attr( "src", src.replace( regex, "" ) );
776				}
777			} );
778			$( this ).find( "a" ).click( function ( e ) {
779				var href = $( this ).attr( "href" );
780				if ( !href || href == "#" ) return;
781				var domain = global.nativeDomain.replace( "www\.", "" );
782				href = href.replace( /^(\/\/)(.+)/gi, '$2' );
783				var checkHref = href.replace( /^(\/\/)(.+)/gi, '$2' ).replace( "www\.", "" );
784				if ( checkHref.match( '^([\/][\?]){1}[^\/\?].*' ) ) {
785					e.preventDefault();
786					$.ajax( {
787						url: "/common/cmnShortUrlConv/ajax/shortUrlConvert.do",
788						dataType: "json",
789						data: {
790							"strParams": href
791						},
792						success: function ( data ) {
793							if ( data.convertUrl ) {
794								location.href = data.convertUrl;
795							}
796						}
797					} );
798				} else if ( checkHref == "/" || checkHref.match( '^(\.\/|[\/]){1}(.+)' ) ) {
799					location.href = href;
800				} else if ( checkHref.match( '^#(.+)' ) ) { // tab인 경우
801					window.location.hash = href;
802				} else if ( !checkHref.match( new RegExp( '(.*)' + domain + '(.*)', 'gi' ) ) || checkHref.match( new RegExp( '(.*)([\.])' + domain + '(.*)' ) ) ) {
803					e.preventDefault();
804					if ( global.dvcSxnCd == "0003" ) {
805						OKPlugin.viewContents( href );
806					} else if ( global.dvcSxnCd == "0004" ) {
807						webkit.messageHandlers.urlHandler.postMessage( href );
808					} else {
809						window.open( href, "", "" );
810					}
811				} else if ( $( this ).attr( "target" ) && $( this ).attr( "target" ) == "_blank" && checkHref.match( new RegExp( '(.*)' + domain + '(.*)', 'gi' ) ) ) {
812					window.open( href.replace( global.nativeDomain, "app2.okdongchang.kr" ), "", "" );
813				}
814			} );
815		}
816		if ( $this.find( ".COMMON_TABS" ).length > 0 ) {
817			$this.find( ".COMMON_TABS" ).each( function () {
818				if ( !$( this ).is( ".ui-tabs" ) ) {
819					$( this ).addClass( "item-length-" + $( this ).children( "ul:eq(0)" ).find( "li" ).length ).tabs();
820				}
821			} );
822		}
823		if ( $( "div.row.COMMON_ROW_AUTO_HEIGHT" ).length ) {
824			$( "div.row.COMMON_ROW_AUTO_HEIGHT" ).each( function () {
825				try {
826					var $colList = $( this ).children( "div" );
827					if ( $colList.length ) {
828						var len = $.toInt( $colList.eq( 0 ).attr( "class" ).replace( /(.+)?col\-([0-9]+)(.+)?/gi, "$2" ) );
829						var col = 12 / len;
830						$colList.each( function ( index ) {
831							if ( index % col == 0 ) {
832								var maxHeight = 0;
833								for ( var i = 0; i < col; i++ ) {
834									var $item = $colList.eq( index + i );
835									maxHeight = maxHeight < $item.height() ? $item.height() : maxHeight;
836								}
837								for ( var i = 0; i < col; i++ ) {
838									var $item = $colList.eq( index + i );
839									$item.height( maxHeight );
840								}
841							}
842						} );
843					}
844				} catch ( e ) {
845					console.log( e );
846				}
847			} );
848		}
849		if ( $this.find( ".jstl_radio_button" ).length > 0 ) {
850			$this.find( ".jstl_radio_button" ).each( function () {
851				var $input = $( this );
852				var $label = $( this ).next();
853				if ( $input.parent().is( "span" ) ) {
854					$input.unwrap();
855				}
856				$input.removeAttr( "id" );
857				$label.removeAttr( "for" );
858				$label.prepend( $input );
859			} );
860		}
861		if ( $this.find( ".COMMON_CHECK_ALL" ).length > 0 ) {
862			$this.find( ".COMMON_CHECK_ALL" ).change( function () {
863				var $this = $( this );
864				var target = $( this ).data( "target" );
865				$( target ).prop( "checked", $this.prop( "checked" ) );
866				/** 2022.02 추가 */
867				if ( $( target ).is( ':checked' ) ) {
868					$( target ).closest( ".set_lst_outer" ).find( "label" ).each( function ( i, entry ) {
869						$( entry ).addClass( "checked" )
870					} )
871				} else {
872					$( target ).closest( ".set_lst_outer" ).find( "label" ).each( function ( i, entry ) {
873						$( entry ).removeClass( "checked" )
874					} )
875				}
876			} );
877		}
878		if ( $this.find( ".clubIntroBtn" ).length > 0 ) {
879			$this.find( ".clubIntroBtn" ).click( function ( e ) {
880				e.preventDefault();
881				$.ajax( {
882					url: "/clb/dialog/clubIntro.do",
883					dataType: "text",
884					success: function ( data ) {
885						$html = $( data );
886						$html.layout( {
887							"title": "머릿돌",
888							"position": {
889								my: "center top",
890								at: "center top",
891								of: window
892							},
893							"width": 800
894						} );
895					}
896				} );
897			} );
898		}
899		if ( $this.find( ".COMMON_SORTABLE" ).length > 0 ) {
900			$this.find( ".COMMON_SORTABLE" ).each( function () {
901				var params = $( this ).data( "params" );
902				$( this ).sortable( $.extend( {
903					start: function ( event, ui ) {
904						$( ".ui-state-highlight" ).css( {
905							"height": ui.item.outerHeight()
906						} );
907					},
908					update: function () {
909						$( this ).find( ".COMMON_SORTABLE_ORDER_INPUT" ).each( function ( index, entry ) {
910							$( this ).val( index )
911						} );
912					},
913					placeholder: "ui-state-highlight"
914				}, params ? params : {} ) );
915			} );
916		}
917		if ( $this.find( ".COMMON_BUTTONSET_MOBILE" ).not( ".hasButtonset" ).length > 0 ) {
918			$this.find( ".COMMON_BUTTONSET_MOBILE" ).not( ".hasButtonset" ).each( function () {
919				$( this ).addClass( "hasButtonset" ).buttonset();
920				$( this ).find( "label" ).addClass( "btn" );
921				$( this ).find( "label" ).each( function () {
922					var bgUrl = $( this ).data( "background-url" );
923					if ( bgUrl ) {
924						$( this ).find( ".ui-icon-background" ).css( {
925							"background-image": "url('" + bgUrl + "')"
926						} )
927					}
928				} );
929			} );
930		}
931		if ( $this.find( ".COMMON_BUTTONSET" ).not( ".hasButtonset" ).length > 0 && !global.isMobile ) {
932			$this.find( ".COMMON_BUTTONSET" ).not( ".hasButtonset" ).each( function () {
933				var $this = $( this );
934				$this.addClass( "hasButtonset" ).buttonset();
935				$this.find( "label" ).addClass( "btn" );
936				$this.find( "label" ).find( ".ui-checkboxradio" ).each( function () {
937					$( this ).closest( "label" ).addClass( "ui-checkboxradio-value-" + ( $( this ).data( "value" ) ? $( this ).data( "value" ) : $( this ).val() ) )
938				} );
939			} );
940		}
941		if ( $this.find( ".COMMON_MOBILE_BUTTONSET" ).length > 0 && global.isMobile ) {
942			$this.find( ".COMMON_MOBILE_BUTTONSET" ).each( function () {
943				if ( !$( this ).is( ".ui-controlgroup" ) ) {
944					$( this ).buttonset();
945					$( this ).find( "label" ).addClass( "btn" );
946				}
947			} );
948		}
949		if ( $this.find( ".NOTE_TYPE2" ).length > 0 ) {
950			$this.find( ".NOTE_TYPE2" ).each( function () {
951				var $this = $( this );
952				$this.find( ".module_more" ).click( function ( e ) {
953					e.preventDefault();
954					$this.find( ".module_note" ).toggle();
955				} );
956			} );
957		}
958		/* 공통검색바 chosen 이벤트 */
959		if ( $this.find( ".COMMON_CHOSEN" ).length ) {
960			$this.find( ".COMMON_CHOSEN" ).each( function () {
961				var $this = $( this );
962				var params = $this.data( "params" );
963				$this.chosen( $.extend( {
964					width: "95%",
965					disable_search_threshold: 10,
966				}, params ) );
967			} );
968		}
969		/**
970		 * 어플설치형황 TYPE2
971		 */
972		if ( $this.find( ".COMMON_JQPLOT_WIDGET_TYPE2" ).length > 0 ) {
973			$.googleChart( function () {
974				$this.find( ".COMMON_JQPLOT_WIDGET_TYPE2" ).each( function () {
975					var $target = $( this );
976					var params = $target.data( "params" );
977					var header = $target.data( "header" );
978					google.charts.setOnLoadCallback( function () {
979						var data = new Array();
980						data.push( header );
981						$.each( params, function ( index, entry ) {
982							data.push( [ entry[ 0 ], entry[ 1 ] ] );
983						} );
984						new google.visualization.PieChart( $target.get( 0 ) ).draw( google.visualization.arrayToDataTable( data ), {
985							slices: {
986								0: {
987									color: '#666666'
988								},
989								1: {
990									color: '#007bff'
991								}
992							},
993							legend: 'none'
994						} );
995					} );
996				} );
997			} );
998		}
999		if ( $this.find( ".COMMON_JQPLOT_WIDGET_TYPE1" ).length > 0 ) {
1000			$.googleChart( function () {
1001				$this.find( ".COMMON_JQPLOT_WIDGET_TYPE1" ).each( function () {
1002					var $target = $( this );
1003					var params = $target.data( "params" );
1004					var header = $target.data( "header" );
1005					google.charts.setOnLoadCallback( function () {
1006						var data = [
1007							[ header[ 0 ], header[ 1 ], {
1008								role: 'style'
1009							} ]
1010						];
1011						$.each( params, function ( index, entry ) {
1012							data.push( [ entry[ 0 ], entry[ 1 ], 'color: #136cb7' ] );
1013						} );
1014						new google.visualization.ColumnChart( $target.get( 0 ) ).draw( google.visualization.arrayToDataTable( data ), {
1015							legend: "none"
1016						} );
1017					} );
1018				} );
1019			} );
1020		}
1021		/**
1022		 * WIDGET CLUB TYPE1 사용 중.
1023		 */
1024		if ( $this.find( ".COMMON_OVER_TAPS" ).length > 0 ) {
1025			$this.find( ".COMMON_OVER_TAPS" ).each( function () {
1026				var $tabs = $( this );
1027				$tabs.find( ".COMMON_OVER_TAPS_HEADER > ul > li" ).bind( "click mouseenter", function () {
1028					$( this ).addClass( "ON" );
1029					var index = $tabs.find( ".COMMON_OVER_TAPS_HEADER > ul > li" ).index( $( this ) );
1030					$tabs.find( ".COMMON_OVER_TAPS_HEADER > ul > li" ).not( $( this ) ).removeClass( "ON" );
1031					$tabs.find( ".COMMON_OVER_TAPS_LIST" ).children( "ul" ).not( index ).hide();
1032					$tabs.find( ".COMMON_OVER_TAPS_LIST" ).children( "ul" ).eq( index ).show();
1033				} );
1034				$tabs.find( ".COMMON_OVER_TAPS_HEADER > ul > li:first" ).click();
1035			} );
1036		}
1037		if ( $this.find( ".COMMON_MEMBER_AD_BTN" ).length > 0 ) {
1038			$this.find( ".COMMON_MEMBER_AD_BTN" ).click( function ( e ) {
1039				e.preventDefault();
1040				var midx = $( this ).data( "midx" );
1041				$.location( global.isHome ? "/home/" + global.home.cbidx + "/homeMem/memberAdInfo.do" : "/mem/memberAdInfo.do", {
1042					midx: midx
1043				} );
1044			} );
1045		}
1046		if ( $this.find( ".COMMON_MEMBER_INFO_CHG_BTN" ).length > 0 ) {
1047			$this.find( ".COMMON_MEMBER_INFO_CHG_BTN" ).click( function ( e ) {
1048				e.preventDefault();
1049				var midx = $( this ).data( "midx" );
1050				$.location( global.isHome ? "/home/" + global.home.cbidx + "/homeMyPage/myPageInfoUpdForm.do" : "/myPage/myPageInfoUpdList.do", {
1051					midx: midx
1052				} );
1053			} );
1054		}
1055		if ( $this.find( ".COMMON_ANIMATE" ).length > 0 ) {
1056			$this.find( ".COMMON_ANIMATE" ).each( function () {
1057				var params = $( this ).data( "params" );
1058				if ( !params ) return;
1059				if ( params.animate == "mainMenuOverAnimate" ) {
1060					$( this ).mainMenuOverAnimate( params );
1061				} else if ( params.animate == "widgetSlideType1" ) {
1062					$( this ).widgetSlideType1( params );
1063				} else if ( params.animate == "widgetSlideType2" ) {
1064					$( this ).widgetSlideType2( params );
1065				} else if ( params.animate == "widgetBannerType1" ) {
1066					$( this ).widgetBannerType1( params );
1067				} else if ( params.animate == "widgetBannerType2" ) {
1068					$( this ).widgetBannerType2( params );
1069				} else if ( params.animate == "widgetBannerType3" ) {
1070					$( this ).widgetBannerType3( params );
1071				} else if ( params.animate == "widgetBannerType4" ) {
1072					$( this ).widgetBannerType4( params );
1073				} else if ( params.animate == "widgetBoardType7" ) {
1074					$( this ).widgetBoardType7( params );
1075				}
1076			} );
1077		}
1078		if ( $this.find( ".COMMON_COLOR_PICKER" ).length > 0 ) {
1079			$this.find( ".COMMON_COLOR_PICKER" ).each( function () {
1080				$( this ).addClass( "form-control" ).minicolors( {
1081					theme: 'bootstrap',
1082					format: 'hex',
1083					control: 'hue'
1084				} );
1085			} );
1086		}
1087		if ( $this.find( ".COMMON_FILEUPLOAD" ).length ) {
1088			$this.find( ".COMMON_FILEUPLOAD" ).each( function () {
1089				var params = $( this ).data( "params" );
1090				$( this ).fileUpload( params );
1091			} );
1092		}
1093		if ( $this.find( "#COMMON_SLIDER_RANGE" ).length ) {
1094			$( "#COMMON_SLIDER_RANGE" ).slider( {
1095				range: "max",
1096				min: 1,
1097				max: 10,
1098				value: $( "#mCnt" ).val() == "" ? 3 : $( "#mCnt" ).val(),
1099				slide: function ( event, ui ) {
1100					$( "#mCnt" ).val( ui.value );
1101				}
1102			} );
1103			$( "#mCnt" ).val( $( "#COMMON_SLIDER_RANGE" ).slider( "value" ) );
1104		}
1105		// bx슬라이더 가로나열개수 추가
1106		if ( $this.find( ".COMMON_BX_SLIDER" ).length > 0 ) {
1107			( function () {
1108				var action = function () {
1109					$this.find( ".COMMON_BX_SLIDER" ).each( function () {
1110						var $node = $( this );
1111						var $params = $node.data( "params" ) ? $node.data( "params" ) : {};
1112						if ( $node.hasClass( "COMMON_BX_SLIDER_WRAP" ) ) {
1113							var $nodeItem = $node.find( ".COMMON_BX_SLIDER_UL" );
1114							var $viewCnt_parent_width, $viewCnt;
1115							var $viewCnt_width = "auto";
1116							if ( $nodeItem.length > 0 ) {
1117								$viewCnt_parent_width = $nodeItem.parent().width();
1118								if ( $nodeItem.attr( "class" ).indexOf( "viewCnt" ) ) {
1119									$viewCnt = $nodeItem.attr( "class" ).split( "viewCnt" )[ 1 ].substr( 0, 1 );
1120									if ( $.isNumeric( $viewCnt ) ) {
1121										$viewCnt_width = $viewCnt_parent_width / $viewCnt;
1122									}
1123								}
1124							}
1125							$nodeItem.bxSlider( $.extend( {
1126								"slideWidth": $viewCnt_width
1127							}, $params ) );
1128						} else {
1129							$node.bxSlider( $params );
1130						}
1131						$node.addClass("hasBxSlider");
1132					} );
1133				};
1134				action();
1135			} )();
1136		}
1137		if ( $this.find( ".COMMON_SLICK" ).length > 0 ) {
1138			$this.find( ".COMMON_SLICK" ).each( function () {
1139				var $slick = $( this );
1140				var params = $slick.data( "params" )
1141				$slick.slick( params );
1142			} );
1143		}
1144		if ( $this.find( ".COMMON_MEM_CHG_REQ_FORM" ).length > 0 ) {
1145			$this.find( ".COMMON_MEM_CHG_REQ_FORM" ).click( function ( e ) {
1146				e.preventDefault();
1147				if ( global.midx < 1 ) {
1148					$.alert( "해당서비스는 로그인 이용이 가능합니다." );
1149					return;
1150				}
1151				var midx = $( this ).data( "midx" );
1152				$.ajax( {
1153					url: "/mem/dialog/memChgReqForm.do",
1154					dataType: "text",
1155					data: {
1156						"fmidx": midx
1157					},
1158					success: function ( text ) {
1159						$html = $( text );
1160						$html.layout( {
1161							"title": "정보변경요청",
1162							"width": 600,
1163							"create": function () {
1164								$html.find( ".inpPhotoUpBtn" ).click( function ( e ) {
1165									e.preventDefault();
1166									var $this = $( this ).closest( ".inpPhotoWrap" );
1167									$.crop( {
1168										aspectRatio: 3 / 4
1169									}, function ( result ) {
1170										$this.find( ".inpPhotoSrc" ).attr( {
1171											"src": "/common/cmnFile/thumbnail.do?masterIdx=" + global.masterIdx + "&width=500&height=500&encSvrFileNm=" + $.encode( result.encSvrFileNm )
1172										} );
1173										$this.find( ".inpPhotoValu" ).val( result.svrFileNm );
1174										$( "#COMMOM_FILE_UPLOAD" ).dialog( "close" );
1175									} );
1176								} );
1177							},
1178							"action": function () {
1179								var $status = $html.find( "[name='status']" );
1180								var $mphon = $html.find( "[name='mphon']" );
1181								var $chgRegMphon = $html.find( "[name='chgRegMphon']" );
1182								var $memail = $html.find( "[name='memail']" );
1183								var $chgRegMemail = $html.find( "[name='chgRegMemail']" );
1184								var $chgRegMphoto = $html.find( "[name='chgRegMphoto']" );
1185								var $chgRegCphoto = $html.find( "[name='chgRegCphoto']" );
1186								if ( !$chgRegMphon.val() && !$chgRegMemail.val() && !$chgRegMphoto.val() && !$chgRegCphoto.val() ) {
1187									$.alert( "요청항목 값을 입력해주세요." );
1188									return;
1189								}
1190								if ( $mphon.val() && $mphon.val() == $chgRegMphon.val() ) {
1191									$.alert( "등록된 번호와 요청하신 휴대폰번호가 동일합니다." );
1192									return;
1193								}
1194								if ( $memail.val() && $memail.val() == $chgRegMemail.val() ) {
1195									$.alert( "등록된 주소와 요청하신 이메일주소가 동일합니다." );
1196									return;
1197								}
1198								$.confirm( "입력하신 정보로 요청하시겠습니까?", function () {
1199									$.ajax( {
1200										"url": "/mem/ajax/saveMemChgReqForm.do",
1201										"method": "post",
1202										"dataType": "json",
1203										"data": {
1204											"status": $status.val(),
1205											"fmidx": midx,
1206											"mphon": $chgRegMphon.val(),
1207											"memail": $chgRegMemail.val(),
1208											"mphoto": $chgRegMphoto.val(),
1209											"cphoto": $chgRegCphoto.val()
1210										},
1211										"close": function () {
1212											$.memberInfo( midx );
1213										},
1214										"success": function ( data ) {
1215											$.alert( "요청하신 작업이 완료되었습니다.\n 관리자 승인 후 적용됩니다.", function () {
1216												$html.dialog( "close" );
1217											} );
1218										}
1219									} );
1220									return true;
1221								} );
1222							}
1223						} );
1224					}
1225				} );
1226			} );
1227		}
1228		if ( $this.find( ".COMMON_SWIPER_SLIDE" ).length > 0 ) {
1229			$this.find( ".COMMON_SWIPER_SLIDE" ).each( function () {
1230				$node = $( this );
1231				var params = $node.data( "params" ) ? $node.data( "params" ) : {};
1232				swiper = new Swiper( $node, $.extend( {
1233					"slidesPerView": 2,
1234					"pagination": {
1235						"el": ".swiper-pagination",
1236						"clickable": true
1237					},
1238					"navigation": {
1239						"nextEl": ".swiper-button-next",
1240						"prevEl": ".swiper-button-prev"
1241					}
1242				}, params ) );
1243			} );
1244		}
1245		if ( $this.find( ".COMMON_SWIPER_SLIDE_TYPE1" ).length > 0 ) {
1246			var params = $this.find( ".COMMON_SWIPER_SLIDE_TYPE1" ).data( "params" );
1247			swiper = new Swiper( '.swipbizHP', $.extend( {
1248				"slidesPerView": 2,
1249				"pagination": {
1250					"el": ".swiper-pagination",
1251					"clickable": true
1252				},
1253				"navigation": {
1254					"nextEl": ".swiper-button-next",
1255					"prevEl": ".swiper-button-prev"
1256				}
1257			}, params ) );
1258		}
1259		if ( $this.find( ".COMMON_SWIPER_SLIDE_TYPE2" ).length > 0 ) {
1260			var params = $this.find( ".COMMON_SWIPER_SLIDE_TYPE2" ).data( "params" );
1261			swiper = new Swiper( '.swipbizHP-Auto', $.extend( {
1262				"slidesPerView": 2,
1263				"pagination": {
1264					"el": ".swiper-pagination",
1265					"clickable": true
1266				},
1267				"navigation": {
1268					"nextEl": ".swiper-button-next",
1269					"prevEl": ".swiper-button-prev"
1270				}
1271			}, params ) );
1272		}
1273		// 스와이프 슬라이드 베이스 //위젯에서 사용
1274		if ( $this.find( ".COMMON_SWIPER_SLIDE_BASE" ).length > 0 ) {
1275			var params = $this.find( ".COMMON_SWIPER_SLIDE_BASE" ).data( "params" );
1276			swiper = new Swiper( '.COMMON_SWIPER_SLIDE_BASE', $.extend( {
1277				"pagination": {
1278					"el": ".swiper-pagination",
1279					"clickable": true
1280				},
1281				"navigation": {
1282					"nextEl": ".swiper-button-next",
1283					"prevEl": ".swiper-button-prev"
1284				}
1285			}, params ) );
1286		}
1287		if ( $this.find( ".COMMON_MEMBER_INFO" ).length > 0 ) {
1288			$this.find( ".COMMON_MEMBER_INFO" ).click( function ( e ) {
1289				e.stopPropagation();
1290				e.preventDefault();
1291				var $target = $( this );
1292				var $memLstDetInfoViewTyCd = $( "input[name='memLstDetInfoViewTyCd']" ); // 회원수첩용 회원정보페이지 타입변경
1293				$.memberInfo( $target.data( "midx" ), $memLstDetInfoViewTyCd );
1294			} );
1295		}
1296		if ( $this.find( ".COMMON_MOBILE_MEM_MENU_LIST" ).length > 0 ) {
1297			$this.find( ".COMMON_MOBILE_MEM_MENU_LIST" ).click( function ( e ) {
1298				e.stopPropagation();
1299				e.preventDefault();
1300				if ( global.midx <= 0 ) {
1301					$.confirm( "로그인후 회원정보를 조회 할 수 있습니다.\n로그인을 진행하시겠습니까?", function () {
1302						$.loginPop();
1303						return true;
1304					} );
1305					return false;
1306				} else if ( !global.isAdmin && !global.isMember ) {
1307					$.alert( "현재 승인대기중입니다.\n관리자 승인 후 회원정보를 조회 할 수 있습니다." );
1308					return;
1309				}
1310				var $this = $( this );
1311				var encMidx = $this.data( "midx" );
1312				var $memLstDetInfoViewTyCd = $( "input[name='memLstDetInfoViewTyCd']" ); // 회원수첩용 회원정보페이지 타입변경
1313				var mname = $this.text();
1314				$.encMidxDecrypt( encMidx, function ( midx ) {
1315					$.ajax( {
1316						url: "/mem/dialog/mobileMemberInfoSetList.do",
1317						dataType: "text",
1318						data: {
1319							"midx": midx
1320						},
1321						success: function ( text ) {
1322							var $html = $( text );
1323							$html.dialog( {
1324								"title": mname,
1325								"modal": true,
1326								"open": function () {
1327									$( ".ui-dialog" ).addClass( "COMMON_MOBILE_SHUVIC_TOOL_BAR" );
1328									$( ".ui-dialog-titlebar-close" ).remove();
1329									$( ".ui-widget-overlay" ).on( "click", function () {
1330										$( ".memQuickMenuLinkBtn" ).removeClass( "d-none" );
1331										$html.dialog( "close" );
1332									} );
1333									$( ".memQuickMenuLinkBtn" ).addClass( "d-none" );
1334									$html.find( ".memInfoSet" ).click( function ( e ) {
1335										e.preventDefault();
1336										var $memInfoSetCd = $( this ).data( "params" );
1337										$html.dialog( "close" );
1338										if ( $memInfoSetCd == "0001" ) {
1339											$.insertPrsnlcnnt( midx );
1340										} else if ( $memInfoSetCd == "0002" ) {
1341											$.ajax( {
1342												url: "/mem/ajax/memMphonOppubYnChk.do",
1343												dataType: "json",
1344												data: {
1345													"midx": midx
1346												},
1347												success: function ( data ) {
1348													if ( data.result == "0001" ) {
1349														$.alert( "휴대폰 번호가 비공개입니다." );
1350													} else {
1351														if ( global.isMobile ) {
1352															$.ajax( {
1353																"url": "/mem/ajax/memMphonChk.do",
1354																"method": "post",
1355																"data": {
1356																	"midx": midx
1357																},
1358																"dataType": "json",
1359																"success": function ( data ) {
1360																	if ( data.result ) {
1361																		location.href = "sms:" + data.result;
1362																	} else {
1363																		$.alert( "회원만 문자를 보낼 수 있습니다." );
1364																	}
1365																}
1366															} );
1367														} else {
1368															$.addServiceSendSms( "0003", $.JSONEncode( [ midx ] ) );
1369														}
1370														/* $.addServiceSendSms( "0003" ,$.JSONEncode( [ midx ] ) ); */
1371													}
1372												}
1373											} );
1374										} else if ( $memInfoSetCd == "0003" ) {
1375											$.ajax( {
1376												url: "/mem/ajax/memMemailOppubYnChk.do",
1377												dataType: "json",
1378												data: {
1379													"midx": midx
1380												},
1381												success: function ( data ) {
1382													if ( data.result == "0001" ) {
1383														$.alert( "이메일 주소가 비공개입니다." );
1384													} else {
1385														$.addServiceSendEmail( "0003", $.JSONEncode( [ midx ] ) );
1386													}
1387												}
1388											} );
1389										} else if ( $memInfoSetCd == "0004" ) {
1390											$.memberMsgForm( midx );
1391										} else if ( $memInfoSetCd == "0005" ) {
1392											$.ajax( {
1393												url: "/mem/ajax/midxToMphon.do",
1394												dataType: "json",
1395												data: {
1396													"midx": midx
1397												},
1398												success: function ( data ) {
1399													if ( data.mphon ) {
1400														location.href = "tel:" + data.mphon;
1401													}
1402												}
1403											} );
1404										} else {
1405											$.memberInfo( encMidx, $memLstDetInfoViewTyCd );
1406										}
1407									} );
1408								}
1409							} );
1410						}
1411					} )
1412				} )
1413			} );
1414		}
1415		if ( $this.find( ".COMMON_IMAGE_ZOOM" ).length > 0 ) {
1416			$this.find( ".COMMON_IMAGE_ZOOM" ).click( function ( e ) {
1417				e.preventDefault();
1418				if ( global.isMobile ) {
1419					$.ajax( {
1420						"method": "post",
1421						"dataType": "text",
1422						"url": "/common/cmnFile/dialog/imageView.do",
1423						"data": {
1424							"src": $.base64Encode( $( this ).attr( "src" ).replace( /((width|height))\=([0-9]+)/gi, "$1=5000" ) )
1425						},
1426						"success": function ( html ) {
1427							var $html = $( html ).find( "#JS-imgViewWrap" );
1428							$html.layout( {
1429								"width": "100%",
1430								"height": $( window ).height(),
1431								"create": function () {
1432									$html.find( ".JS-imgViewCloseBtn" ).click( function ( e ) {
1433										e.preventDefault();
1434										$html.dialog( "close" );
1435									} );
1436								},
1437							} );
1438						}
1439					} );
1440				} else {
1441					$.openWindow( "/common/cmnFile/imageView.do?src=" + $.base64Encode( $( this ).attr( "src" ).replace( /((width|height))\=([0-9]+)/gi, "$1=5000" ) ) );
1442				}
1443			} );
1444		}
1445		if ( $this.find( "form[name='memberPwdUpdForm'] input[name='mpass'],form[name='pwdUpdForm'] input[name='mpass'],form[name='pwdUpdForm'] input[name='mpassChk']" ).length > 0 ) {
1446			$this.find( "form[name='memberPwdUpdForm'] input[name='mpass'],form[name='pwdUpdForm'] input[name='mpass'],form[name='pwdUpdForm'] input[name='mpassChk']" ).each( function () {
1447				var $this = $( this );
1448				var $wrap = $( "<div>" ).attr( {
1449					"class": "mpassWrap"
1450				} );
1451				$this.wrap( $wrap );
1452				$this.parent().append( '<a href="#" class="mpassEyeBtn"><i class="far fa-square fa-fw ' + ( $( this ).outerHeight() > 50 ? "fa-2x" : "fa-lg" ) + '"></i><span class="ver_pc">비번보기</span><span class="ver_m">비번보기</span></a>' );
1453				var $mpassEyeBtn = $this.parent().find( ".mpassEyeBtn" );
1454				$mpassEyeBtn.click( function ( e ) {
1455					e.preventDefault();
1456					var $btn = $( this );
1457					if ( $this.is( "[type='password']" ) ) {
1458						$this.attr( "type", "text" );
1459						$btn.find( "i" ).removeClass( "fa-square" ).addClass( "fa-check-square" );
1460					} else {
1461						$this.attr( "type", "password" );
1462						$btn.find( "i" ).removeClass( "fa-check-square" ).addClass( "fa-square" );
1463					}
1464				} );
1465			} );
1466		}
1467		$this.find( ".COMMON_LIST > li > a" ).click( function () {
1468			var $commonList = $( this ).closest( ".COMMON_LIST" );
1469			var $currentLi = $( this ).closest( "li" );
1470			if ( $currentLi.is( ".on" ) ) {
1471				$commonList.children( "li" ).removeClass( "on" ).find( "a > i" ).removeClass( "fa-angle-down" ).addClass( "fa-angle-right" );
1472			} else {
1473				$currentLi.addClass( "on" );
1474				$currentLi.find( "i" ).removeClass( "fa-angle-right" ).addClass( "fa-angle-down" );
1475				$commonList.children( "li" ).not( $currentLi ).removeClass( "on" ).find( "a > i" ).removeClass( "fa-angle-down" ).addClass( "fa-angle-right" );
1476			}
1477		} );
1478		$this.find( ".dvcDspyChgBtn" ).click( function () {
1479			if ( global.hstMbDivrsnYn && !global.isAdmin ) {
1480				$.alert( "해당 홈페이지는 모바일 전용 홈페이지로\nPC화면은 제공되지 않습니다.\n\nPC 사용은 별도로 신청 바랍니다. 문의) 02-499-9980" );
1481				return;
1482			}
1483			var dvcDspyChgSxnCd = $( this ).data( "params" );
1484			$.cookie( "DVC_DSPY_CHG_SXN_CD", dvcDspyChgSxnCd, {
1485				expires: 0,
1486				path: '/',
1487				secure: 0
1488			} );
1489			if ( dvcDspyChgSxnCd == "0001" ) {
1490				$.redirect( global.mappingUrl );
1491			} else {
1492				if ( global.mappingUrl.match( /^\/okdcMngt(.+)/gi ) ) {
1493					$.redirect( "/okdcMngt/okdcMngtMain.do" );
1494				} else {
1495					$.redirect( global.isHome ? "/home/" + global.home.cbidx + "/index.do" : "/index.do" );
1496				}
1497			}
1498		} );
1499		$this.find( ".JS-boardBmannddtBtn" ).click( function () {
1500			$this = $( this );
1501			$.alert( "공지 종료일 : " + $this.data( "params" ).bmannddt );
1502		} );
1503		$this.find( 'input, textarea' ).placeholder();
1504		return $this;
1505	}
1506} );

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.