function setCarouselSize() {
    var wWidth = $(window).width();
    var wHeight = $(window).height();
    
    if (wHeight > wWidth) {
        var containerHeight = wHeight * $('.img-cartoon').width() / wWidth;   
    } else {
        $('#carousel-example-generic').height($(window).height()-$('#panel-title').height());
    }
}

$(function() {
    setCarouselSize();
});

$(window).resize(function(){
    setCarouselSize();
});
function setCarouselSize() {
    var wWidth = $(window).width();
    var wHeight = $(window).height();
    
    var originalImageHeight = 1080;
    var originalImageWidth = 1920;
    
    if (wHeight > wWidth) {        
        var containerHeight = originalImageHeight * wWidth / originalImageWidth;   
        $('#carousel-example-generic').height(containerHeight);
    } else {
        $('#carousel-example-generic').height($(window).height()-$('#panel-title').height());
    }
}

$(function() {
    setCarouselSize();
});

$(window).resize(function(){
    setCarouselSize();
});
Add logic to handle vertical screens
Add logic to handle vertical screens
