PageSourceSearch

https://www.gwanak.go.kr/js/gwanak/common-ui.js?v=2026100213

js gwanak.go.kr collected 2026-10-02 04:27:32 UTC 14,233 bytes, 500 lines download raw bytes

1$(document).ready(function(){
2	
3	//스킵 내비게이션
4	(function(global, $){	    
5	    $('.skip-nav').on('click', 'a', function(e) {
6	        e.preventDefault();
7	        var hash = this.getAttribute('href'),
8	        $target = $.data(this, 'target') ? $.data(this, 'target') : $.data(this, 'target', $( hash ));
9	        $target.attr('tabindex','0').focus();
10	        $target.on('blur', removeTabindex.bind($target) );
11	        global.location.hash = hash;
12	    });
13	    function removeTabindex() { this.removeAttr('tabindex'); }	
14	})(window, window.jQuery);
15
16	//모바일체크
17	var filter = "win16|win32|win64|mac";
18    if( navigator.platform  ){
19    	//alert(navigator.platform);
20        if( filter.indexOf(navigator.platform.toLowerCase())<0 ){
21        	$('body').addClass('mobile');
22        }else{
23            $('body').addClass('pc');
24        }
25    }
26    
27    //디바이스 사이즈체크
28    var width =  $("html").width();	
29	if(width < 600){
30		$("html").removeClass().addClass("msize");		
31	}else if(width > 600 && width < 800){
32		$("html").removeClass().addClass("tsize");		
33	}else{
34		$("html").removeClass().addClass("pcsize");
35	}
36	
37    //상단 바 하위메뉴
38    $(".subOpen > button").on("click",function(){    	
39		if($(this).parent().children('div').css("display")=="none"){
40			topBarSubClose();
41			$(this).parent().children('div').show();
42		}else{
43			topBarSubClose();
44		}
45	});
46    
47    //상단 바 하위메뉴
48    $(".subOpen .close a").on("click",function(){    	
49    	topBarSubClose();
50    	$(this).parent().parent().prev().focus();
51		return false;
52	});
53    
54    //상단 바 하위메뉴 닫기
55    $(".subOpen .dong-menu a:last").focusout(function(){    	
56    	$(this).parent().parent().hide();
57	});
58    $(".subOpen .mypage a:last").focusout(function(){    	
59    	$(this).parent().parent().parent().hide();
60	});
61
62    
63	mobileNav();
64   
65    //왼쪽 서브메뉴
66	$('#snav .dep1 > li > a').on("click",function(e){
67		snavControl(this,e);
68	});
69	$('#snav .dep2 > li > a').on("click",function(e){
70		snavControl(this,e);
71	});
72	
73	//모바일 메뉴
74	$('#gnavM > li > a').on("click",function(e){
75		snavControl(this,e);
76	});
77	$('#gnavM .dep2 > li > a').on("click",function(e){
78		snavControl(this,e);
79	});
80	$('#gnavM .dep3 > li > a').on("click",function(e){
81		snavControl(this,e);
82	});
83	
84	
85	//sns공유하기
86	snsShareView();
87
88 	//탭메뉴2
89	$('.tab-contents > div').hide();
90	$('.tab-contents').each(function(){
91		$(this).children('div').first().show();
92	});
93	$('.con-tab').each(function(){
94		$(this).find('li:eq(0)').addClass('on');
95		$(this).find('li:eq(0) a').attr("title","선택됨");
96	});
97	$('.con-tab li a').on('click', function(e){
98		$(".con-tab li a").attr("title","");
99		$(this).parent().parent().children('li').removeClass('on');
100		$(this).parent().parent().children('li').children('span').remove();
101		$(this).attr("title","선택됨");
102		$(this).parent().addClass('on');
103		$(this).parent().append('<span class="arr"></span>');
104		
105		var activeTab = $(this).attr('href');
106		if($(this).parent().parent().parent().next().attr("id")=="gisMap"){
107			$(this).parent().parent().parent().next().next().children('div').hide();
108			$(this).parent().parent().parent().next().next().children(activeTab).show();
109		}else{
110			$(this).parent().parent().parent().next().children('div').hide();
111			$(this).parent().parent().parent().next().children(activeTab).show();
112		}
113		e.preventDefault();
114		
115		if(typeof map1 === "undefined" || typeof map1m === "undefined" || typeof map2 === "undefined" || typeof map2m === "undefined" || typeof map3 === "undefined" || typeof map3m === "undefined" || typeof map4 === "undefined" || typeof map4m === "undefined" || typeof map5 === "undefined" || typeof map5m === "undefined" || typeof map6 === "undefined" || typeof map6m === "undefined" ) {
116
117		}else{
118			map1.relayout();
119			map1m.relayout();
120			map2.relayout();
121			map2m.relayout();
122			map3.relayout();
123			map3m.relayout();
124			map4.relayout();
125			map4m.relayout();
126			map5.relayout();
127			map5m.relayout();
128			map6.relayout();
129			map6m.relayout();
130			map1.setCenter(markerPosition1);
131			map1m.setCenter(markerPosition1);
132			map2.setCenter(markerPosition2);
133			map2m.setCenter(markerPosition2);
134			map3.setCenter(markerPosition3);
135			map3m.setCenter(markerPosition3);
136			map4.setCenter(markerPosition4);
137			map4m.setCenter(markerPosition4);
138			map5.setCenter(markerPosition5);
139			map5m.setCenter(markerPosition5);
140			map6.setCenter(markerPosition6);
141			map6m.setCenter(markerPosition6);
142		}
143	});
144 	
145	
146	//공유 하기
147	$("a.sns_share").click(function(e){
148		e.preventDefault();
149		var _this = $(this);
150		var sns_type = _this.attr('data-service');
151		var shareUrl = "https://www.gwanak.go.kr"+location.pathname+location.search;
152		var title = $("meta[name=Description]").attr("content");
153		var img = "";
154		var loc = "";
155		
156		if( sns_type == 'facebook' ) {
157			var shareURL = encodeURIComponent(shareUrl);
158			var popOption = "width=640,height=500,left=100,top=25,location=no,menubar=no,status=no,scrollbars=no,resizable=no,toolbar=no";
159			var url = "https://www.facebook.com/dialog/share?app_id=666830866810855&display=popup&href="+shareURL;
160			window.open(url,"facebook",popOption);
161 		}
162		else if ( sns_type == 'twitter' ) {
163			title = '[관악구청] '+title;
164			loc = '//x.com/intent/tweet?url='+encodeURIComponent(shareUrl)+'&text='+encodeURIComponent(title);
165			windowOpen(loc , 800, 400, 'yes' );
166		}
167		else if ( sns_type == 'naver' ) {
168			title = '[관악구청] '+title;
169			loc = "https://blog.naver.com/openapi/share?url="+encodeURIComponent(shareUrl)+"&title="+encodeURIComponent(title);
170			windowOpen(loc , 600, 600, 'yes' );
171		}
172		else {
173			return false;
174		}
175		return false;
176	})
177	
178
179});
180
181
182function home_url_copy(){
183	var url = '';
184	var textarea = document.createElement("textarea");
185	document.body.appendChild(textarea);
186	url = window.document.location.href;
187	textarea.value = url;
188	textarea.select();
189	document.execCommand("copy");
190	document.body.removeChild(textarea);
191	alert("현재 페이지 주소가 복사되었습니다.\n원하는 곳에 Ctrl+V로 붙여넣기 해주세요.")
192	$(".copylink").focus();
193}
194
195$(window).on("load",function(){
196	
197	mTabSet();	
198	var w = $(window).width();	
199	
200	if(w<800){
201		$(".tab-wrap").each(function(){			
202			$(this).children('.tabTxt').on("click",function(){
203				var $list = $(this).parent().find('ul');
204				
205				if($list.css("display")=="block"){
206					$list.slideUp(500);
207					$(this).removeClass('arr-down').addClass('arr-up');
208				}else{
209					$list.slideDown(500);
210					$(this).removeClass('arr-up').addClass('arr-down');
211				}
212			});
213			$(this).find("a").on("click",function(){
214				$(this).parent().parent().slideUp(500);
215				$('.tabTxt').html($(this).text());
216			});
217			
218		});
219	}
220	
221	//달력버튼
222	$("#riReservationSdate").next().attr("alt","접수기간 시작일 달력보기");
223	$("#riReservationEdate").next().attr("alt","접수기간 종료일 달력보기");
224
225});
226
227$(window).resize(function(){    	
228	topBarSubClose();
229	mTabSet();
230}).resize();
231
232function topBarSubClose(){
233	$(".subOpen > div").hide();
234}
235
236function mTabSet(){	
237	var w = $(window).width();		
238	$(".tab-wrap").each(function(){
239		if($(this).find(".tabTxt").length == 0){
240			$(this).append("<div class='tabTxt arr-down'></div>");							
241		}
242		var currentTxt = $(this).find('.on').children('a').html();
243		//alert(currentTxt);				
244		$(this).children('.tabTxt').html(currentTxt);	
245		
246		
247		if(w<800){
248			$(this).children('.tabTxt').show();
249		}else{			
250			$(this).find('.tabTxt').hide();
251		}
252	});		
253}
254
255function mobileNav(){	
256
257	if($('#mobile-menu').length > 0){
258		
259		$('body').prepend("<div class='blind' style='cursor:pointer;'></div>");
260		 $('#mobile-menu').sidr({
261			timing: 'ease-in-out',
262			speed: 500,
263			onOpen: function () {
264				sidrOpen();
265			},
266			onClose: function () {
267				sidrClose();
268			}
269	    });    
270	    
271	    $("body").click(function(){
272	    	sidrClose();
273	    });
274	    $(".go-menu").click(function(e){
275	    	e.stopPropagation();
276	    });
277	    $("#sidr").click(function(e){
278	    	e.stopPropagation();
279	    });
280	    
281	    function sidrOpen(){
282	    	$(".blind").show().stop().animate({"opacity":0.7},500);
283	    	$("html").css("overflow","hidden");	
284	    }
285	
286	    function sidrClose(){
287	    	$.sidr('close', 'sidr');
288	    	$(".blind").stop().animate({"opacity":0},500).hide();
289	    	$("html").css("overflow","auto");
290	    }
291	
292	    $(window).resize(function(){
293	    	sidrClose();    	
294	    }).resize();
295	    
296	}
297	
298}
299
300
301function snavControl(obj,e){
302	$obj = $(obj);
303	if($obj.parent().hasClass("arr")){
304		e.preventDefault();
305		
306		$obj.parent().parent().children(".open").children("ul").slideUp(500);
307		$obj.parent().parent().children(".open").removeClass("open");
308		$obj.parent().parent().children(".open").removeClass("on");
309		
310		
311		if($obj.next().css("display")=="none"){				
312			$obj.next().slideDown(500);
313			$obj.parent().addClass("open");
314			
315		}else{
316			$obj.next().slideUp(500);
317			$obj.parent().removeClass("open");
318		}
319	}	
320}
321
322function snsShareView(){
323	var $sns = $(".sns-share");
324	$(".btn-share").click(function(){
325		if($sns.css("display")!="block"){
326			$sns.fadeIn(200);
327			$("#container").addClass("ovh")
328		}else{
329			$sns.fadeOut(200);
330			$("#container").removeClass("ovh")
331		}			
332	});	
333	
334    $(".close-share").click(function(){
335		$sns.fadeOut(200);
336		$("#container").removeClass("ovh")
337    })
338
339	$("body").click(function(){
340		$sns.fadeOut(200);
341		$("#container").removeClass("ovh")
342    });
343	$sns.click(function(e){
344    	e.stopPropagation();
345    });
346	$(".btn-share").click(function(e){
347    	e.stopPropagation();
348    });
349	
350	$(".contents-top .con-sns .print a").focusin(function(){
351		$sns.fadeOut(200);
352	});
353}
354
355
356function colspanSet(mNum,pcNum){
357	var num;
358	var w = $(window).width();
359	if(w<800){
360		num = mNum;
361	}else{		
362		num = pcNum;
363	}
364	$(".boardNoneData").attr("colspan",num);
365}
366
367function windowOpen() {
368	var nUrl; var nWidth; var nHeight; var nLeft; var nTop; var nScroll;
369	nUrl = arguments[0];
370	nWidth = arguments[1];
371	nHeight = arguments[2];
372	nScroll = (arguments.length > 3 ? arguments[3] : "no");
373	nLeft = (arguments.length > 4 ? arguments[4] : (screen.width/2 - nWidth/2));
374	nTop = (arguments.length > 5 ? arguments[5] : (screen.height/2 - nHeight/2));
375   
376	winopen=window.open(nUrl, 'sns_win', "left="+nLeft+",top="+nTop+",width="+nWidth+",height="+nHeight+",scrollbars="+nScroll+",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no");
377}
378
379function storyOpen(strSubject){
380	Kakao.Story.share({
381	    url: location.href,
382	    text: "[관악구청] "+strSubject
383	});
384}
385//온라인관악청 JavaScript 키 
386//Kakao.init('ebe3dcb61cf959c9a3d8097e4ef091c4');
387function kakaoOpen(strSubject) {
388
389var textArr = strSubject.split(">");
390var textLength = textArr.length-1;
391//var description = $("meta[name=Description]").attr("content");
392 
393var content = $("meta[name=Description]").attr("content");
394 
395var text = "[관악구청]"+textArr[textLength];
396
397var shareUrl = "https://www.gwanak.go.kr"+location.pathname+location.search;
398var img = "https://www.gwanak.go.kr/images/og_img.png";
399Kakao.Link.sendDefault({
400	objectType: 'feed',
401	content: {
402		title: text,
403		description: "#관악구청",
404		imageUrl: img,
405		imageWidth: 181,
406		imageHeight: 112,
407		link: {
408			mobileWebUrl: shareUrl,
409			webUrl: shareUrl
410		}
411	},
412	buttons: 
413	[{
414		title: '바로가기',
415		link: {
416			mobileWebUrl: shareUrl,
417			webUrl: shareUrl
418		}
419	}]
420});
421}
422
423function share_band(strSubject){
424
425	var content = $("#mtTitle").attr("content");
426
427	if(content != undefined) {
428		strSubject = strSubject + "(" + content + ")";
429	}
430
431	 var shareUrl = "http://www.band.us/plugin/share?body="+encodeURIComponent(strSubject)+encodeURIComponent(location.href)+"&route="+encodeURIComponent(location.href);
432	 window.open(shareUrl, "share_band", "width=410, height=540, resizable=no"); 
433} 
434
435window.fbAsyncInit = function(){
436	FB.init({
437		appId	: '305698429832106',
438		xfbml 	: true,
439		version : 'v2.8'
440	});
441};
442
443(function(d, s, id){
444	var js, fjs = d.getElementsByTagName(s)[0];
445	if(d.getElementById(id)){return;}
446	js = d.createElement(s); js.id = id;
447	js.src = '//connect.facebook.net/en_US/sdk.js';
448	fjs.parentNode.insertBefore(js, fjs);
449}(document, 'script', 'facebook-jssdk'));
450
451//페이스북
452function facebookOpen(strSubject) {
453	 
454	var shareURL = encodeURIComponent(location.href);
455	var popOption = "width=640,height=500,left=100,top=25,location=no,menubar=no,status=no,scrollbars=no,resizable=no,toolbar=no";
456	var url = "https://www.facebook.com/dialog/share?app_id=666830866810855&display=popup&href="+shareURL;
457	window.open(url,"facebook",popOption);
458}
459//twitter
460function twitterOpen(strSubject) {
461	var title = "[관악구청] "+strSubject;
462	title = title.replace (/'/gi,"´");
463	title = title.replace (/"/gi,"˝");
464
465	var content = $("#mtTitle").attr("content");
466
467	if(content != undefined) {
468		title = title + "(" + content + ")";
469	}
470
471	title = encodeURIComponent(title);
472	var link = encodeURIComponent(location.href);
473	var url = "http://x.com/share?text=" + title + "&url=" + link;
474	windowOpen(url, 800, 400, 'yes');
475}
476
477//블러그
478function naverBlogOpen(strSubject) {
479
480	var textArr = strSubject.split(">");
481    var textLength = textArr.length-1;
482	var content = $("#mtTitle").attr("content");
483	var text = "[관악구청]"+textArr[textLength];
484	if(content != undefined) {
485		text += "("+content+")";
486	}
487	var shareUrl = "https://www.gwanak.go.kr"+location.pathname+location.search;
488	loc = "https://blog.naver.com/openapi/share?url="+encodeURIComponent(shareUrl)+"&title="+encodeURIComponent(text);
489	windowOpen(loc , 600, 600, 'yes' );
490	
491}
492
493$(document).on("click",".blind",function(){
494	if($("#sidr").css("display") != "none"){
495		$.sidr('close', 'sidr');
496		$(".blind").stop().animate({"opacity":0},500).hide();
497		$("html").css("overflow","auto");
498	}
499});
500

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.