/*
Brickworks Menu Collapser
show hide menu system for wordpress multilevel menus
*/
jQuery("li.page_item a,li.cat-item a").each(function(){
	if(jQuery(this).next('ul').length){
		jQuery(this).after('&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="toggle_list">+</a>');
	}
});
//jQuery("li.page_item > ul,li.cat-item > ul").hide();
jQuery("a.toggle_list").click(function(){
	if(jQuery(this).next('ul:visible').length){
		jQuery(this).html('+').next('ul').hide('fast');
	}else{
		jQuery(this).html('&ndash;').next('ul').show('fast');
	}
	return false;
});
var h = window.location.href;
jQuery('li.page_item a[href='+h+']').nextAll('ul').show();
h=h.substr(0,h.lastIndexOf('/'));
jQuery('li.page_item a[href='+h+']').nextAll('ul').show();
jQuery('li.page_item a[href='+h+']').next('a').html('&ndash;');


jQuery('.rcnt-psts-cat-toggle').toggle(
	function(){
		jQuery(this).html('&ndash;').parent().nextAll().show('fast');
	},
	function(){
		jQuery(this).html('+').parent().nextAll().hide('fast');
	}
);
