(function () {
/*
To make this work on the homepage only,
set this variable to true. Then uncomment
the .homepage selector in the CSS below.
*/
var homepageOnly = true;
if (homepageOnly === true && !Y.one('body.homepage')) {
return;
} else {
var elem = Y.one('.banner-thumbnail-wrapper');
var windowHeight = window.innerHeight;
if (elem && elem.getComputedStyle('display') != 'none') {
var content = Y.one('.desc-wrapper') || Y.one('.blog-item-wrapper');
var padding = (windowHeight - content.get('clientHeight')) / 2;
elem.setStyles({
'paddingTop' : padding,
'paddingBottom' : padding
});
} else {
var wrapper = Y.one('#promotedGalleryWrapper .sqs-gallery-container');
var gallery = Y.one('.sqs-featured-posts-gallery') || Y.one('#promotedGalleryWrapper .sqs-gallery');
if (gallery) {
gallery.setAttribute('style', 'height:' + windowHeight + 'px !important');
}
if (wrapper) {
wrapper.setAttribute('style', 'height:' + windowHeight + 'px !important');
}
}
}
})();