Compete in our bracket challenge for a chance to win $1,000,000
'
);
return;
}
var iframe = $('
', {
src: url,
id: 'CMLS_MDBC',
width: '100%',
height: '800px'
});
// Scroll parent back to top when iframe reloads
function handleScroll() {
iframe.off('load', handleScroll);
iframe.on('load', function() {
var scrollTop = $(window.self).scrollTop(),
offsetTop = iframe.offset().top;
if (scrollTop > offsetTop) {
$(window.self).scrollTop(offsetTop - 5);
}
});
}
iframe.on('load', handleScroll).on('load', function() {
setupIframeResizer(1);
});
$('#CMLS_CONTEST').after(iframe);
};
// Hide local sponsor if it's empty
$('.CMLS_CCC .local-prize .module-title, .local-sponsor .module-title').remove();
$(function(){
if ($('.CMLS_CCC .local-prize').text().replace('CMLOCAL PRIZE','').trim().length > 2) {
$('.local-prize').show();
}
if ($('.CMLS_CCC .local-sponsor').text().replace('CMLOCAL SPONSOR','').trim().length > 2) {
$('.CMLS_CCC .local-sponsor').show();
}
});
// Add padding to entry content if it has content
$('.CMLS_CCC .entry-content > *:not(script):not(.themify_builder_content):not(.themify_builder_turn_on):not(.hideme)').parent().addClass('has-content');
}(jQuery, window.self));