var rm_insta_wrap_view_width = 0;//pc var rm_insta_wrap_view_height = 0; function fShow(idx, arg){ if($('#rm_insta_item_video_'+idx+' source').attr('data-width') * 1.25 < $('#rm_insta_item_video_'+idx+' source').attr('data-height')){ $('#rm_insta_wrap_video1').css('width','auto'); $('#rm_insta_wrap_video1').css('height','100%'); }else{ $('#rm_insta_wrap_video1').css('width','100%'); $('#rm_insta_wrap_video1').css('height','auto'); } $('#rm_insta_wrap_video1 source').attr('src',arg); //$('#rm_insta_wrap_video1').load(); document.getElementById("rm_insta_wrap_video1").load(); $('#rm_insta_wrap_video1').trigger('play'); $('#rm_insta_txt_pop').html($('#rm_insta_txt_'+idx).html()); document.getElementById("rm_insta_wrap").style.display = 'block'; document.getElementById("rm_insta_wrap_view").style.display = 'block'; document.getElementById("rm_insta_close").style.display = 'block'; $('#rm_insta_wrap_view').css('margin-left','-'+($('#rm_insta_wrap_view').width() / 2)+'px'); $('#rm_insta_wrap_video1').show(); $('#rm_insta_wrap_img1').hide(); $('#rm_insta_wrap_thumb2').attr('src','https://wz.reviewmaker.co.kr/log.php?'+arg.replace('https://wz.reviewmaker.co.kr/data/review/','')); } function fShowImg(idx, arg){ $('#rm_insta_wrap_img1').attr('src',arg); document.getElementById("rm_insta_wrap").style.display = 'block'; document.getElementById("rm_insta_wrap_view").style.display = 'block'; document.getElementById("rm_insta_close").style.display = 'block'; $('#rm_insta_wrap_view').css('margin-left','-'+($('#rm_insta_wrap_view').width() / 2)+'px'); $('#rm_insta_wrap_video1').hide(); $('#rm_insta_wrap_img1').show(); } function fClose(){ document.getElementById("rm_insta_wrap").style.display = 'none'; document.getElementById("rm_insta_wrap_view").style.display = 'none'; document.getElementById("rm_insta_close").style.display = 'none'; $('#rm_insta_wrap_video1 source').attr('src',''); document.getElementById("rm_insta_wrap_video1").load(); } function insertAfter(referenceNode, newNode) { if (!!referenceNode.nextSibling) { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); } else { referenceNode.parentNode.appendChild(newNode); } } window.onload = (function() { var iDiv_reviewmaker = document.createElement('div'); iDiv_reviewmaker.id = 'reviewmaker_div'; iDiv_reviewmaker.style.width = '100%'; iDiv_reviewmaker.style.height = '215px'; iDiv_reviewmaker.style.margin = '0 auto 0px auto'; var reviemaker_div_html = ''; reviemaker_div_html += ''; reviemaker_div_html += ''; reviemaker_div_html += '
'; reviemaker_div_html += '

인플루언서 리뷰

'; reviemaker_div_html += ' powered by ReviewMaker'; reviemaker_div_html += '
'; reviemaker_div_html += ' '; reviemaker_div_html += '
'; reviemaker_div_html += '
'; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += ' 1'; reviemaker_div_html += ' /'; reviemaker_div_html += ' 2'; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += '
'; reviemaker_div_html += '
'; reviemaker_div_html += '
'; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += '
'; //reviemaker_div_html += ' '; reviemaker_div_html += '
'; reviemaker_div_html += '
'; reviemaker_div_html += ' '; reviemaker_div_html += ' '; reviemaker_div_html += '
'; iDiv_reviewmaker.innerHTML = reviemaker_div_html; $('.detailTop').append(iDiv_reviewmaker); iDiv_reviewmaker = ''; var rm_dragFlag; var rm_dragX, rm_dragY, rm_prev_x, rm_prev_y; //$(function() { $('.rm_insta_cont').mousedown(function(e) { rm_dragFlag = true; var obj = $(this); //console.log("obj:" + obj); rm_dragX = obj.scrollLeft(); rm_dragY = obj.scrollTop(); rm_pre_x = e.screenX; rm_pre_y = e.screenY; $(this).css("cursor", "pointer"); }); $('.rm_insta_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_insta_cont').mouseup(function() { rm_dragFlag = false; $(this).css("cursor", "default"); }); // }); });