PageSourceSearch

https://www.ysc.ac.kr/resources/_Templet/Layout/layout_kor/Js/common.js

js ysc.ac.kr collected 2026-10-01 14:38:29 UTC 7,237 bytes, 269 lines download raw bytes

1var _thisLayout_style = {};var _orgLayout_style = {};
2function checkPageStyle(){
3	_orgLayout_style =  $.extend({},_thisLayout_style);  _thisLayout_style = getPageStyle();
4}
5function getPageStyle(){
6	var pg_type = {};
7	var chkW = $("#header").width();
8	if(_isLowBr_ && chkW >999) chkW = wsize.win.w;
9	return pg_type;
10}
11/////////////////////////////////////////////////////////////////////////////
12function _setLayoutFooter(){
13	
14}
15function _resetFooterHeight(){
16	if($("#fsitemap").hasClass("is-open")){
17		var toH = $("#fsitemap .fsitemenu").outerHeight();
18		$("#fsitemap").css({"height":toH + 40});
19
20	}
21}
22function _getLayoutHeaderHeight(){
23return	$("#header-wrap").outerHeight();
24}
25
26//-------------------------------------------------------------------------------
27function resetTabSize(){
28	var tabLimit = 6;
29	try{
30		if(_thisPage_cfg.tab_line_limit!=undefined && _thisPage_cfg.tab_line_limit) tabLimit = _thisPage_cfg.tab_line_limit;
31	}catch(e){}
32	setContTabmenu();
33}
34function setContTabmenu(){	
35	$(".c-tab01").rspnsvTab_fauto({height:64,line_limit:6,wsize_data:[{"wsize":999,"list_mod":4},{"wsize":700,"list_mod":1}]});
36	//$(".c-tab02").not(".noAutoTab").rspnsvTab_auto({height:40,showCtrlBtns:true,ctrlBtnWidth:40,line_limit: 5});
37	
38	$("#multi-tab01").multiTab_auto({line_limit:5, height:60, showCtrlBtns:true, ctrlBtnWidth:50});
39	
40	$("#multi-tab01 .first-row").each(function(){	
41		var ctWidth = $(this).width() - 2;
42		var ct_w = $(this).width();
43		
44		$(this).css({width:ctWidth});
45	});
46}
47
48function setContAutoWidth(){
49	if($(".is-wauto-box").length>0 ) {
50		if( typeof(setMinWidthAutoScrollBox) !="function" )  $.getScript("/resources/_Js/jquery/jquery.cs_wauto.js",function(){ setMinWidthAutoScrollBox(); });
51		else{ setMinWidthAutoScrollBox(); }	
52	}
53}
54
55//-------------------------------------------------
56
57
58
59/******************/
60function resetImgZoom(){
61	var zwObj =  $('.img-zoom');
62	zwObj.each(function(){
63		var this_s = $(this);
64		var zwObjImg = this_s.children("img");
65		var zwObjUrl = zwObjImg.attr("src");
66		var win_w = $(window).innerWidth();
67
68		if(win_w<=768){
69			this_s.append("<a href='" + zwObjUrl + "' class='btn-zoom' target='_blank' title='새창열림'><span class='blind'>이미지 확대보기</span></a>");
70			zwObjImg.addClass("zoom");
71		} else {
72			$(".btn-zoom, .btn-down", $(this).parent()).remove();
73			zwObjImg.removeClass("zoom");
74		}
75	});
76}
77
78
79
80$(function(){
81	/* top 버튼 */
82    // Fakes the loading setting a timeout
83    setTimeout(function () {
84        $('body').addClass('loaded');
85    }, 400);
86	
87    $(window).scroll(function () {
88        if ($(this).scrollTop() > $(window).height() * 0.2) {
89            $('.topBt').addClass('over');
90        } else {
91            $('.topBt').removeClass('over');
92        }
93    });
94
95    //Click event to scroll to top
96    $('.topBt').click(function () {
97        $('html, body').animate({ scrollTop: 0 }, 300);
98        return false;
99    });
100    
101    //푸터사이트 스크롤디자인
102    $(window).on("load",function(){
103    	//$("#footer-wrap .service-list").mCustomScrollbar();
104    	//$("#footer-wrap .family-site-wr .family-site .isSelSub ul").mCustomScrollbar();
105    });
106
107
108});
109
110
111//footer관련사이트
112function flinkBox(){
113    var toggleFlink = $(".family-site button");
114    var flinkWr = $(".family-site .isSelSub");
115    if(toggleFlink.hasClass("is-open")){
116        closeFlinkBox();
117    } else {
118        openFilinkBox();
119    }    
120    $(".btn-fclose",flinkWr).click(function(){
121        closeFlinkBox();        
122    });
123    function openFilinkBox(){
124        toggleFlink.addClass("is-open");
125        $(flinkWr).slideDown("fast").append("<button type='button' class='btn-fclose'><span class='blind'>닫기</span></button>");                
126    }
127    function closeFlinkBox(){
128        toggleFlink.removeClass("is-open").focus();
129        $(flinkWr).slideUp("fast");
130        $(".btn-fclose",flinkWr).remove();
131    }
132}
133
134var util = {
135		init : function() {
136
137		},
138		alertWsize : function() {
139			alert( $(window).width() );
140		},
141		isPC : function() {
142			var filter = "win16|win32|win64|mac|macintel";
143			if ( navigator.platform ) {
144				if ( filter.indexOf( navigator.platform.toLowerCase() ) < 0 ) {
145					return false;
146				} else {
147					return true;
148				}
149			}
150		}
151	}
152
153
154/* 언어선택 */
155var listSelctItem;
156if (listSelctItem == undefined) {	listSelctItem = function (obj,settings) {		this._init(obj,$.extend({box_mg_top:0,box_mg_bottom:0,item_height:20},settings));	}; }
157listSelctItem.prototype._init = function (obj,settings) {
158		
159	
160		this.obj = obj;//$(".top-sel-list .sub-list li a")
161		this.settings = settings;
162		this.selBtns = $("dt a ",this.obj);
163		this.subObj = $(".sub-list",this.obj);
164		this.subItems = $("li a",this.subObj);
165
166
167		this.hideHeight = this.subObj.height()+this.settings.box_mg_top+this.settings.box_mg_bottom;
168
169		var this_s = this;
170		//$(this.selBtns).bind("click",function(){	$(this_s.subObj).stop().animate({"top":30});return false;		});
171		$(this.selBtns).unbind("click");
172		$(this.selBtns).bind("click",function(){	
173
174			if($(this_s.obj).attr("isOpen")=="1"){
175
176				this_s.hideSublist();
177			}else{
178
179				this_s.viewSublist();
180			}
181
182			return false;
183
184			//$(this_s.obj).stop().animate({"height":120},200);return false;		
185			});
186
187		this.subItems.unbind("focus mouseover blur mouseout");
188		this.subItems.bind("focus mouseover",function(){
189			clearTimeout(this_s.Timer);
190			this_s.isOnFocus = true;
191			this_s.setOn();
192			this_s.Timer = setTimeout(function (){this_s.setOn()},50);
193		});
194	
195		
196		this.subItems.bind("blur",function(){
197			clearTimeout(this_s.Timer);
198			this_s.isOnFocus = false;
199			this_s.Timer = setTimeout(function (){this_s.setOn()},2000);
200		});
201
202		
203		
204		//$(this.obj).bind("mouseout",function(){
205		$(this.selBtns).bind("mouseout",function(){
206			clearTimeout(this_s.Timer);
207			this_s.isOnFocus = false;
208			this_s.Timer = setTimeout(function (){this_s.setOn()},2000);
209		});
210
211		$(this.subObj).bind("mouseout",function(){
212			clearTimeout(this_s.Timer);
213			this_s.isOnFocus = false;
214			this_s.Timer = setTimeout(function (){this_s.setOn()},500);
215		});
216		
217}
218					
219listSelctItem.prototype.setOn = function(){
220
221
222	if(this.isOnFocus){
223		this.viewSublist();
224	
225	}else{
226		this.hideSublist();
227
228	}
229
230	try{resizePageLayoutHeight();}catch(e){}
231	
232}
233
234listSelctItem.prototype.viewSublist = function(){
235
236		var toH = $("dt",this.obj).outerHeight() + $(this.subObj).outerHeight() + this.settings.box_mg_top+this.settings.box_mg_bottom;
237		$(this.obj).stop().css({"height":toH});
238		setTimeout(function(){ try{resizePageLayoutHeight();}catch(e){} },250);
239
240		$(this.obj).attr("isOpen","1");
241}
242
243listSelctItem.prototype.hideSublist = function(){
244	
245		var toH = $("dt",this.obj).outerHeight();
246		$(this.obj).stop().css({"height":toH});
247		setTimeout(function(){ try{resizePageLayoutHeight();}catch(e){} },250);
248
249		$(this.obj).attr("isOpen","0");
250}
251
252// 마크업 들어간 윈도우 새창팝업
253function open_windowPopup2(w,h,l,t,pop_seq,pop_url){
254	var hh = parseInt(h,10) +50;
255
256	var open_windowPopup2_option ={
257			url : pop_url,
258			name : "open_windowPop2_" + pop_seq,
259			width : w,
260			height : hh,
261			left : l,
262			top : t,
263			scrollbars : "no",
264			resizable : "no"
265		};
266	if( getCookie('open_windowPop2_'+pop_seq) != "done" ){
267		popupOpen( open_windowPopup2_option );
268	}
269}

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.