Cholesterol: Ayurvedic Self Care | Maharishi Ayurveda
}); $(window).resize(function() { navHeight = $('.navbar').height(); breadcrumbHeight = $('#breadcrumb').height() + 20; contentHeight = $('.main-content').height(); if ($(window).width() >= 975) { windowHeight = $(window).height(); $('.right-panel').css({'height': windowHeight - navHeight - breadcrumbHeight - 30, 'position': 'absolute'}); $('.top-menu').css('display', 'block'); $('.bottom-menu').css('display', 'none'); } else { $('.right-panel').css({'height': 'auto', 'position': 'relative'}); $('.top-menu').css('display', 'none'); $('.bottom-menu').css('display', 'block'); } }); $(window).scroll(function() { if ($(window).width() >= 975) { var scrollTop = $(window).scrollTop(); if (scrollTop < contentHeight - windowHeight + navHeight + breadcrumbHeight) { $('.right-panel').css('top', navHeight + breadcrumbHeight + scrollTop); } else if (contentHeight < windowHeight) { $('.right-panel').css('top', navHeight + breadcrumbHeight); } } else { $('.right-panel').css('top', 0); } }); $(window).resize(); $(window).scroll();