/********************************************************************************************************* ## Main Script ## * º» ½ºÅ©¸³Æ®ÀÇ ÀúÀÛ±ÇÀº (ÁÖ)À¥½º¸®ÆÛºí¸¯¿¡ ÀÖ½À´Ï´Ù. * º» ½ºÅ©¸³Æ®¸¦ ¹«´ÜÀ¸·Î ÀÌ¿ë(¶Ç´Â µµ¿ë)Çϰųª º¹Á¦ ¶Ç´Â ¼öÁ¤ »ç¿ë½Ã ÀúÀ۱ǹý¿¡ ÀǰŠó¹ú¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. * ±¸¸Å ÈÄ¿¡µµ Á¦ 2Â÷ »çÀÌÆ® µî ¶óÀ̼±½º°¡ Àû¿ëµÇÁö ¾Ê´Â »çÀÌÆ®¿¡ ´ëÇÏ¿© »ç¿ëÀº ±ÝÁöµÇ¾î ÀÖ½À´Ï´Ù. * À§ »çÇ׿¡ ´ëÇÏ¿© À§¹Ý½Ã Àý´ë ÇÕÀÇ´Â ¾ø½À´Ï´Ù ! * date : 2017-03-15 * author : Park Soo Hyun (shpark7502@naver.com) *********************************************************************************************************/ $(function(){function e(){for(i=0;i=c[e]&&(l[e]=0),s[e].parents(".postSlider").find(".thumbList").children().removeClass("on"),s[e].parents(".postSlider").find(".thumbList").children().eq(l[e]).addClass("on"),i&&1!=i?0==i&&(TweenMax.to(o[e],.5,{x:-(d[e]*l[e])}),TweenMax.to(s[e],.7,{x:-(p[e]*l[e])})):(TweenMax.to(o[e],.5,{x:-(d[e]*l[e]),ease:Expo.easeInOut}),TweenMax.to(s[e],.7,{x:-(p[e]*l[e]),ease:Expo.easeInOut}))}function a(){var e=[],t=[];for(i=0;i',r.eq(i).find(".thumbList").append(e[n]);r.eq(i).find(".thumbList").children().eq(0).addClass("on")}}var r=$(".postSlider"),s=[],o=[],l=[],c=[],p=[],d=[];r.each(function(e){s[e]=$(this).find(".textWrapper ul"),o[e]=$(this).find(".imgWrapper ul"),l[e]=0,c[e]=s[e].children().length,e++}),$(document).on("click","#postSliderType1 .thumbList > li",function(){var e=$(this).index();l[0]=e,t(0)}),$(".section1 .prev").click(function(){l[0]--,t(0)}),$(".section1 .next").click(function(){l[0]++,t(0)}),$(document).on("click","#postSliderType2 .thumbList > li",function(){var e=$(this).index();l[1]=e,t(1)}),$(".section3 .prev").click(function(){l[1]--,t(1)}),$(".section3 .next").click(function(){l[1]++,t(1)}),e(),a(),$(window).bind("resize",function(){e()})}),$(function(){function e(e,i,t,n){if($vSize=l.children().width(),"move"!=i||"left"!=t&&"right"!=t){if("cancel"==i)a();else if("end"==i)if("right"==t){if(0===o)return r(),o=0,a(),!1;r(),o--,a()}else if("left"==t){if(o===c-1)return o=c-1,r(),a(),!1;r(),o++,a()}}else{var p=0;"left"==t?(clearInterval(s),TweenMax.to(l,p,{x:-(o*$vSize)-n+"px"})):"right"==t&&(clearInterval(s),TweenMax.to(l,p,{x:-(o*$vSize)+n+"px"}))}}function t(){var e=$(window).width(),i=l.children(),t={transform:"matrix(1,0,0,1,"+-o*e+", 0)",width:e*c};l.css(t),i.css({width:e+"px"})}function n(){var e="
  • ";for(i=0;i .pagination").append(e);$("#mainSlider > .pagination > li:first").addClass("on")}function a(){var e=$(window).width();o>=c&&(o=0),TweenMax.to(l,.8,{x:-o*e+"px",ease:Expo.easeOut,delay:0}),$("#mainSlider > .pagination > li").removeClass("on"),$("#mainSlider > .pagination > li").eq(o).addClass("on")}function r(){l.stop(),clearInterval(s),s=setInterval(function(){o++,a()},p)}var s,o=0,l=$("#mainSlider > .imgList"),c=$("#mainSlider > .imgList > li").length,p=3500,d={triggerOnTouchEnd:!0,swipeStatus:e,allowPageScroll:"vertical",threshold:0};l.swipe(d),$(document).on("click","#mainSlider > .pagination > li",function(){if(!TweenMax.isTweening(l)){var e=$(this).index();r(),o=e,a()}}),s=setInterval(function(){o++,a()},p),t(),n(),$(window).bind("resize",function(){t()})}),$(function(){function e(){$(".section2 .tableArea > table").length>0&&$.ajax({type:"GET",url:"/"+o+"/"+l+"/"+c+".php",contentType:"application/x-www-form-urlencoded;charset=euc-kr",beforeSend:function(e){e.overrideMimeType("application/x-www-form-urlencoded;charset=euc-kr")},success:function(e){var i,t=[],n=[];$(".section2 .category").remove(),i='
      ',$(e).find(".cate_select option").each(function(e){t[e]=$(this).text(),n[e]=$(this).val(),i+='
    • '+t[e]+"
    • ",e++}),i+="
    ",$(".section2 .dropdown").append(i),$(".section2 .dropdown .category > li:first").addClass("on")},error:function(e,i,t){console.log(t)}})}function t(e){var i;i=null===e?"/"+o+"/"+l+"/"+c+".php":"/"+o+"/"+l+"/"+c+".php?com_board_category_code="+e,$.ajax({type:"GET",url:i,contentType:"application/x-www-form-urlencoded;charset=euc-kr",beforeSend:function(e){e.overrideMimeType("application/x-www-form-urlencoded;charset=euc-kr")},success:function(e){var i=$(e).find(".gallery_inner").html();$(".section2 .listWrapper .tableArea").html(i),a(),r=$(".section2 .listWrapper .tableArea > table"),r.css("opacity","0"),r.animate({opacity:"1"},400,function(){r.css({opacity:""})})},error:function(e,i,t){console.log(t)}})}function n(){if(r=$(".section2 .listWrapper .tableArea > table"),r.length>0)for(s=r.length,$(".hoverBox").length>0&&$(".hoverBox").parent("a").remove(),i=0;i table").eq(i).find(".board_output_gallery_subject a").attr("href"),d[i]=$(".section2 .listWrapper .tableArea > table").eq(i).find(".board_output_gallery_subject a").text(),f[i]=$(".section2 .listWrapper .tableArea > table").eq(i).find(".board_output_gallery_etc").text(),$(".section2 .listWrapper .tableArea > table").eq(i).find("td:first").append('

    '+d[i]+"

    "+$.trim(f[i])+"

    "),$(".section2 .listWrapper .tableArea > table").eq(i).find("tr").eq(1).css("display","none")}function a(){if($(".bbsnewf5").length>0){for(s=$(".section2 .listWrapper .tableArea .bbsnewf5").length,$(".hoverBox").length>0&&$(".hoverBox").parent("a").remove(),i=0;i

    '+d[i]+"

    "+$.trim(f[i])+"

    ");$(".gallery_subject, .gallery_etc").css("display","none")}}var r,s,o=$(location).attr("pathname").split("/")[1],l=$(".section2 .listWrapper").data("dir"),c=$(".section2 .listWrapper").data("page"),p=$(".section2 .listWrapper .tableArea").html(),d=new Array,f=new Array,h=new Array;e(),$(document).on("click",".section2 .category > li",function(){var e=$(this).find("a").data("cate"),i=$(this).find("a").text();$(".section2 .category > li").removeClass("on"),$(this).addClass("on"),e?t(e):($(".section2 .listWrapper .tableArea").css("opacity","0"),$(".section2 .listWrapper .tableArea").html(p),$(".section2 .listWrapper .tableArea").animate({opacity:"1"},400,function(){$(".section2 .listWrapper .tableArea").css({opacity:""})}),n()),$(".section2 .dropdown > a").text(i)}),$(".section2 .dropdown").click(function(){$(this).hasClass("open")?($(this).removeClass("open"),$(this).find(".category").css("display","none")):($(this).addClass("open"),$(this).find(".category").css("display","block"))}),n(),$(".section2 .listWrapper .tableArea > table").addClass("scrollreveal")}),$(function(){var e=($(location).attr("pathname").split("/")[1],[]),i=[],t=[],a=[],r=[],s="",o=$(".section4 .postWrapper"),l=($(".section4 .postWrapper").data("dir"),$(".section4 .postWrapper").data("page"),0);for($(".section4 tr[class^=board_output_]").each(function(){e[l]=$(this).find("a:first").text(),i[l]=$(this).find("a").attr("href"),t[l]=$(this).find("td[align=center]").text(),r[l]=$(this).children().eq(-2).find("a").text(),a[l]=$(this).find(".board_output_imgs").attr("src"),l++}),o.html(""),s='",o.append(s)});