$(document).ready(function() {
$('.youtube,.la-close').on('click',function(){
var _this = $(this);
$('#yt_video').attr('src'," https://www.youtube.com/embed/CZUEkHZJkxs");
_this.hide();
$('.youtube').css('display','none');
_this.parent().find('.box-ratio').css('display','block');
return false;
});
$('#close_youtube').on('click',function(){
var _this = $(this);
$('#yt_video').attr('src'," https://www.youtube.com/embed/CZUEkHZJkxs").css('display','none');
_this.hide();
_this.parent().find('.box-ratio').css('display','block');
return false;
});
if ($(window).width() > 980) {
$('#yt_video').width($(window).width()*0.65);
var videoWidth = $(window).width()*0.65;
var videoHeight = parseInt(videoWidth)*540/962;
$('#yt_video').height(videoHeight);
} else {
$('#yt_video_mobile').width($(window).width());
var videoWidth = $(window).width();
var videoHeight = parseInt(videoWidth)*540/962;
$('#yt_video_mobile').height(videoHeight);
}
$(window).on('load resize orientationchange', function() {
if ($(window).width() > 980) {
$('#yt_video').width($(window).width()*0.65);
var videoWidth = $(window).width()*0.65;
var videoHeight = parseInt(videoWidth)*540/962;
$('#yt_video').height(videoHeight);
} else {
$('#yt_video_mobile').width($(window).width());
var videoWidth = $(window).width();
var videoHeight = parseInt(videoWidth)*540/962;
$('#yt_video_mobile').height(videoHeight);
}
});
});
$(document).ready(function() {
$('.youtube-mobile,.la-close').on('click',function(){
var _this = $(this);
$('#yt_video_mobile').attr('src'," https://www.youtube.com/embed/CZUEkHZJkxs");
_this.hide();
$('.youtube-mobile').css('display','none');
_this.parent().find('.box-ratio').css('display','block');
return false;
});
$('#close_youtube_mobile').on('click',function(){
var _this = $(this);
$('#yt_video_mobile').attr('src'," https://www.youtube.com/embed/CZUEkHZJkxs");
_this.hide();
_this.parent().find('.box-ratio').css('display','block');
return false;
});
});