var rm_collection_wrap_view_width = 0;//pc var rm_collection_wrap_view_height = 0; function fRMCShow(idx){ $('#rm_collection_wrap_view').css('display','block'); $('#rm_collection_wrap_view').css('max-width','880px'); var ua = navigator.userAgent; if (ua.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson|mobile/i) != null || ua.match(/LG|SAMSUNG|Samsung/) != null){ $('#rm_collection_wrap_view').css('max-width','670px'); } $('#rm_collection_detail').attr('src','https://www.reviewmaker.co.kr/script/collection_detail.php?idx='+idx); $('#rm_collection_wrap').css('display','block'); $('#rm_collection_wrap_view').css('margin-left','-'+($('#rm_collection_wrap_view').width() / 2)+'px'); $('#rm_collection_close').css('display','block'); $('#rm_collection_wrap_video1').show(); $('#rm_collection_wrap_img1').hide(); if($(window).width() > 750){ $("#rm_collection_wrap_view").animate({'top':'20%'},300); $('#rm_collection_wrap_view').css('max-height','613px'); }else{ $("#rm_collection_wrap_view").animate({'top':'20%'},300); $('#rm_collection_wrap_view').css('max-height','fit-content'); if($('#rm_collection_wrap_view').height() > $(window).height()) $('#rm_collection_wrap_view').css('max-height',($(window).height() * 0.8)+'px'); } var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; var rm_collection_page = ''; if( rm_collection_href == 'MAIN' ){ rm_collection_page = 'main'; } else if(rm_collection_href == 'PRODUCT_DETAIL'){ rm_collection_page = 'prod'; } else if(rm_collection_href == 'ORDER_BASKET' ){ rm_collection_page = 'cart'; } $('#reviecollectionlog').attr('src','https://wz.reviewmaker.co.kr/logc.php?g=c&s=4770&p='+rm_collection_page+'&i='+idx); } function fRMCShowAll(){ $('#rm_collection_wrap_view').css('max-width','1000px'); var ua = navigator.userAgent; if (ua.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson|mobile/i) != null || ua.match(/LG|SAMSUNG|Samsung/) != null){ //$('#rm_collection_wrap_view').css('max-width','670px'); $('#rm_collection_wrap_view').css('max-width','570px'); } var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; $('#rm_collection_detail').css('height','813px!important'); $('#rm_collection_detail').attr('src','https://www.reviewmaker.co.kr/script/collection_all.php?idx=4770&gbn='+rm_collection_href); $('#rm_collection_detail').css('height','813px!important'); $('#rm_collection_wrap').css('display','block'); $('#rm_collection_wrap_view').css('display','block'); $('#rm_collection_close').css('display','block'); if($(window).width() > 750){ $('#rm_collection_wrap_view').css('max-height','740px'); }else{ $('#rm_collection_wrap_view').css('max-height','fit-content'); } $('#rm_collection_wrap_view').css('margin-left','-'+($('#rm_collection_wrap_view').width() / 2)+'px'); $('#rm_collection_wrap_video1').show(); $('#rm_collection_wrap_img1').hide(); $("#rm_collection_wrap_view").animate({'top':'20%'},300); } function fRMCClose(){ $("#rm_collection_wrap_view").animate({'top':'100%'},600); document.getElementById("rm_collection_wrap").style.display = 'none'; document.getElementById("rm_collection_wrap_view").style.display = 'none'; document.getElementById("rm_collection_close").style.display = 'none'; } function fRMCVideoLoad(obj,gbn){ var obj_width = $(obj).width(); var obj_height = $(obj).height(); var parent_width = $(obj).parent().width(); if(gbn==1){ if($(obj).width() >= $(obj).height()){ $(obj).css('width','auto'); $(obj).css('height',parent_width+'px'); $(obj).css('margin-top','0px'); var overWidth = parseInt(($(obj).width() - parent_width) / 2); $(obj).css('margin-left','-'+overWidth+'px'); }else{ $(obj).css('width',parent_width+'px'); $(obj).css('height','auto'); $(obj).css('margin-left','0px'); //var overHeight = parseInt(($(obj).height() - parent_width) / 2); var overHeight = parseInt(($(obj).height() - parent_width) / 1); //align bottom $(obj).css('margin-top','-'+overHeight+'px'); } $(obj).parent().css('height',parent_width+'px'); }else{ var target_width = 152; var target_height = 228; if($(window).width() > 750){ target_width = 152; target_height = 228; //console.log(':::'+$(obj).parent().css('width')+'^^'+$(obj).parent().css('height')); }else{ //mo target_width = 120; target_height = 180; } if(($(obj).width() / $(obj).height()) >= (target_width / target_height)){ $(obj).css('width','auto'); $(obj).css('height','100%'); $(obj).css('margin-top','0px'); var overWidth = parseInt(($(obj).width() - target_width) / 2); $(obj).css('margin-left','-'+overWidth+'px'); $(obj).parent().css('border-radius','10px'); }else{ $(obj).css('width','100%'); $(obj).css('height','auto'); $(obj).css('margin-left','0px'); var overHeight = parseInt(($(obj).height() - target_height) / 2); $(obj).css('margin-top','-'+overHeight+'px'); $(obj).parent().css('border-radius','10px'); } } } function fRMCSupTodayClose(){ var rmc_date = new Date(Date.now() + 86400e3); rmc_date = rmc_date.toUTCString(); document.cookie = "rmctodayclose=y; expires=" + rmc_date; } console.log('COLLECTION-1'); $(window).load(function() {console.log('COLLECTION-2'); var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; var rm_collection_page = ''; if( rm_collection_href == 'MAIN' ){ rm_collection_page = 'main'; } else if(rm_collection_href == 'PRODUCT_DETAIL'){ rm_collection_page = 'prod'; } else if(rm_collection_href == 'ORDER_BASKET' ){ rm_collection_page = 'cart'; } var iDiv_Creviewmaker = document.createElement('div'); iDiv_Creviewmaker.id = 'reviewmaker_cdiv'; iDiv_Creviewmaker.style.width = '100%'; iDiv_Creviewmaker.style.maxWidth = '1232px'; if($(window).width() > 750){ iDiv_Creviewmaker.style.margin = '50px auto'; iDiv_Creviewmaker.style.height = '520px'; iDiv_Creviewmaker.style.minWidth = '1230px'; iDiv_Creviewmaker.style.maxWidth = 'none'; }else{ iDiv_Creviewmaker.style.margin = '50px auto'; iDiv_Creviewmaker.style.height = '168vw'; iDiv_Creviewmaker.style.margin = '0px auto'; } var reviemakerC_div_html = ''; var reviemakerC_div_htmls = ''; var reviemakerC_div_htmle = ''; var reviemakerC_div_html1 = ''; var reviemakerC_div_html2 = ''; var reviemakerC_div_html3 = ''; reviemakerC_div_htmls += ''; reviemakerC_div_htmls += ''; reviemakerC_div_htmls += '
'; reviemakerC_div_htmls += ' 엔비룩 Brand Crew'; reviemakerC_div_htmls += ' 더보기 〉'; reviemakerC_div_htmls += '
'; reviemakerC_div_htmls += ' '; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' 1'; reviemakerC_div_htmle += ' /'; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += '
'; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += ' '; reviemakerC_div_htmle += '
'; var iDiv_CreviewmakerP = document.createElement('div'); iDiv_CreviewmakerP.id = 'reviewmaker_cdiv'; iDiv_CreviewmakerP.style.width = '100%'; //iDiv_CreviewmakerP.style.height = '364px'; var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; if($(window).width() <= 750 && rm_collection_href == 'PRODUCT_DETAIL'){ iDiv_CreviewmakerP.style.height = 'auto'; }else{ iDiv_CreviewmakerP.style.height = '370px'; } iDiv_CreviewmakerP.style.margin = '10px auto'; var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; if($(window).width() > 750 && rm_collection_href == 'PRODUCT_DETAIL'){ iDiv_CreviewmakerP.style.margin = '50px auto -140px auto'; } var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; if($(window).width() > 750 && rm_collection_href == 'PRODUCT_DETAIL'){ iDiv_CreviewmakerP.style.float = 'left'; } iDiv_CreviewmakerP.style.maxWidth = '1280px'; var reviemakerC_div_htmlP = ''; var reviemakerC_div_htmlPs = ''; var reviemakerC_div_htmlPe = ''; var reviemakerC_div_htmlP1 = ''; var reviemakerC_div_htmlP2 = ''; var reviemakerC_div_htmlP3 = ''; reviemakerC_div_htmlPs += ''; reviemakerC_div_htmlPs += ''; reviemakerC_div_htmlPs += '
'; reviemakerC_div_htmlPs += ' 엔비룩 Brand Crew'; reviemakerC_div_htmlPs += ' 더보기 〉'; reviemakerC_div_htmlPs += '
'; reviemakerC_div_htmlPs += ' '; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' 1'; reviemakerC_div_htmlPe += ' /'; reviemakerC_div_htmlPe += ' 2'; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += '
'; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += ' '; reviemakerC_div_htmlPe += '
'; var ua = navigator.userAgent; var rmc_pc = true; if (ua.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson|mobile/i) != null || ua.match(/LG|SAMSUNG|Samsung/) != null){ rmc_pc = false; } var rm_collection_href = $('meta[name="path_role"]').attr('content')+''; console.log('collection:'+location.pathname); if(location.pathname.indexOf('/main.html') > -1 || location.pathname == '/' || location.pathname == '/m/' || location.pathname == '/m/index.html' || location.pathname == '/index.html') rm_collection_href = 'MAIN'; if(location.pathname.indexOf('/product.html') > -1 || location.pathname.indexOf('/shopdetail.html') > -1) rm_collection_href = 'PRODUCT_DETAIL'; if(location.pathname.indexOf('/basket.html') > -1) rm_collection_href = 'ORDER_BASKET'; console.log('collection:'+rm_collection_href); if(rm_collection_href == 'MAIN'){ if(rmc_pc){ //$(window).width() > 750 iDiv_Creviewmaker.innerHTML = reviemakerC_div_htmlPs + reviemakerC_div_htmlP1 + reviemakerC_div_htmlPe +'';$('#mainfoot').before(iDiv_Creviewmaker); $('#reviewmaker_cdiv').css('margin','0px auto'); $('#reviewmaker_cdiv').css('height','360px'); $('#reviewmaker_cdiv').css('max-width','1480px'); $('#reviewmaker_cdiv').css('width','90%'); $('#reviewmaker_cdiv').cs }else{ iDiv_Creviewmaker.innerHTML = reviemakerC_div_htmlPs + reviemakerC_div_htmlP1 + reviemakerC_div_htmlPe +'';$('footer').before(iDiv_Creviewmaker); $('#reviewmaker_cdiv').css('height','auto'); } }else if(rm_collection_href == 'PRODUCT_DETAIL'){ if(rmc_pc){ //$(window).width() > 750 }else{ } }else if(rm_collection_href.indexOf('ORDER_BASKET') > -1){ if(rmc_pc){ //$(window).width() > 750 $('#reviewmaker_cdiv').css('max-width','1400px'); }else{ //750 } //else 750 } // ORDER_BASKET iDiv_Creviewmaker = ''; iDiv_CreviewmakerP = ''; var rm_dragFlag; var rm_dragX, rm_dragY, rm_prev_x, rm_prev_y; //$(function() { $('.rm_collection_cont').mousedown(function(e) { rm_dragFlag = true; var obj = $(this); rm_dragX = obj.scrollLeft(); rm_dragY = obj.scrollTop(); rm_pre_x = e.screenX; rm_pre_y = e.screenY; $(this).css("cursor", "pointer"); }); $('.rm_collection_cont').mousemove(function(e) { if (rm_dragFlag) { var obj = $(this); obj.scrollLeft(rm_dragX - e.screenX + rm_pre_x); obj.scrollTop(rm_dragY - e.screenY + rm_pre_y); return false; } }); $('.rm_collection_cont').mouseup(function() { rm_dragFlag = false; $(this).css("cursor", "default"); }); // }); }); window.addEventListener('message', function(e) { if (e.origin === 'https://www.reviewmaker.co.kr') { if(e.data == 'review_collection'){ if($(window).width() > 750){ $('#rm_collection_wrap_view').css('max-width','880px'); $('#rm_collection_wrap_view').css('max-height','613px'); $('#rm_collection_wrap_view').css('margin-left','-'+($('#rm_collection_wrap_view').width() / 2)+'px'); } }else if(e.data == 'review_collection_back'){ if($(window).width() > 750){ $('#rm_collection_wrap_view').css('max-width','1000px'); $('#rm_collection_wrap_view').css('max-height','740px'); $('#rm_collection_wrap_view').css('margin-left','-'+($('#rm_collection_wrap_view').width() / 2)+'px'); }else{ $('#rm_collection_wrap_view').css('max-height','fit-content'); } } } });