skybarleya.kro.kr Open in urlscan Pro
222.237.78.132  Public Scan

URL: http://skybarleya.kro.kr/nariya/js/nariya.js?ver=210618
Submission: On March 14 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

// Nariya Menu
(function($) {
	$.fn.nariya_menu = function(e) {

		var subname = '.sub-slide';
		var submenu = $(this).find(subname).parent();

		submenu.each(function(e){

			var targetmenu = $(this).children(subname + ":eq(0)");

			$(this).hover(
				function(e){
					if (targetmenu.queue().length <= 1) {
						targetmenu.slideDown(300, 'swing');
					}
				},
				function(e){
					targetmenu.hide();
				}
			) //end hover

			$(this).click(function(){
				targetmenu.hide();
			})

			/* 紐⑤컮�쇱뿉�� 硫붾돱 �대┃��
			if(g5_is_mobile) {
				$(this).hover(
					function(e){
						;
					},
					function(e){
						targetmenu.hide();
					}
				) //end hover
				$(this).click(function(){
					if (targetmenu.queue().length <= 1) {
						targetmenu.slideDown(300, 'swing');
						// �대룞�덈릺寃� href 媛� 蹂�寃�
						$(this).children("a:eq(0)").prop('href', '#');
					}
				}) //end click
			} else {
				$(this).hover(
					function(e){
						if (targetmenu.queue().length <= 1) {
							targetmenu.slideDown(300, 'swing');
						}
					},
					function(e){
						targetmenu.hide();
					}
				) //end hover

				$(this).click(function(){
					targetmenu.hide();
				})
			}
			*/
		}); //end submenu.each()
	}
}(jQuery));

// Submit �� �� �쇱냽�� 寃���
function na_wrestSubmit(f) {
    wrestMsg = "";
    wrestFld = null;

    var attr = null;

    // �대떦�쇱뿉 ���� �붿냼�� 媛쒖닔留뚰겮 �뚮젮��
    for (var i=0; i<f.elements.length; i++) {
        var el = f.elements[i];

        // Input tag �� type �� text, file, password �쇰븣留�
        // ���됲듃 諛뺤뒪�쇰븣�� �꾩닔 �좏깮 寃��ы빀�덈떎. select-one
        if (el.type=="text" || el.type=="hidden" || el.type=="file" || el.type=="password" || el.type=="select-one" || el.type=="textarea") {
            if (el.getAttribute("required") != null) {
                wrestRequired(el);
            }

            if (el.getAttribute("minlength") != null) {
                wrestMinLength(el);
            }

            var array_css = el.className.split(" "); // class 瑜� 怨듬갚�쇰줈 �섎닎

            el.style.backgroundColor = wrestFldDefaultColor;

            // 諛곗뿴�� 湲몄씠留뚰겮 �뚮젮��
            for (var k=0; k<array_css.length; k++) {
                var css = array_css[k];
                switch (css) {
                    case "required"     : wrestRequired(el); break;
                    case "trim"         : wrestTrim(el); break;
                    case "email"        : wrestEmail(el); break;
                    case "hangul"       : wrestHangul(el); break;
                    case "hangul2"      : wrestHangul2(el); break;
                    case "hangulalpha"  : wrestHangulAlpha(el); break;
                    case "hangulalnum"  : wrestHangulAlNum(el); break;
                    case "nospace"      : wrestNospace(el); break;
                    case "numeric"      : wrestNumeric(el); break;
                    case "alpha"        : wrestAlpha(el); break;
                    case "alnum"        : wrestAlNum(el); break;
                    case "alnum_"       : wrestAlNum_(el); break;
                    case "telnum"       : wrestTelNum(el); break; // 源��좎슜 2006.3 - �꾪솕踰덊샇 �뺤떇 寃���
                    case "imgext"       : wrestImgExt(el); break;
                    default :
                        if (/^extension\=/.test(css)) {
                            wrestExtension(el, css); break;
                        }
                } // switch (css)
            } // for (k)
        } // if (el)
    } // for (i)

    // �꾨뱶媛� null �� �꾨땲�쇰㈃ �ㅻ쪟硫붿꽭吏� 異쒕젰�� �ъ빱�ㅻ� �대떦 �ㅻ쪟 �꾨뱶濡� ���
    // �ㅻ쪟 �꾨뱶�� 諛곌꼍�됱긽�� 諛붽씔��.
    if (wrestFld != null) {
        // 寃쎄퀬硫붿꽭吏� 異쒕젰
        alert(wrestMsg);

        if (wrestFld.style.display != "none") {
            var id = wrestFld.getAttribute("id");

            // �ㅻ쪟硫붿꽭吏�瑜� �꾪븳 element 異붽�
            var msg_el = document.createElement("strong");
            msg_el.id = "msg_"+id;
            msg_el.className = "msg_sound_only";
            msg_el.innerHTML = wrestMsg;
            wrestFld.parentNode.insertBefore(msg_el, wrestFld);

            var new_href = document.location.href.replace(/#msg.+$/, "")+"#msg_"+id;

            document.location.href = new_href;

            //wrestFld.style.backgroundColor = wrestFldBackColor;
            if (typeof(wrestFld.select) != "undefined")
                wrestFld.select();
            wrestFld.focus();
        }
        return false;
    }

    return true;
}

function na_win(id, url, width, height) {
	window.open(url, id, "width=" + width + ",height=" + height +",scrollbars=1");
	return false;
}

// iframe�먯꽌 紐⑤떖李� �リ린��
window.closeClipModal = function() {
	$('#clipModal').modal('hide');
}

function na_iframe(url) {

	$('#clipModal').on('show.bs.modal', function () {

		var iframe_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;

		$("#clipView").html('<iframe id="clipContent" src="' + url + '"></iframe>');
		$('#clipContent').height(parseInt(iframe_height * 0.85)); // 85%
	});

	$('#clipModal').modal('show');
}

function na_nav(id, target, css) {

	var nav = $("#" + id);
	var height = nav.height();

	if(height > 25) {
		$("#" + target).height(height);
		nav.addClass(css);
	}
}

function na_clip(id, clip) {

	var url = g5_url + '/nariya/theme/clip_' + id + '.php';

	if(clip) {
		url += '?clip=1';
	}

	na_iframe(url);
}

function na_setup(href, clip) {
	if(clip) {
		na_iframe(href);
	} else {
		na_win('setup', href, 800, 800);
	}
}

function na_page(id, url, opt) {

	$("#" + id).load(url, function() {
		if(typeof is_SyntaxHighlighter != 'undefined'){
			//SyntaxHighlighter.highlight();
			Prism.highlightAll();
		}
	});

	if(typeof(window["comment_box"]) == "function"){
		switch(id) {
			case 'itemcomment'	: comment_box('', 'c'); break;
			case 'viewcomment'	: comment_box('', 'c'); break;
		}
		document.getElementById("btn_submit").disabled = false;
	}

	if(opt) {
	   $('html, body').animate({
			scrollTop: $("#" + id).offset().top - 60
		}, 500);
	}
}

function na_comment_new(id, url, count) {
	var href = url + '&count=' + count + '&cnew=1';
	$.post(href, function(data) {
		if(data) {
			alert(data);
			return false;
		} else {
			na_page(id, url);
		}
	});
}

function na_delete(id, href, url) {
	if (confirm("�쒕쾲 ��젣�� �먮즺�� 蹂듦뎄�� 諛⑸쾿�� �놁뒿�덈떎.\n\n�뺣쭚 ��젣�섏떆寃좎뒿�덇퉴?")) {
		$.post(href, function(data) {
			if(data) {
				alert(data);
				return false;
			} else {
				na_page(id, url); 
			}
		});
	}
}

function na_comment(id) {
	var str;
	var c_url;
	if(id == 'viewcomment') {
		c_url = g5_url + '/nariya/bbs/comment_write.php';
	} else {
		c_url = g5_url + '/nariya/shop/itemcomment_write.php';
	}

	var f = document.getElementById("fviewcomment");
	var url = document.getElementById("comment_url").value;

	if(na_wrestSubmit(f)) {
		if (fviewcomment_submit(f)) {
			$.ajax({
				url : c_url,
				type : 'POST',
				cache : false,
				data : $("#fviewcomment").serialize(),
				dataType : "html",
				success : function(data) {
					if(data) {
						alert(data);
						return false;
					} else {
						if(url) {
							na_page(id, url);
						}
						document.getElementById("btn_submit").disabled = false;
						document.getElementById("wr_content").value = "";
						if(!g5_is_member) {
							$("#captcha_reload").trigger("click");
							$("#captcha_key").val('');
						}
					}
				},
				error : function(request,status,error){
					alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
					return false;
				}
			});
		}
	}
}

function na_comment_submit() {
	var f = document.getElementById("fviewcomment");
	if (na_wrestSubmit(f)) {
		if (fviewcomment_submit(f)) {
			$("#fviewcomment").submit();
			if(!g5_is_member) {
				$("#captcha_reload").trigger("click");
				$("#captcha_key").val('');
			}
		}
	}

	return false;
}

function na_comment_sort(id, url, sort) {
	var href = url + '&page=0&cob=' + sort;

	na_page(id, href);
}

function na_comment_onKeyDown(opt) {
	if(event.keyCode == 13) {
		if(opt) {
			na_comment('viewcomment');
		} else {
			na_comment_submit();
		}
	}
}

function na_good(bo_table, wr_id, act, id, opt) {

	var	href = g5_url + '/nariya/bbs/good.php?bo_table=' + bo_table + '&wr_id=' + wr_id + '&good=' + act;
	if(opt) {
		href += '&opt=1';
	}
	$.post(href, function(data) {
		if(data.error) {
			alert(data.error);
			return false;
		} else if(data.success) {
			alert(data.success);
			$("#"+id).text(number_format(String(data.count)));
			if($("."+id+'_cnt').length) {
				$("."+id+'_cnt').text(number_format(String(data.count)));
			}
		}
	}, "json");
}

function na_shingo(bo_table, wr_id, c_id) {

	var	href = g5_url + '/nariya/extend/bbs/shingo.php?bo_table=' + bo_table + '&wr_id=' + wr_id + '&c_id=' + c_id;

	if (confirm("�쒕쾲 �좉퀬�섎㈃ 痍⑥냼�� �� �놁뒿�덈떎.\n\n�뺣쭚 �좉퀬�섏떆寃좎뒿�덇퉴?")) {
		$.post(href, function(data) {
			if(data) {
				alert(data);
			}
		});
	}

	return false;
}

// SNS
function na_sns(id, url) {
	switch(id) {
		case 'facebook'		: window.open(url, "win_facebook", "menubar=0,resizable=1,width=600,height=400"); break;
		case 'twitter'		: window.open(url, "win_twitter", "menubar=0,resizable=1,width=600,height=400"); break;
		case 'googleplus'	: window.open(url, "win_googleplus", "menubar=0,resizable=1,width=600,height=600"); break;
		case 'naverband'	: window.open(url, "win_naverband", "menubar=0,resizable=1,width=410,height=540"); break;
		case 'naver'		: window.open(url, "win_naver", "menubar=0,resizable=1,width=450,height=540"); break;
		case 'kakaostory'	: window.open(url, "win_kakaostory", "menubar=0,resizable=1,width=500,height=500"); break;
		case 'tumblr'		: window.open(url, "win_tumblr", "menubar=0,resizable=1,width=540,height=600"); break;
		case 'pinterest'	: window.open(url, "win_pinterest", "menubar=0,resizable=1,width=800,height=500"); break;
	}
    return false;
}

function na_textarea(id, mode) {
	var textarea_height = $('#'+id).height();
	if(mode == 'down') {
		$('#'+id).height(textarea_height + 50);
	} else if(mode == 'up') {
		if(textarea_height - 50 > 50) {
			$('#'+id).height(textarea_height - 50);
		}
	} else {
		$('#'+id).height(mode);
	}
}

function na_sly_size(id) {
	var sly_list = $('#' + id + ' .sly-list'); 
	var sly_size = sly_list.width();
	
	sly_list.css('min-width', (sly_size + 10) + 'px');

	return sly_size;
}

function na_sly(id, size) {
	var sly_wrap = $('#' + id + ' .sly-wrap');
	var sly_size = sly_wrap.width() - 10;

	if(size > sly_size) {
		$('#' + id + ' .sly-btn').addClass('d-inline-block');
	} else {
		$('#' + id + ' .sly-btn').removeClass('d-inline-block');
	}

	sly_wrap.sly('reload');
}

function na_content_height(cid, hid, tid) {
	var hsize = 0;
	var tsize = 0;

	if(hid) {
		hsize = $('#'+hid).height();
	}

	if(tid) {
		tsize = $('#'+tid).height();
	}

	$('#'+cid).css('min-height', $(window).height() - hsize - tsize);
}

var na_leave = function(href) {
    if(confirm("�뺣쭚 �뚯썝�먯꽌 �덊눜 �섏떆寃좎뒿�덇퉴?")) {
        document.location.href = href;
	}
	return false;
}

$(function(){
	$(document).on('click', '.remember-me', function(){
		if($(this).is(":checked")) {
			if(!confirm("�먮룞濡쒓렇�몄쓣 �ъ슜�섏떆硫� �ㅼ쓬遺��� �뚯썝�꾩씠�붿� �⑥뒪�뚮뱶瑜� �낅젰�섏떎 �꾩슂媛� �놁뒿�덈떎.\n\n怨듦났�μ냼�먯꽌�� 媛쒖씤�뺣낫媛� �좎텧�� �� �덉쑝�� �ъ슜�� �먯젣�섏뿬 二쇱떗�쒖삤.\n\n�먮룞濡쒓렇�몄쓣 �ъ슜�섏떆寃좎뒿�덇퉴?")) {
				$(this).attr("checked", false);
				return false;
			}
		}
    });

	$(document).on("mouseover", '[data-toggle="popover-img"]', function () {
		var e = $(this);
		e.off('hover');
		e.popover({
		  html: true,
		  trigger: 'hover',
		  placement: 'right',
		  content: function () { return '<img src="' + e.data('img') + '" class="w-100 na-r1"/>'; }
		}).popover('show');
	});

	$(document).on('click', '.leave-me', function(){
		na_leave(this.href);
		return false;
    });

	$(document).on('click', '.win_image', function(){
		na_win('win_image', this.href, 800, 800);
		return false;
    });
});