$(function(){ $('[id^="replyArea_"]').each(function(e) { $(this).hide(); }); }); /** * Swiper 4.5.1 * Most modern mobile touch slider and framework with hardware accelerated transitions * http://www.idangero.us/swiper/ * * Copyright 2014-2019 Vladimir Kharlampidi * * Released under the MIT License * * Released on: September 13, 2019 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";var f="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,ee="undefined"==typeof window?{document:f,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,l=function(e){for(var t=0;t")){var o="div";for(0===n.indexOf(":~]/)?(t||f).querySelectorAll(e.trim()):[f.getElementById(e.trim().split("#")[1])],i=0;ia.slides.length)break;i.push(a.slides.eq(r)[0])}else i.push(a.slides.eq(a.activeIndex)[0]);for(t=0;t=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}o.progress=s?-l:l}t.visibleSlides=I(t.visibleSlides)}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=t.isEnd,o=r,l=n;n=0==i?r=!(s=0):(r=(s=(e-t.minTranslate())/i)<=0,1<=s),te.extend(t,{progress:s,isBeginning:r,isEnd:n}),(a.watchSlidesProgress||a.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,o=a.activeIndex,l=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var c=0;c=s[c]&&i=s[c]&&i=s[c]&&(p=c);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if((t=0<=r.indexOf(i)?r.indexOf(i):Math.floor(p/n.slidesPerGroup))>=r.length&&(t=r.length-1),p!==o){var u=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);te.extend(a,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),l!==u&&a.emit("realIndexChange"),(a.initialized||a.runCallbacksOnInit)&&a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,i=I(e.target).closest("."+a.slideClass)[0],s=!1;if(i)for(var r=0;r=o.length&&(u=o.length-1),(p||n.initialSlide||0)===(d||0)&&a&&s.emit("beforeSlideChangeStart");var h,v=-o[u];if(s.updateProgress(v),n.normalizeSlideIndex)for(var f=0;f=Math.floor(100*l[f])&&(r=f);if(s.initialized&&r!==p){if(!s.allowSlideNext&&vs.translate&&v>s.maxTranslate()&&(p||0)!==r)return!1}return h=pt.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}};var h={loopCreate:function(){var i=this,e=i.params,t=i.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var s=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var a=e.slidesPerGroup-s.length%e.slidesPerGroup;if(a!==e.slidesPerGroup){for(var r=0;rs.length&&(i.loopedSlides=s.length);var o=[],l=[];s.each(function(e,t){var a=I(t);e=s.length-i.loopedSlides&&o.push(t),a.attr("data-swiper-slide-index",e)});for(var d=0;d=s.length-r){e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&&0!=p&&t.setTranslate((d?-t.translate:t.translate)-p)}t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),a.removeAttr("data-swiper-slide-index")}};var v={setGrabCursor:function(e){if(!(ae.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){ae.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var m={appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=ee.screen.width-d)){if(te.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=n,s.startY=o,a.touchStartTime=te.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,0s.startY&&t.translate>=t.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(os.startX&&t.translate>=t.minTranslate())return;if(a.isTouchEvent&&f.activeElement&&n.target===f.activeElement&&I(n.target).is(a.formElements))return a.isMoved=!0,void(t.allowClick=!1);if(a.allowTouchCallbacks&&t.emit("touchMove",n),!(n.targetTouches&&1i.touchAngle:90-c>i.touchAngle);if(a.isScrolling&&t.emit("touchMoveOpposite",n),void 0===a.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(a.startMoving=!0)),a.isScrolling)a.isTouched=!1;else if(a.startMoving){t.allowClick=!1,n.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&n.stopPropagation(),a.isMoved||(i.loop&&t.loopFix(),a.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),a.isMoved=!0;var u=t.isHorizontal()?d:p;s.diff=u,u*=i.touchRatio,r&&(u=-u),t.swipeDirection=0t.minTranslate()?(h=!1,i.resistance&&(a.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+a.startTranslate+u,v))):u<0&&a.currentTranslatea.startTranslate&&(a.currentTranslate=a.startTranslate),0i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,a.currentTranslate=a.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===a.velocities.length&&a.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:te.now()})),t.updateProgress(a.currentTranslate),t.setTranslate(a.currentTranslate))}}}}}else a.startMoving&&a.isScrolling&&t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&&a.isMoved&&a.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=te.now(),u=c-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),u<300&&300-t.maxTranslate())return void(t.slides.lengtht.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()>E&&(w=t.minTranslate()+E),y=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(i.freeModeSticky){for(var S,C=0;C-w){S=C;break}w=-(w=Math.abs(l[S]-w)=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var M=0,P=t.slidesSizesGrid[0],k=0;k=o[k]&&p=o[k]&&(M=k,P=o[o.length-1]-o[o.length-2]);var z=(p-o[M])/P;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(z>=i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&&(z>1-i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(M+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(M)}}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("touchstart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.addEventListener(a.start,e.onTouchStart,o),r.addEventListener(a.move,e.onTouchMove,ae.passiveListener?{passive:!1,capture:n}:n),r.addEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),f.addEventListener("mousemove",e.onTouchMove,n),f.addEventListener("mouseup",e.onTouchEnd,!1))}else r.addEventListener(a.start,e.onTouchStart,!1),f.addEventListener(a.move,e.onTouchMove,n),f.addEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),e.on(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b,!0)},detachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl,r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("onTouchStart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(a.start,e.onTouchStart,o),r.removeEventListener(a.move,e.onTouchMove,n),r.removeEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),f.removeEventListener("mousemove",e.onTouchMove,n),f.removeEventListener("mouseup",e.onTouchEnd,!1))}else r.removeEventListener(a.start,e.onTouchStart,!1),f.removeEventListener(a.move,e.onTouchMove,n),f.removeEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),e.off(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&&(i=0);var s=e.params,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=e.getBreakpoint(r);if(n&&e.currentBreakpoint!==n){var o=n in r?r[n]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var l=o||e.originalParams,d=l.direction&&l.direction!==s.direction,p=s.loop&&(l.slidesPerView!==s.slidesPerView||d);d&&a&&e.changeDirection(),te.extend(e.params,l),te.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=n,p&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}}},getBreakpoint:function(e){if(e){var t=!1,a=[];Object.keys(e).forEach(function(e){a.push(e)}),a.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var i=0;i=ee.innerWidth&&!t&&(t=s)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,a=this.params,e=this.rtl,i=this.$el,s=[];s.push("initialized"),s.push(a.direction),a.freeMode&&s.push("free-mode"),ae.flexbox||s.push("no-flexbox"),a.autoHeight&&s.push("autoheight"),e&&s.push("rtl"),1'+e+"");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(a.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;tMath.abs(n.pixelY)))return!0;s=n.pixelX*r}else{if(!(Math.abs(n.pixelY)>Math.abs(n.pixelX)))return!0;s=n.pixelY}else s=Math.abs(n.pixelX)>Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===s)return!0;if(i.invert&&(s=-s),a.params.freeMode){a.params.loop&&a.loopFix();var o=a.getTranslate()+s*i.sensitivity,l=a.isBeginning,d=a.isEnd;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),a.setTransition(0),a.setTranslate(o),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!l&&a.isBeginning||!d&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky&&(clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=te.nextTick(function(){a.slideToClosest()},300)),a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),o===a.minTranslate()||o===a.maxTranslate())return!0}else{if(60a-1-2*e.loopedSlides&&(r-=a-2*e.loopedSlides),n-1s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),o=r-e.pagination.dynamicBulletIndex,d=((l=o+(Math.min(p.length,s.dynamicMainBullets)-1))+o)/2),p.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1";i.html(s),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):' / ',i.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'',i.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var a=this,e=a.params.pagination;if(e.el){var t=I(e.el);0!==t.length&&(a.params.uniqueNavElements&&"string"==typeof e.el&&1'),s.append(r)),te.extend(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},N={setTransform:function(e,t){var a=this.rtl,i=I(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y"),l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||o?(n=n||"0",o=o||"0"):this.isHorizontal()?(n=r,o="0"):(o=r,n="0"),n=0<=n.indexOf("%")?parseInt(n,10)*t*s+"%":n*t*s+"px",o=0<=o.indexOf("%")?parseInt(o,10)*t+"%":o*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==l)i.transform("translate3d("+n+", "+o+", 0px)");else{var c=l-(l-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+o+", 0px) scale("+c+")")}},setTranslate:function(){var i=this,e=i.$el,t=i.slides,s=i.progress,r=i.snapGrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,s)}),t.each(function(e,t){var a=t.progress;1i.maxRatio&&(a.scale=i.maxRatio-1+Math.pow(a.scale-i.maxRatio+1,.5)),a.scales.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.ys.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentXs.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentYs.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,o=a.currentX+n,l=i.y*r,d=a.currentY+l;0!==i.x&&(s=Math.abs((o-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=o,a.currentY=d;var c=a.width*e.scale,u=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-c/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-u/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,l,d,p,c,u,h,v,f,m,g=this,b=g.zoom,w=g.params.zoom,y=b.gesture,x=b.image;y.$slideEl||(y.$slideEl=g.clickedSlide?I(g.clickedSlide):g.slides.eq(g.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length&&(y.$slideEl.addClass(""+w.zoomedSlideClass),a=void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,"touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=y.$slideEl[0].offsetWidth,m=y.$slideEl[0].offsetHeight,i=y.$slideEl.offset().left+f/2-t,s=y.$slideEl.offset().top+m/2-a,o=y.$imageEl[0].offsetWidth,l=y.$imageEl[0].offsetHeight,d=o*b.scale,p=l*b.scale,h=-(c=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-p/2,0)),(r=i*b.scale)>1]<=t?i=s:a=s;return a};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new V.LinearSpline(t.slidesGrid,e.slidesGrid):new V.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control;function n(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=I('
'),a.append(e)));for(var h=0;h'),v.append(E)),0===S.length&&(S=I('
'),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(p)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(u)-90*Math.floor(Math.abs(u)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,k=d.shadowScale/M,z=d.shadowOffset;e.transform("scale3d("+P+", 1, "+k+") translate3d(0px, "+(n/2+z)+"px, "+-n/2/k+"px) rotateX(-90deg)")}var $=ie.isSafari||ie.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(t.isHorizontal()?0:u)+"deg) rotateY("+(t.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},U={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i'),s.append(p)),0===c.length&&(c=I('
'),s.append(c)),p.length&&(p[0].style.opacity=Math.max(-r,0)),c.length&&(c[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var a=this,t=a.slides,i=a.activeIndex,s=a.$wrapperEl;if(t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),a.params.virtualTranslate&&0!==e){var r=!1;t.eq(i).transitionEnd(function(){if(!r&&a&&!a.destroyed){r=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t'),v.append(E)),0===S.length&&(S=I('
'),v.append(S)),E.length&&(E[0].style.opacity=0')}}),Object.keys(Y).forEach(function(e){t.a11y[e]=Y[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;te.extend(e,{history:{init:F.init.bind(e),setHistory:F.setHistory.bind(e),setHistoryPopState:F.setHistoryPopState.bind(e),scrollToSlide:F.scrollToSlide.bind(e),destroy:F.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;te.extend(e,{hashNavigation:{initialized:!1,init:R.init.bind(e),destroy:R.destroy.bind(e),setHash:R.setHash.bind(e),onHashCange:R.onHashCange.bind(e)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;te.extend(t,{autoplay:{running:!1,paused:!1,run:q.run.bind(t),start:q.start.bind(t),stop:q.stop.bind(t),pause:q.pause.bind(t),onTransitionEnd:function(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===this&&(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){te.extend(this,{fadeEffect:{setTranslate:W.setTranslate.bind(this),setTransition:W.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){te.extend(this,{cubeEffect:{setTranslate:j.setTranslate.bind(this),setTransition:j.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){te.extend(this,{flipEffect:{setTranslate:U.setTranslate.bind(this),setTransition:U.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){te.extend(this,{coverflowEffect:{setTranslate:K.setTranslate.bind(this),setTransition:K.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){te.extend(this,{thumbs:{swiper:null,init:_.init.bind(this),update:_.update.bind(this),onThumbClick:_.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===T.use&&(T.use=T.Class.use,T.installModule=T.Class.installModule),T.use(Z),T}); // 210812 서정환수정 EC$(function($) { var filter = "win16|win32|win64|mac|macintel"; var device = "pc"; if (navigator.platform) { if (filter.indexOf(navigator.platform.toLowerCase()) < 0) { device = "mobile"; } } /** * 상품상세, 상품 확대보기(팝업) - 소비자가 할인표시 */ var oPriceInfoEl = $('#ec-product-price-info'); if (oPriceInfoEl.length > 0) { var salePriceEl = $('#span_product_price_text'); percentageCul(oPriceInfoEl, salePriceEl); } /** * 상품목록/메인진열 - 소비자가 할인표시*/ function sale_percent() { var mainEl = $("#contents"); if (mainEl.length > 0) { var productListEl = $('.xans-product-listmain, .xans-product-listrecommend, .xans-product-listnew, .xans-product-listnormal, .xans-search-result'); for (var i = 0; i < productListEl.length; i++) { var prdListEl = productListEl.eq(i).find('.prdList > li'); for (var j = 0; j < prdListEl.length; j++) { var priceEl = prdListEl.eq(j).find('.description'), salePriceEl = priceEl.parent().find('.thumbnail'); if (device == "mobile") { salePriceEl = priceEl.parent().find('.thumbnail'); } percentageCul(priceEl, salePriceEl); } } } } function percentageCul(target, salePriceEl) { var iCustomPrice = parseInt(target.attr('ec-data-custom').replace(/[^0-9]/g,"")); var iPrice = parseInt(target.attr('ec-data-price').replace(/[^0-9]/g,"")); var sDisplayAmount = 'p', // p:할인율, w:할인금액 iOfftoFixed = 0, // 할인율 소수점자릿수 sSaleText = '', regexp = /B(?=(d{3})+(?!d))/g; if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice) { if (sDisplayAmount == 'p') { sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '%'; } else if (sDisplayAmount == 'w') { sSaleText = parseInt(iCustomPrice - iPrice).toString().replace(regexp, ',') + '원 OFF'; } salePriceEl.append("
" + sSaleText + "
"); } } /* 상품 할인율 실행 */ setTimeout(function(){ sale_percent(); }, 300); /* [더보기] 버튼 클릭시 상품로딩되고 0.6초후 재계산 - 서정환 */ jQuery(".btnMore").click( function( ){ setTimeout(function(){ sale_percent(); }, 600); }); }); /** * hasClass */ function hasClass(element, className){ return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; }; /** * toggle */ function toggleClassAll(element, handler, className){ var _handler = document.querySelector(handler); document.querySelectorAll(handler).forEach(function(item){ item.addEventListener('click', function(){ var _element = item.parentNode; if ( hasClass( _element, className ) ) { _element.classList.remove( className ); } else { _element.classList.add( className ); } }) }) }; /** * findElements */ function findElements(element, findElement){ var resultElements = []; document.querySelectorAll(element).forEach(function(item){ var findElementList = item.querySelectorAll(findElement); findElementList = Array.prototype.slice.call(findElementList); resultElements = resultElements.concat(findElementList); }) return resultElements; }; /** * setAttributeAl */ function setAttributeAll(elements, name, value){ elements.forEach(function(item){ item.setAttribute(name, value); }) }; /** * tooltip */ function setTooltipEvent(){ var input = findElements('.eTooltip', 'input'); input.forEach(function(item){ item.addEventListener('focusin', function(event){ var targetName = returnTargetName(event.target); targetName.nextElementSibling.style.display = 'block' }); item.addEventListener('focusout', function(event){ var targetName = returnTargetName(event.target); targetName.nextElementSibling.style.display = 'none' }); }); } /** * tooltip input focus */ function returnTargetName(_this){ var ePlacename = _this.parentElement.getAttribute("class"); var targetName; if(ePlacename == "ePlaceholder"){ //ePlaceholder supported targetName = _this.parentElement; }else{ targetName = _this; } return targetName; } /** * window load */ window.addEventListener('load', function(){ if (document.querySelector('.eTooltip')){ setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1'); setTooltipEvent(); } if (document.querySelector('div.eToggle')){ toggleClassAll(false, 'div.eToggle .title', 'selected'); } }); window.addEventListener('load', function(){ bottomNav(); fixedHeader(); handleNav(); //quickGoTop(); 사용안함 210805 서정환 수정 searchLayer(); //toggleClass('.xans-layout-info.info__customer', '.xans-layout-info.info__customer .toggle', 'selected'); 사용안함 210805 서정환 수정 //topBanner(); 사용안함 210804 서정환 수정 handleScroll(); }); function handleScroll(){ var scrollPosition = 0; var ticking = false; var quickMenu = document.querySelector('#quick'); var scrollY = window.scrollY || window.pageYOffset; //setQuickScrollEvent(scrollY, quickMenu); 사용안함 210805 서정환 수정 window.addEventListener('scroll', function(e) { scrollPosition = window.scrollY || window.pageYOffset; if (ticking) return; window.requestAnimationFrame(function() { fixedHeader() //setQuickScrollEvent(scrollPosition, quickMenu) 사용안함 210805 서정환 수정 ticking = false; }); ticking = true; }); } function toggleClass(element, handler, className){ var _handler = document.querySelector(handler); var _element = document.querySelector(element); _handler.addEventListener('click', function(){ if ( _element.classList.contains(className) ) { _element.classList.remove( className ); } else { _element.classList.add( className ); } }); } function fixedHeader() { // 210804 서정환 수정 var header = document.getElementById("header"); var fixed_margin = document.getElementById("contents"); var scrollY = window.pageYOffset || document.documentElement.scrollTop; var header_height = document.getElementById("header").scrollHeight+'px'; if(scrollY > header.offsetTop) { header.classList.add("fixed"); fixed_margin.style.marginTop = header_height; } else { header.classList.remove("fixed"); fixed_margin.style.marginTop = '0px'; } } function handleNav() { var btnNavs = document.querySelectorAll('.eNavFold'); var btnClose = document.querySelector('#aside .btnClose'); var dimmed = document.querySelector('#layoutDimmed'); var elements = document.getElementsByClassName("test"); btnNavs.forEach( function(btnNav) { btnNav.addEventListener('click', function(){ document.body.classList.add('expand'); }); }); btnClose.addEventListener('click', function(){ document.body.classList.remove('expand'); }); handleDimmed(dimmed, document.body, 'expand'); } function searchLayer() { var btnSearchs = document.querySelectorAll('.eSearch'); var btnClose = document.querySelector('.xans-layout-searchheader .btnClose'); btnSearchs.forEach( function(btnSearch) { btnSearch.addEventListener('click', function(){ document.body.classList.add('searchExpand'); var input = document.querySelector('#keyword'); //input.focus(); }); }); btnClose.addEventListener('click', function(){ document.body.classList.remove('searchExpand'); }); var dimmed = document.querySelector('#layoutDimmed'); handleDimmed(dimmed, document.body, 'searchExpand'); } function handleDimmed(target, element, className){ target.addEventListener('click', function(){ element.classList.remove(className); }); } function bottomScroll(){ var lastScrollTop = 0; var delta = 5; var fixBox = document.querySelector('.bottom-nav__top'); var fixBoxHeight = fixBox.offsetHeight; var didScroll; window.onscroll = function(e) { didScroll = true; }; setInterval(function(){ if(didScroll){ hasScrolled(); didScroll = false; } }, 250); function hasScrolled(){ var nowScrollTop = window.scrollY; if(Math.abs(lastScrollTop - nowScrollTop) <= delta){ return; } if(nowScrollTop > lastScrollTop && nowScrollTop > fixBoxHeight){ //Scroll down var scrollTop = window.scrollTop(); var innerHeight = window.innerHeight(); var scrollHeight = $('body').prop('scrollHeight'); if (scrollTop + innerHeight >= scrollHeight) { fixBox.classList.add('bottom-nav--hide'); return true; } }else{ if(nowScrollTop + window.innerHeight < document.body.offsetHeight){ //Scroll up fixBox.classList.remove('bottom-nav--hide'); } } lastScrollTop = nowScrollTop; } } function bottomNav(){ var lastScrollTop = 0; var btnTop = document.querySelector('.bottom-nav__top'); var fixedButton = document.getElementById("orderFixArea"); if(fixedButton){ document.body.classList.add("button--fixed"); }; window.addEventListener("scroll", function(){ var scroll = window.pageYOffset || document.documentElement.scrollTop; var nav = document.querySelector('.bottom-nav'); if (scroll > lastScrollTop){ nav.classList.add('bottom-nav--hide'); } else { nav.classList.remove('bottom-nav--hide'); } // scroll bottom if(scroll === document.body.scrollHeight - document.documentElement.offsetHeight){ nav.classList.remove('bottom-nav--hide'); } lastScrollTop = scroll <= 0 ? 0 : scroll; // top button var currentScrollPercentage = getCurrentScrollPercentage(); if(currentScrollPercentage > 30){ btnTop.classList.add('bottom-nav__top--show'); } else { btnTop.classList.remove('bottom-nav__top--show'); } }); btnTop.addEventListener('click', function(){ window.scrollTo({ top: 0, behavior: 'smooth' }); }); } function getOffset(element){ if (!element.getClientRects().length) { return { top: 0, left: 0 }; } var rect = element.getBoundingClientRect(); var win = element.ownerDocument.defaultView; return ( { top: rect.top + win.pageYOffset, left: rect.left + win.pageXOffset }); } function getQuickPosition(){ var role = document.querySelector("meta[name='path_role']").getAttribute('content'); if (role === "MAIN") { return getMainQuickPosition(); } else { return getSubQuickPosition(); } } function getMainQuickPosition(){ var quickMenu = document.querySelector('#quick'); var collection = document.querySelector('.collection'); var snsItem = document.querySelector('.snsItem'); var mainTopSpace = 115; var mainFooterSpace = 34; var top = collection.offsetTop + collection.clientHeight + mainTopSpace; var footTop = getOffset(snsItem).top + mainFooterSpace; var maxY = footTop - quickMenu.offsetHeight; return [top, maxY] } function getSubQuickPosition(){ var quickMenu = document.querySelector('#quick'); var footer = document.querySelector("#footer"); var footerSpace = 60; var top = 284; var footTop = getOffset(footer).top; var maxY = footTop - quickMenu.offsetHeight - footerSpace; return [top, maxY] } function setQuickScrollEvent(y, quick){ var header = document.querySelector('#header'); var position = getQuickPosition(); var scrollY = y; if (scrollY >= position[0] - header.offsetHeight){ if (scrollY < position[1]) { quick.classList.add('fixed'); quick.removeAttribute('style'); } else { quick.classList.remove('fixed'); quick.style.position = 'absolute'; quick.style.top = position[1] + 'px'; } } else { quick.style.top = position[0] + 'px'; quick.classList.remove('fixed'); } } function quickGoTop(){ var btnTop = document.querySelector('#quick .pageTop'); btnTop.addEventListener('click', function(){ window.scrollTo({ top: 0, behavior: 'smooth' }); }); } function topBanner(){ var banner = document.querySelector('#topBanner'); if(!banner) return; var btnClose = banner.querySelector('.btnClose'); btnClose.addEventListener('click', function(){ banner.classList.add("hidden"); }); } function getCurrentScrollPercentage(){ return (window.scrollY + window.innerHeight) / document.body.clientHeight * 100 } jQuery(document).ready(function() { /* 카테고리가 대량일때 나머지 숨김 jQuery("#header .inner .top_nav_box .top_category").each(function(){ var top_category_length = jQuery(' > ul > li',this).length; if ( top_category_length > 20 ) { jQuery(this).append('
'); } jQuery(' > ul > li:lt(20)',this).show(); }); */ /* 카테고리가 대량일때 이상일때 출력버튼 jQuery("#header .inner .top_nav_box .top_category .cate_more").click(function() { var cate_more_on = jQuery(this).hasClass('on'); if ( cate_more_on == false ) { jQuery('#header .inner .top_nav_box .top_category > ul > li').show(); jQuery('#header .inner .top_nav_box .top_category .cate_more').addClass("on"); } else { jQuery('#header .inner .top_nav_box .top_category .cate_more').removeClass("on"); jQuery('#header .inner .top_nav_box .top_category > ul > li').hide(); jQuery('#header .inner .top_nav_box .top_category > ul > li:lt(20)').show(); } }); */ /* 최상단배너 하루동안 닫기 - 서정환 */ jQuery(".main_top_banner .top_banner_box_inner .top_banner_close .icon").bind("click", function() { if(jQuery("#top_banner_box_cloase").is(":checked")){ jQuery(".main_top_banner").slideUp("fast"); setCookiem("top_banner_cookie", "top_banner_cookie", 1); } else { jQuery(".main_top_banner").slideUp("fast"); } }); var main_top_banner_diplay = jQuery(".main_top_banner").attr("data-ez-display"); if (!getCookiem("top_banner_cookie") && (main_top_banner_diplay == 'visible')) { jQuery(".main_top_banner").slideDown("fast"); } /* 최상단배너 닫기버튼 없을시 높이 수정 */ if(jQuery(".top_banner_close").css("display") == "none"){ jQuery(".main_top_banner").addClass('close_none'); if (main_top_banner_diplay == 'visible') { jQuery(".main_top_banner").slideDown("fast"); } } /* 상단 고객센터 - 서정환 */ jQuery("#header .inner .toparea .toparea_state .toparea_state_board").click(function() { var theme_cl = jQuery(this).attr('class'); jQuery(this).toggleClass('on'); }); /* 로그인폼 placeholder 추가 - 서정환 */ if (jQuery('.xans-member-login').val() != undefined) { jQuery('#member_passwd').attr('placeholder', '비밀번호'); } /* 비회원 주문조회페이지 placeholder 추가 - 서정환 */ setTimeout(function(){ if (jQuery('.xans-myshop-orderhistorynologin').val() != undefined) { jQuery('#order_name').attr('placeholder', '주문자명'); jQuery('#order_id').attr('placeholder', '주문번호(하이픈(-) 포함)'); jQuery('#order_password').attr('placeholder', '비회원주문 비밀번호'); } }, 100); /* 검색페이지 인풋박스에서 텍스트 삭제 - 서정환 */ jQuery('#ec-product-searchdata-searchkeyword_form').find('button.btnDelete').bind('click', function() { jQuery('#ec-product-searchdata-keyword').val('').focus(); }); /* 검색페이지 정렬 텍스트 변경 */ jQuery("#order_by").each(function(){ jQuery('option:first-child', this).text('- 정렬방식 -'); }); /* 멀티샵 없을경우 숨김 */ jQuery(".xans-layout-multishoplist").each(function(){ var multishoplist_count = jQuery('li', this).length; if ( multishoplist_count == 1 ) { jQuery(this).hide(); } }); /* 하단 에스크로 사용하면 출력 */ jQuery("#footer .inner .bt_escrow").each(function(){ var bt_escrow = jQuery(this).attr("data-ez-escrow"); if ( !bt_escrow == '' ) { var bt_escrow_name = jQuery("a img[data-ez-escrow-id="+ bt_escrow +"]", this).addClass('on'); jQuery(this).css('display','flex'); } }); /* 로그인페이지 SNS 사용하면 출력 */ jQuery(".xans-member-login .login__sns .wrap_sns_log a").each(function(){ var wrap_sns_log = jQuery(this).hasClass('displaynone'); if( wrap_sns_log == false){ jQuery(".xans-member-login .login__sns").css('display','block'); } }); /* 기획전 레이아웃변경에 따른 타겟고정위치 변경 */ var header_height = document.getElementById("header").scrollHeight; jQuery('.xans-project-list h3 span').css('top',-header_height+30); /* 모바일에서 쇼핑큐레이션 */ jQuery('#shoppQbtn').click(function(){ if (jQuery("#searchContent.xans-product-searchdata").is(":hidden")) { jQuery('#searchContent.xans-product-searchdata').slideDown('normal'); jQuery(this).text('상세검색 닫기'); jQuery(this).css('margin-top','0'); } else { jQuery('#searchContent.xans-product-searchdata').slideUp('normal'); jQuery(this).text('상세검색'); } }); /* 모바일에서 쇼핑큐레이션 없을시 버튼 숨김 */ jQuery("#searchContent").each(function(){ var prdCount_count = jQuery("#ec-searchdata-area", this).length; if ( prdCount_count == '0' ) { jQuery('#shoppQbtn').hide(); } }); /* 마이페이지 나의게시글 없을때 메시지 표시 */ jQuery(".xans-myshop-boardpackage").each(function(){ var boardlist = jQuery(".xans-myshop-boardlist table", this).length; if ( boardlist == '0' ) { jQuery('.myshop_boardlist_empty').css('display','flex'); } }); /* 더보기 클릭시 */ jQuery('.btnMore').click(function(){ setTimeout(function(){ ifmore(); },600) }); setTimeout(function(){ ifmore(); },300) /* 상단 카테고리 변경 감지 */ top_category(); // 상단카테고리 observeTopCategory(); // 상단카테고리 변경 감지 }); /* 상단 카테고리 변경 감지 */ function observeTopCategory(){ var targetNode = jQuery('#header .xans-layout-category > ul')[0]; // MutationObserver 인스턴스 생성 var observer = new MutationObserver(function(mutationsList, observer) { // 변경 감지된 경우 상단카테고리 실행 top_category(); }); // 상단 카테고리가 있는 경우 변경 감지 if (targetNode) { observer.observe(targetNode, { childList: true, subtree: true }); } } /* 상단 카테고리 */ function top_category(){ /* 상단카테고리 */ jQuery('#header .top_category li').mouseenter(function(e) { var $this = jQuery(this).addClass('on') }).mouseleave(function(e) { jQuery(this).removeClass('on'); }); /* 상단카테고리 중분류체크 */ jQuery('#header .top_category ul.sub_cate01 li').each(function() { if (jQuery(this).children('ul').length == 0) { jQuery(this).addClass('noChild'); } }); } /* 최상단배너 쿠키 스크립트 - 서정환 */ function setCookiem(cookie_name, cookie_value, expire_date) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000 * 24 * expire_date); cookies = cookie_name + '=' + cookie_value + '; path=/;'; if (expire_date != 0) cookies += 'expires=' + expire.toGMTString(); document.cookie = cookies; } function delCookiem(cookie_name) { var _today = new Date(); var value = ''; _today.setDate(_today.getDate() - 1); document.cookie = cookie_name + "=" + value + '; path=/;' + "; expires=" + _today.toGMTString(); } function getCookiem(name) { lims = document.cookie; var index = lims.indexOf(name + "="); if (index == -1) { return null; } index = lims.indexOf("=", index) + 1; // first character var endstr = lims.indexOf(';', index); if (endstr == -1) { endstr = lims.length; // last character } return unescape(lims.substring(index, endstr)); } /* 더보기 클릭시 */ function ifmore(){ /* 상품 썸네일 관심상품 출력 & 숨김 */ setTimeout(function(){ jQuery('.ec-base-product .prdList .icon__box .wish').each(function(){ var isstatus = jQuery(this).children('img').attr('icon_status'); if ( isstatus == 'on' ) { jQuery(this).addClass('on'); } }); jQuery('.ec-base-product .prdList .icon__box .wish').click(function(){ var isstatus = jQuery(this).children('img').attr('icon_status'); if ( isstatus == 'off' ) { jQuery(this).addClass('on'); } else { jQuery(this).removeClass('on'); } }); },200) jQuery('.ec-base-product .prdList > li').each(function(){ /* 상품진열 장바구니 사용안할시 숨김 */ if (jQuery(".icon__box .cart > .ec-admin-icon", this).length == 1) { } else { jQuery('.icon__box .cart', this).hide(); } /* 상품진열 옵션미리보기 사용안할시 숨김 */ if (jQuery(".icon__box .option > a", this).length == 1) { } else { jQuery('.icon__box .option', this).hide(); } /* 상품진열 관심상품 사용안할시 숨김 */ if (jQuery(".icon__box .wish > .ec-product-listwishicon", this).length == 1) { } else { jQuery('.icon__box .wish', this).hide(); } }); } //window popup script function winPop(url) { window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); } /** * document.location.href split * return array Param */ function getQueryString(sKey) { var sQueryString = document.location.search.substring(1); var aParam = {}; if (sQueryString) { var aFields = sQueryString.split("&"); var aField = []; for(var i=0; i 0 ? 'orderFixItem' : 'fixedActionButton', $area = $('#orderFixArea'), $item = $('#' + sFixId + '').not($area); $(window).scroll(function(){ try { // 구매버튼 관련변수 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), iButtonHeightPos = $item.offset().top; if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { $area.fadeIn('fast'); } else { $area.hide(); } } else { $area.fadeIn('fast'); } } catch(e) { } }); }; $(function(){ // tab $.eTab = function(ul) { $(ul).find('a').on('click', function() { var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), _target = $(this).attr('href'), _siblings = '.' + $(_target).attr('class'); $(_target).show().siblings(_siblings).hide(); return false }); } if ( window.call_eTab ) { call_eTab(); }; globalBuyBtnScrollFunc(); }); /** * Webcomponent의 생명주기와 비슷하게 섹션을 컨트롤 할 수 있습니다. */ (function () { var base = { version: '1.0.0', component: {}, ready: false, register: register, connect: connect, change: change, disconnect: disconnect, } try { polyfill(); init(); } catch (e) { } function init() { try { _init(); } catch (e) { console.error(e); } } function _run(name, section, fn, type) { var handlers = this.component[name]; if (handlers) { for (var j = 0; j < handlers.length; j++) { if (handlers[j][fn]) { handlers[j][fn](section, type); } } } } function connect(name, section, type) { return _run.call(this, name, section, 'connect', type) } function change(name, section, type) { return _run.call(this, name, section, 'change', type) } function disconnect(name, section, type) { return _run.call(this, name, section, 'disconnect', type) } /** * 섹션의 라이프사이클 관리 기능을 등록합니다. * @param {string} name 섹션 이름 * @param {function | object} init 초기화시 호출 함수 또는 함수목록 * @returns void */ function register(name, init) { var handler = _register.call(this, name, (init.init || init)(), arguments); if (EZST.ready) { var sections = document.querySelectorAll('[data-ez-module="' + name + '"]'); for (var i = 0; i < sections.length; i++) { if (handler.init) { handler.init(sections[i]); } if (handler.connect) { handler.connect(sections[i]); } } } } function _init() { window.addEventListener('DOMContentLoaded', function (ev) { EZST.ready = true; for (var k in EZST.component) { var sections = document.querySelectorAll('[data-ez-module="' + k + '"]'); for (var i = 0; i < sections.length; i++) { var handlers = EZST.component[k]; for (var j = 0; j < handlers.length; j++) { if (handlers[j].init) { handlers[j].init(sections[i]); } if (handlers[j].connect) { handlers[j].connect(sections[i]); } } } } }); window.EZST = Object.assign(window.EZST || {}, base, { status: ('EZST' in window) ? 1 : 0, }); _prepare(); _setViewType(); _cleanup() } function _setViewType() { try { var mq = window.matchMedia("(max-width: 1024px)"); mq.addEventListener('change', function (ev) { _changeViewType(ev.target); }, false); _changeViewType(mq); } catch (e) { } } function _changeViewType(mq) { document.documentElement.classList.toggle('ez-view-type-mobile', mq.matches); } function _cleanup() { window.addEventListener('DOMContentLoaded', function (ev) { var props = document.documentElement.querySelectorAll('ez-prop,script[type="text/ez-prop"]'); for (var i = 0; i < props.length; i++) { props[i].parentNode && props[i].parentNode.removeChild(props[i]); } }); } function _prepare() { if (EZST.q && EZST.q.length) { for (var i = 0; i < EZST.q.length; i++) { _register.apply(EZST, EZST.q[i]); } delete EZST.q; } } function _register(name, init, raw) { var handler = { // init: function (section) { }, // disconnect: function (section) { }, // changed: function (section) { }, // connect: function (section) { }, }; Object.assign(handler, (init && init.constructor === Object) ? init : (raw[1].constructor === Object) ? raw[1] : {}); if (!this.component[name]) { this.component[name] = []; } this.component[name].push(handler); return handler; } function polyfill() { if (typeof Object.assign != "function") { Object.defineProperty(Object, "assign", { value: function assign(target, varArgs) { "use strict"; if (target == null) { throw new TypeError("Cannot convert undefined or null to object"); } var to = Object(target); for (var index = 1; index < arguments.length; index++) { var nextSource = arguments[index]; if (nextSource != null) { for (var nextKey in nextSource) { if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; }, writable: true, configurable: true }); } } })(); $(function(){ if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { var sShippingCountryCode4Cookie = 'shippingCountryCode'; var bShippingCountryProc = false; // 배송국가 선택 설정이 사용안함이면 숨김 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); } else { $('.thumb .xans-layout-multishoplistitem').hide(); var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); if (typeof(aShippingCountryCode) != 'undefined' && aShippingCountryCode != null && aShippingCountryCode.length > 2) { var sShippingCountryValue = aShippingCountryCode[2]; } // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); if (aHrefCountryValue.length == 2) { var sShippingCountryValue = aHrefCountryValue[1]; } // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); } } if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { sShippingCountryValue = sShippingCountryValue.split("#")[0]; var bShippingCountryProc = true; $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); var expires = new Date(); expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { $("#f_country").val(sShippingCountryValue).change(); } } } // 언어선택 설정이 사용안함이면 숨김 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); } else { $('.thumb .xans-layout-multishoplistitem').hide(); } // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { $(".xans-layout-multishopshipping").hide(); $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); // 배송국가 선택을 사용해야 레이어를 보이게 함 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { $(".xans-layout-multishopshipping").show(); } } $(".xans-layout-multishopshipping .btnClose").on("click", function() { $(".xans-layout-multishopshipping").hide(); }); $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { var expires = new Date(); expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값을 넘김 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; }); $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { $(".xans-layout-multishopshipping").show(); }); } }); var aCategory = []; $(function(){ var methods = { aCategory : [], aSubCategory : {}, get: function() { $.ajax({ url : '/exec/front/Product/SubCategory', dataType: 'json', success: function(aData) { if (aData == null || aData == 'undefined') { methods.checkSub(); return; } for (var i=0; i'); $(methods.aSubCategory[iCateNo]).each(function() { var sNextParentNo = this.cate_no; var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; if (methods.aSubCategory[sNextParentNo] == undefined) { aHtml.push('
  • '); var sHref = '/product/list.html'+this.param; } else { aHtml.push('
  • '); var sHref = '#none'; } aHtml.push(''+this.name+''); if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('상품보기'); if (methods.aSubCategory[sNextParentNo] != undefined) { aHtml.push('
      '); $(methods.aSubCategory[sNextParentNo]).each(function() { var sNextParentNo2 = this.cate_no; var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; if (methods.aSubCategory[sNextParentNo2] == undefined) { aHtml.push('
    • '); var sHref = '/product/list.html'+this.param; } else { aHtml.push('
    • '); var sHref = '#none'; } aHtml.push(''+this.name+''); if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('상품보기'); if (methods.aSubCategory[sNextParentNo2] != undefined) { aHtml.push('
        '); $(methods.aSubCategory[sNextParentNo2]).each(function() { aHtml.push('
      • '); var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; aHtml.push(''+this.name+''); aHtml.push('
      • '); }); aHtml.push('
      '); } aHtml.push('
    • '); }); aHtml.push('
    '); } aHtml.push('
  • '); }); aHtml.push(''); } $(oParentNode).append(aHtml.join('')); if (window.i18nextCafe24) { i18nextCafe24.translate('data-i18n-new'); } }, close: function() { $('.slideSubMenu').remove(); }, checkSub: function() { $('.cate').each(function(){ var sParam = $(this).attr('cate'); if (!sParam) return; var iCateNo = Number(methods.getParam(sParam, 'cate_no')); var result = methods.aSubCategory[iCateNo]; if (result == undefined) { if ($(this).closest('#slideProjectList').length) { var sHref = '/product/project.html'+sParam; } else { var sHref = '/product/list.html'+sParam; } $(this).attr('href', sHref); $(this).parent().attr('class', 'noChild'); } }); } }; methods.get(); $('#slideCateList li > a.cate').on('click', function(e) { var sParam = $(this).attr('cate'); if (!sParam) return; var iCateNo = Number(methods.getParam(sParam, 'cate_no')); var hasClass = $(this).parent().hasClass('selected'); if(hasClass) { methods.close(); $(this).parent().removeClass('selected'); } else { if (!iCateNo) return; $('#aside #slideCateList li').removeClass('selected'); $(this).parent().addClass('selected'); methods.close(); methods.show(this.parentNode, iCateNo); } e.preventDefault(); }); /* 모바일 슬라이드바 카테고리 중분류체크 */ jQuery('#slide_add_category li').each(function(){ if( jQuery(this).children('ul').length == 0 ){ jQuery(this).addClass('noChild'); } else { jQuery(this).append('상품보기'); } }); /* 모바일 슬라이드바 카테고리 */ $('#aside ul a.cate').on('click', function(e){ var sParam = $(this).attr('cate'); if(sParam) return; $(this).parent().find('li').removeClass('selected'); $('#slideCateList .categoryList li').removeClass('selected'); $(this).parent().toggleClass('selected'); if (!$(this).parent('li').hasClass('noChild')){ e.preventDefault(); } }); /* 슬라이드 고객센터 토글 */ jQuery('#aside .navigation-menu__board .icoCategory').click(function() { var target = jQuery(this).parents('#aside .navigation-menu__board'); if(target.find('.categoryList').css("display") == "none"){ target.find('.categoryList').show(); }else{ target.find('.categoryList').hide(); } jQuery(this).parents('.title').toggleClass('selected'); }); $('#slideCateList h2').on('click', function() { var oParentId = $(this).parent().attr('id'); if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); } $(this).toggleClass('selected'); }); $('#slideProjectList .icoCategory').on('click', function() { var target = $(this).parents('#slideProjectList'); if(target.find('.categoryList').css("display") == "none"){ target.find('.categoryList').show(); }else{ target.find('.categoryList').hide(); } $(this).parents('.title').toggleClass('selected'); }); }); function subMenuEvent(obj) { $(obj).parent().find('li').removeClass('selected'); $(obj).parent().toggleClass('selected'); } function checkInArray(sBookmarkList, iCateNo) { if (sBookmarkList == null) return false; var aBookmarkList = sBookmarkList.split("|"); for (var i = 0; i < aBookmarkList.length; i++) { if (aBookmarkList[i] == iCateNo) { return true; } } return false; }