function showSkinVideoPopup(url){
var win_width=jQuery(window).width();
var win_height=jQuery(window).height();
var box_width=win_width;
var box_height=win_height;
var max_width=1600;
var pop_body='';
if(mb_options["device_type"]=="desktop"){
if(box_width>max_width){
box_width=max_width;
}
box_width=box_width;
box_height=box_width * 0.625;
box_width=parseInt(box_width * 0.9);
box_height=parseInt(box_height * 0.9);
}else{
if(box_width<box_height){
box_width=box_width - 20;
box_height=box_width * 0.625;
}}
if(url.indexOf('?')==-1){
url		+='?';
}else{
url		+='&';
}
if(String(url).indexOf("tv.naver.com")!=-1){
url		+="autoPlay=true";
}else{
url		+="autoplay=1";
}
pop_body +='<div class="mb-video-lightbox-wrap" style="">';
pop_body +='<div class="mb-video-lightbox-bg" style="" onClick="clickSkinVideoPopupBG();return false;"></div>';
pop_body +='<div class="mb-video-lightbox-container" style="visibility: hidden;">';
pop_body +='<div class="mb-video-lightbox-box" style="word-break:break-all;">';
pop_body +='<div class="mb-video-lightbox-layer-main">';
pop_body +='<div class="mb-video-lightbox-layer-main-body">';
pop_body +='<div class="mb-video-lightbox-layer-main-body-item" style="height:'+(win_height)+'px;overflow:hidden;vertical-align:top !important;" onClick="clickSkinVideoPopupBG();return false;">';
pop_body +='<div class="mb-skin-video-container" style="line-height:'+(win_height-10)+'px;"><iframe id="mc-popup-layer" class="mc-popup-layer" scrolling="no" width="'+(box_width)+'px" height="'+(box_height)+'px" src="'+url+'" frameborder="0" allowfullscreen="" mozallowfullscreen="" webkitallowfullscreen="" align="middle" allow="autoplay" style="width:'+(box_width)+'px;"></iframe></div>';
pop_body +='</div>';
pop_body +='</div>';
pop_body +='</div>';
pop_body +='<div class="mb-video-lightbox-close" style="" onClick="clickSkinVideoPopupBG();return false;"><img src="'+mb_urls["base"]+'skins/bbs_video_m3/images/icon_close_white1.png" style=""></div>';
pop_body +='</div></div>';
pop_body +='</div>';
showPopupBox("Html",'',pop_body);
mb_resizeSkinVideoItem();
setTimeout(function(){
jQuery(".mb-video-lightbox-bg").addClass('mb-show-video');
}, 10);
setTimeout(function(){
jQuery(".mb-video-lightbox-container").addClass('mb-show-video');
}, 900);
jQuery("#mb_pop_bg").attr('onclick', 'clickSkinVideoPopupBG();return false;');
}
function clickSkinVideoPopupBG(){
jQuery('.mb-video-lightbox-container').hide();
jQuery("#mb_pop_bg").hide();
jQuery(".mb-video-lightbox-bg").addClass('mb-hide-video');
setTimeout(function(){
hideSkinVideoPopup();
}, 400);
jQuery("#mb_pop_bg").attr('onclick', 'hidePopupAlert();return false;');
}
function hideSkinVideoPopup(){
hidePopupAlert();
jQuery("#mb_pop_html_body").html("");
}
function mb_resizeSkinVideoItem(){
jQuery(".mb-skin-video-container>iframe").each(function(){
if(jQuery(this).attr("width")=="100%"){
jQuery(this).css("height", Math.ceil(parseInt(jQuery(this).css("width")) * 0.625) + "px");
}else{
jQuery(this).css("height", Math.ceil(parseInt(jQuery(this).css("width")) * parseInt(jQuery(this).attr("height")) / parseInt(jQuery(this).attr("width"))) + "px");
}});
}
jQuery(document).ready(function(){
mb_resizeSkinVideoItem();
jQuery(window).resize(function(){
mb_resizeSkinVideoItem();
});
});