$(function(){let t,e,a;$("#ext_search select").after(''),function t(){let e="",a=[],i=[],n=window.location.search,s=new URLSearchParams(n);if($("select[name=com_board_category_code]").length){let l=s.get("com_board_category_code"),r=$("select[name=com_board_category_code]").attr("onchange").split("'")[1]+"com_board_category_code=",o="";$("select[name=com_board_category_code] option").each(function(){let t=$(this);a.push(t.text()),i.push(t.val())});for(let c=0;c${a[c]}`;$(".category-button-wrapper").empty().append(e)}}(),t=$("input[type=image]"),e=$("img"),a=["검색","확인","댓글작성","삭제","이동","복사","이전","목록","다음","스팸신고","수정","삭제","답변","글쓰기","작성완료","취소"],t.each(function(){let t=$(this).attr("src");t.indexOf("search.gif")>-1&&($(this).before(``),$(document).on("click","#btn-search",function(){$(this).next("input[type=image]").trigger("click")}),$(this).hide()),t.indexOf("confirm.gif")>-1&&($(this).before(``),$(this).hide()),t.indexOf("comment_write.gif")>-1&&($(this).before(``),$(document).on("click","#btn-comment-write",function(){$(this).next("input[type=image]").trigger("click")}),$(this).hide())}),e.each(function(){let t=$(this).attr("src"),e=$(this).attr("onclick");t.indexOf("btn_sdel.gif")>-1&&($(this).before(``),$(this).remove()),t.indexOf("move.gif")>-1&&($(this).before(``),$(this).remove()),t.indexOf("copy.gif")>-1&&($(this).before(``),$(this).remove()),t.indexOf("/prev.gif")>-1&&$(this).parent().addClass("button-b button--default move-page").text(a[6]),t.indexOf("list.gif")>-1&&$(this).parent().addClass("button-b button--dark").text(a[7]),t.indexOf("/next.gif")>-1&&$(this).parent().addClass("button-b button--default move-page").text(a[8]),t.indexOf("spam.gif")>-1&&($(this).before(``),$(this).remove()),t.indexOf("modify.gif")>-1&&$(this).parent().addClass("button-b button--default").text(a[10]),t.indexOf("delete.gif")>-1&&$(this).parent().addClass("button-b button--default").text(a[11]),t.indexOf("reply.gif")>-1&&$(this).parent().addClass("button-b button--default").text(a[12]),t.indexOf("write.gif")>-1&&$(this).parent().addClass("button-b button--dark size--3").text(a[13]),t.indexOf("btn_confirm.gif")>-1&&$(this).parent().addClass("button-b button--primary").text(a[14]),t.indexOf("cancel.gif")>-1&&$(this).parent().addClass("button-b button--default button--lg").text(a[15])}),function t(){if(!$(".board-gallery").length)return!1;let e=[],a=[],i=[],n=[],s="",l=$(".board-gallery .gallery-list").data("column")?$(".board-gallery .gallery-list").data("column"):3,r="";switch(l){case 1:r="col-xl-12";break;case 2:r="col-xl-6";break;case 3:default:r="col-xl-4";break;case 4:r="col-xl-3";break;case 5:r="col-xl-2-5";break;case 6:r="col-xl-2"}if($(".board-gallery").hasClass("type-a")){$(".board-gallery .article-wrapper > .photo-article-list > tbody > tr").each(function(){let t=$(this).find(".bbsnewf5"),s=t.find(".gallery_etc").text().split(":")[1];e.push(t.find("img").attr("src")),a.push(t.find(".gallery_subject>a").attr("href")),i.push(t.find(".gallery_title").text()),n.push(void 0==s?"":''+s.replace("]","")+"")}),s='
';for(let o=0;o
${i[o]}
${n[o]}
${i[o]}
`;s+="",$(".board-gallery .article-wrapper").empty().append(s)}else if($(".board-gallery").hasClass("type-b")){$(".board-gallery .article-wrapper > .photo-article-list > tbody > tr").each(function(){let t=$(this).find(".bbsnewf5"),s=t.find(".gallery_etc").text().split(":")[1];e.push(t.find("img").attr("src")),a.push(t.find(".gallery_subject>a").attr("href")),i.push(t.find(".gallery_title").text()),n.push(void 0==s?"":''+s.replace("]","")+"")}),s='
';for(let c=0;c
${i[c]}
${n[c]}
${i[c]}
`;s+="",$(".board-gallery .article-wrapper").empty().append(s)}}(),function t(){if(!$(".faq-list .table-article-list .titdesign").length)return!1;let e=`
`;$(".faq-list .table-article-list .bbsnewf5 > a").on("click",t=>{if(!$('input[name="delete_check_notice[]"]').length){t.preventDefault();let a=$(t.currentTarget),i=a.attr("href"),n="";$.ajax({url:i,method:"GET",contentType:"application/x-www-form-urlencoded;charset=euc-kr",dataType:"html",async:!1,success:function(t){n=` ${$(t).find("#post_area").html()} `,a.closest(".titdesign").hasClass("article--open")?(a.parent().siblings(".reply-content").remove(),a.closest(".titdesign").removeClass("article--open")):($(".titdesign").removeClass("article--open"),$(".reply-content").remove(),a.parent().after(n),a.closest(".titdesign").addClass("article--open"))},error:function(t){alert("오류가 발생하였습니다.")},beforeSend:function(t){t.overrideMimeType("application/x-www-form-urlencoded;charset=euc-kr"),$("body").prepend(e)},complete:function(){$("#ajax-loader").remove()}})}})}(),function t(){if(!$(".board-event").length)return!1;let e=[],a=[],i=[],n=[],s="";$(".board-event .article-wrapper > .event-article-list > tbody > tr").each(function(){let t=$(this).find(".bbsnewf5"),s=t.find(".gallery_etc").text().trim(),l=0==s.length?"":s.split(":")[1].replace(",","").replace("이벤트 종료일",""),r=0==s.length?"":s.split(":")[2].replace("]","");e.push(t.find("img").attr("src")),a.push(t.find(".gallery_subject>a").attr("href")),i.push(t.find(".gallery_title").text()),n.push(0==s.length?"":''+l+" ~ "+r+"")}),s='
';for(let l=0;l
${i[l]}
${n[l]}

${i[l]}

`;s+="",$(".board-event .article-wrapper").empty().append(s)}(),function t(){if(!$(".board-blog").length)return!1;let e=[],a=[],i=[],n=[],s=[],l=[],r=[],o="";$(".board-blog .article-wrapper > .blog-article-list .webzine_type2 > tbody > tr").each(function(){let t=$(this).find(".webzine_type_text_td_left");if(0==t.length)return;let o=$(this).find(".webzine_type_img_td");e.push(t.find(".webzine_no .obj_value").text().trim()),a.push(t.find(".webzine_subject .news_title").text().trim()),i.push(t.find(".webzine_dateof_write .obj_value").text()),n.push(t.find(".webzine_category .obj_value").text().trim()),s.push(t.find(".webzine_description .obj_value").text().trim()),l.push(o.find("img").attr("src")),r.push(o.find("a").attr("href"))}),o='
';for(let c=0;c
NO. ${e[c]} #${n[c]} ${i[c]}

${a[c]}

${s[c]}

`;o+="",$(".board-blog .article-wrapper").empty().append(o)}(),function t(){if(!$(".board-blog #post_area").length)return!1;let e=$(".board-blog .table-article-common tr"),a='
',i;e.each(function(t){let e,n;if(i=null!==i?$(this).find("#post_area"):i,0==t)a+=`

${n=$(this).find(".board_desc").text().trim()}

`;else{if(e=$(this).find(".board_bgcolor").text().trim(),n=$(this).find(".board_desc").text().trim(),0==e.length)return;a+=` ${e}${n} `}}),a+='
',$(".board-blog .table-article-common").replaceWith(a),$(".board-blog").find(".post-body").html(i);let n=$(".board-view-thumbnails").find("a"),s='

Previous posts

';n.each(function(){let t;s+=`
`}),s+="
",$(".board-blog").find(".post-body").append(s),$(".board-view-thumbnails").remove();let l='
',r=$(".board-blog .move-page");r.each(function(){let t=$(this).text().trim();l+=`${"이전"==t?'이전글':'다음글'}`}),l+="
",r.remove(),$(".board-blog").find(".post-wrap").append(l),$(".board-blog").find(".move-btn").on("mouseover",function(){$(this).addClass("on")}),$(".board-blog").find(".move-btn").on("mouseout",function(){$(this).removeClass("on")})}(),function t(){if($(".board-blog #post_area").length)return!1;let e=$(".board-blog .table-article-common tr input[name='com_board_notice']");e.length>0&&e.closest("tr").remove()}()});