var heightElem = $('elem').height();
var windowHeight = $(window).height();
function checkSize() {
if (heightElem > windowHeight ) {
$('elem').addClass('big');
} else {
$('elem').removeClass('big');
}
}
$(window).load(checkSize);
$(window).resize(checkSize);