jQuery(window).load(function() {
	jQuery('.banner').each(function() {
		var idFragments = jQuery(this).attr('id').split('-');
		idFragments.shift();
		var commonId = idFragments.join('-');

		var empty = true;
		jQuery(this).find('*').each(function() {
			if (!(this.tagName.toLowerCase() == 'script' || this.tagName.toLowerCase() == 'noscript')) {
				empty = false;
			} else {
				jQuery(this).remove();
			}
		});

		if (!empty) {
			jQuery(this).appendTo(jQuery('#bannercontainer_' + commonId));
		}
	});
});
