/********************************************************************************************************* ## Main Script ## * º» ½ºÅ©¸³Æ®ÀÇ ÀúÀÛ±ÇÀº (ÁÖ)À¥½º¸®ÆÛºí¸¯¿¡ ÀÖ½À´Ï´Ù. * º» ½ºÅ©¸³Æ®¸¦ ¹«´ÜÀ¸·Î ÀÌ¿ë(¶Ç´Â µµ¿ë)Çϰųª º¹Á¦ ¶Ç´Â ¼öÁ¤ »ç¿ë½Ã ÀúÀ۱ǹý¿¡ ÀǰŠó¹ú¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. * ±¸¸Å ÈÄ¿¡µµ Á¦ 2Â÷ »çÀÌÆ® µî ¶óÀ̼±½º°¡ Àû¿ëµÇÁö ¾Ê´Â »çÀÌÆ®¿¡ ´ëÇÏ¿© »ç¿ëÀº ±ÝÁöµÇ¾î ÀÖ½À´Ï´Ù. * À§ »çÇ׿¡ ´ëÇÏ¿© À§¹Ý½Ã Àý´ë ÇÕÀÇ´Â ¾ø½À´Ï´Ù ! * date : 2017-03-15 * author : Park Soo Hyun (shpark7502@naver.com) *********************************************************************************************************/ $("#mainSlide > .visual_wrap > ul > li:gt(0)").hide(); setInterval(function() { $('#mainSlide > .visual_wrap > ul > li:first') .fadeOut(0000) .next() .fadeIn(0000) .end() .appendTo('#mainSlide > .visual_wrap ul'); }, 6000); $(".family > a").click(function() { if(!$(this).siblings('.family_dropdown').is(':visible')) { $(this).siblings('.family_dropdown').stop(true,false).slideDown(700); } else { $(this).siblings('.family_dropdown').stop(true,false).slideUp(700); } }); $(function() { function e() { for (i = 0; i < r.length; i++) p[i] = s[i].parent().width(), d[i] = o[i].parent().width(), s[i].children().css("width", p[i] + "px"), s[i].css({ width: p[i] * c[i] + "px", transform: "matrix(1,0,0,1," + -p[i] * l[i] + ",0)" }), o[i].children().css("width", d[i] + "px"), o[i].css({ width: d[i] * c[i] + "px", transform: "matrix(1,0,0,1," + -d[i] * l[i] + ",0)" }) } function t(e, i) { p[e] = s[e].parent().width(), d[e] = o[e].parent().width(), l[e] < 0 ? l[e] = c[e] - 1 : l[e] >= 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.length; i++) { for (n = 0; n < c[i]; n++) t[n] = o[i].children().eq(n).find("img").attr("src"), e[n] = '
  • ', 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 < c; i++) $("#mainSlider > .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() }) })