/**
* Bromine scripts
* @since 0.0.1
*/
(function($) {
brocustom = {
/* --------------------------------------
=Better count for categories
---------------------------------------- */
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();
}
});
}
},
/* -------------------------------------------
=Equalize the sidebar and the content sizes
---------------------------------------------- */
equalize: function() {
$( '.bro-sidebar' ).css( 'min-height', $( '.bro-content' ).height() );
}
}
})(jQuery);
// Init all this crappy stuff
jQuery(document).ready(function($) {
brocustom.categories();
brocustom.equalize();
// Equalize the sidebar each time the content is resized.
$( 'bro-content' ).resize( function() {
bro_equal_sizes();
});
});