var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); /** * 상품상세 섬네일 롤링 */ $(document).ready(function(){ $.fn.prdImg = function(parm){ var index = 0; var target = parm.target; var view = parm.view; var listWrap = target.find('.xans-product-addimage'); var limit = listWrap.find('> ul > li').length; var ul = target.find('.xans-product-addimage > ul'); var liFirst = target.find('.xans-product-addimage > ul > li:first-child'); var liWidth = parseInt(liFirst.width()); var liHeight = parseInt(liFirst.height()); var blockWidth = liWidth + parseInt(liFirst.css('marginRight')) + parseInt(liFirst.css('marginLeft')); var columWidth = blockWidth * view; var colum = Math.ceil(limit / view); var roll = { init : function(){ function struct(){ var ulWidth = limit * parseInt(blockWidth); listWrap.append(''); listWrap.append(''); ul.css({'position':'absolute', 'left':0, 'top':0, 'width':ulWidth}); listWrap.find('> ul > li').each(function(){ $(this).css({'float':'left'}); }); listWrap.css({'position':'relative', 'height':liHeight}); var prev = listWrap.find('.prev'); var next = listWrap.find('.next'); prev.click(function(){ if(index > 0){ index --; } roll.slide(index); }); next.click(function(){ if(index < (colum-1) ){ index ++; } roll.slide(index); }); if(index == 0){ prev.hide(); } else { prev.show(); } if(index >= (colum-1)){ next.hide(); } else { next.show(); } } if(limit > view){ struct(); } }, slide : function(index){ var left = '-' + (index * columWidth) +'px'; var prev = listWrap.find('.prev'); var next = listWrap.find('.next'); if(index == 0){ prev.hide(); } else { prev.show(); } if(index >= (colum-1)){ next.hide(); } else { next.show(); } ul.stop().animate({'left':left},500); } } roll.init(); }; // 함수호출 : 상품상세 페이지 $.fn.prdImg({ target : $('.xans-product-image'), view : 5 }); // 함수호출 : 상품확대보기팝업 $.fn.prdImg({ target : $('.xans-product-zoom'), view : 5 }); }); /** * 상품상세 사용후기 */ $(document).ready(function(){ $('.xans-product-review a').click(function(e) { e.preventDefault(); var no = $(this).attr('href').replace(/(\S*)no=(\d+)(\S*)/g, '$2'); var $obj = $('#product-review-read_'+no); //로드된 엘리먼트 존재 체크 if ($obj.length > 0) { if ($obj.css('display') =='none') { $obj.show(); } else { $obj.hide(); } return; } REVIEW.getReadData($(this)); }); }); var PARENT = ''; var OPEN_REVIEW = ''; var REVIEW = { getReadData : function(obj, eType) { if (obj != undefined) { PARENT = obj; var sHref = obj.attr('href'); var pNode = obj.parents('tr'); var pass_check = '&pass_check=F'; } else { var sHref = PARENT.attr('href'); var pNode = PARENT.parents('tr'); var pass_check = '&pass_check=T'; } var sQuery = sHref.split('?'); var sQueryNo = sQuery[1].split('='); if (OPEN_REVIEW == sQueryNo[1]) { $('#product-review-read').remove(); OPEN_REVIEW = ''; return false; } else { OPEN_REVIEW = sQueryNo[1]; } $.ajax({ url : '/exec/front/board/product/4?'+sQuery[1]+pass_check, dataType: 'json', success: function(data) { $('#product-review-read').remove(); var sPath = document.location.pathname; var sPattern = /^\/product\/(.+)\/([0-9]+)(\/.*)/; var aMatchResult = sPath.match(sPattern); if (aMatchResult) { var iProductNo = aMatchResult[2]; } else { var iProductNo = getQueryString('product_no'); } var aHtml = []; //읽기 권한 체크 if (false === data.read_auth && eType == undefined) { alert(decodeURIComponent(data.alertMSG)); return false; } if (data.is_secret == true) { // 비밀글 비밀번호 입력 폼 aHtml.push('
'); aHtml.push(''); aHtml.push('

비밀번호

'); aHtml.push('
'); } else { // 글 내용 if (data.read['content_image'] != null) { var sImg = data.read['content_image']; } else { var sImg = ''; } aHtml.push('
'); aHtml.push('

'+data.read['content']+'

'); aHtml.push('

'+sImg+'

'); aHtml.push('

게시글 수정

'); aHtml.push('
'); // 댓글리스트 if (data.comment != undefined && data.comment.length != undefined) { aHtml.push(''); } // 댓글쓰기 if (data.comment_write != undefined) { aHtml.push('
'); aHtml.push('
'); aHtml.push('
'); aHtml.push('

이름 '+data.comment_write['comment_name']+' 비밀번호 '+data.comment_write['comment_password']+''); aHtml.push(''+data.comment_write['comment']+'확인

'); aHtml.push('

'+data.comment_write['comment_point']+'

'); aHtml.push('

'+data.comment_write['comment_byte']+' / '+data.comment_write['comment_size']+' byte

'); aHtml.push('

'+data.comment_write['captcha_image']+data.comment_write['captcha']+' 왼쪽의 문자를 공백없이 입력하세요.(대소문자구분)

'); aHtml.push('
'); aHtml.push('
'); aHtml.push('
'); } // 댓글의 댓글쓰기 if (data.comment_reply != undefined) { aHtml.push(''); } } $(pNode).after(''+aHtml.join('')+''); // 평점기능 사용안함일 경우 보여지는 td를 조절하기 위한 함수 PRODUCT_COMMENT.comment_colspan(pNode); if (data.comment_write != undefined && data.comment_write['use_comment_size'] == '') PRODUCT_COMMENT.comment_byte(4, data.key); if (data.comment_reply != undefined && data.comment_write['use_comment_size'] == '') PRODUCT_COMMENT.comment_byte(4, data.key, 'commentReplyWriteForm'); } }); }, END : function() {} }; /** * 상품상세 Q&A */ $(document).ready(function(){ $('.xans-product-qna a').click(function(e) { e.preventDefault(); var no = $(this).attr('href').replace(/(\S*)no=(\d+)(\S*)/g, '$2'); var $obj = $('#product-qna-read_'+no); //로드된 엘리먼트 존재 체크 if ($obj.length > 0) { if ($obj.css('display') =='none') { $obj.show(); } else { $obj.hide(); } return; } QNA.getReadData($(this)); }); }); var PARENT = ''; var OPEN_QNA = ''; var QNA = { getReadData : function(obj, eType) { if (obj != undefined) { PARENT = obj; var sHref = obj.attr('href'); var pNode = obj.parents('tr'); var pass_check = '&pass_check=F'; } else { var sHref = PARENT.attr('href'); var pNode = PARENT.parents('tr'); var pass_check = '&pass_check=T'; } var sQuery = sHref.split('?'); var sQueryNo = sQuery[1].split('='); if (OPEN_QNA == sQueryNo[1]) { $('#product-qna-read').remove(); OPEN_QNA = ''; return false; } else { OPEN_QNA = sQueryNo[1]; } $.ajax({ url : '/exec/front/board/product/6?'+sQuery[1]+pass_check, dataType: 'json', success: function(data) { $('#product-qna-read').remove(); var sPath = document.location.pathname; var sPattern = /^\/product\/(.+)\/([0-9]+)(\/.*)/; var aMatchResult = sPath.match(sPattern); if (aMatchResult) { var iProductNo = aMatchResult[2]; } else { var iProductNo = getQueryString('product_no'); } var aHtml = []; //읽기 권한 체크 if (false === data.read_auth && eType == undefined) { alert(decodeURIComponent(data.alertMSG)); return false; } if (data.is_secret == true) { // 비밀글 비밀번호 입력 폼 aHtml.push('
'); aHtml.push(''); aHtml.push('

비밀번호

'); aHtml.push('
'); } else { // 글 내용 if (data.read['content_image'] != null) { var sImg = data.read['content_image']; } else { var sImg = ''; } aHtml.push('
'); aHtml.push('

'+data.read['content']+'

'); aHtml.push('

'+sImg+'

'); aHtml.push('

게시글 수정

'); aHtml.push('
'); // 댓글리스트 if (data.comment != undefined && data.comment.length != undefined) { aHtml.push(''); } // 댓글쓰기 if (data.comment_write != undefined) { aHtml.push('
'); aHtml.push('
'); aHtml.push('
'); aHtml.push('

이름 '+data.comment_write['comment_name']+' 비밀번호 '+data.comment_write['comment_password']+''); aHtml.push(''+data.comment_write['comment']+'확인

'); aHtml.push('

'+data.comment_write['comment_point']+'

'); aHtml.push('

'+data.comment_write['comment_byte']+' / '+data.comment_write['comment_size']+' byte

'); aHtml.push('

'+data.comment_write['captcha_image']+data.comment_write['captcha']+' 왼쪽의 문자를 공백없이 입력하세요.(대소문자구분)

'); aHtml.push('
'); aHtml.push('
'); aHtml.push('
'); } // 댓글의 댓글쓰기 if (data.comment_reply != undefined) { aHtml.push(''); } } $(pNode).after(''+aHtml.join('')+''); // 평점기능 사용안함일 경우 보여지는 td를 조절하기 위한 함수 PRODUCT_COMMENT.comment_colspan(pNode); if (data.comment_write != undefined && data.comment_write['use_comment_size'] == '') PRODUCT_COMMENT.comment_byte(6, data.key); if (data.comment_reply != undefined && data.comment_write['use_comment_size'] == '') PRODUCT_COMMENT.comment_byte(6, data.key, 'commentReplyWriteForm'); } }); }, END : function() {} }; /** * 움직이는 배너 Jquery Plug-in * @author cafe24 */ ;(function($){ $.fn.floatBanner = function(options) { options = $.extend({}, $.fn.floatBanner.defaults , options); return this.each(function() { var aPosition = $(this).position(); var node = this; $(window).scroll(function() { var _top = $(document).scrollTop(); _top = (aPosition.top < _top) ? _top : aPosition.top; setTimeout(function () { $(node).stop().animate({top: _top}, options.animate); }, options.delay); }); }); }; $.fn.floatBanner.defaults = { 'animate' : 500, 'delay' : 500 }; })(jQuery); /** * 문서 구동후 시작 */ $(document).ready(function(){ $('#banner, #quick').floatBanner(); }); /** * 썸네일 이미지 엑박일경우 기본값 설정 */ $(window).load(function() { $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ var $img = new Image(); $img.onerror = function () { $item.src="/http://img.echosting.cafe24.com/thumb/img_product_big.gif"; } $img.src = this.src; }); }); //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'+sPage+''); } else { var sHref = $(this).attr('href'); $(this).parent().html(''+sPage+''); } }); } $(document).ready(function(){ // tab $.eTab = function(ul){ $(ul).find('a').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(); }; }); /*************************************************************************************** 이미지롤오버 ***************************************************************************************/ function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i