/**
* Bromine scripts
* @since 1.0.0
*/
/* --------------------------------------
=Better count for categories
---------------------------------------- */
(function($) {
$('.widget_categories li.cat-item').each(function() {
var $contents = $(this).contents();
if ($contents.length > 1) {
$contents.eq(1).wrap('
');
$contents.eq(1).each(function() {});
}
}).contents();
$('.widget_categories li.cat-item .cat-num .inner-num').each(function() {
$(this).html($(this).text().substring(2));
$(this).html($(this).text().replace(/\)/gi, ""));
});
if ($('.widget_categories li.cat-item').length) {
$('.widget_categories li.cat-item .cat-num .inner-num').each(function() {
if ($(this).is(':empty')) {
$(this).parent().hide();
}
});
}
})(jQuery);
/* -------------------------------------------
=Equalize the sidebar and the content sizes
-------------------------------------------- */
jQuery(document).ready(function($) {
function bro_equalize() {
$('.bro-sidebar').css( 'min-height', $('.bro-content').height() );
}
// Init the function
bro_equalize();
// Equalize the sidebar each time the content is resized.
$( '.bro-content' ).resize( function() {
bro_equalize();
});
});