$(document).ready(function() {

// hide all children lists
var $masterUL = jQuery('ul#archive');
$masterUL.find('li>ul').hide();

// find all parent li's with anchors
$masterUL.children().find('>a').click(function(e){
	// find the coresponding sublist
	var $childUL = $(this).parent().find('ul');
	// if already visible or doesn't exist activate link
	if($childUL.is(':visible')){
		// hide it
		$childUL.animate({ height: "hide" },200);
		$(this).removeClass('active');
	}else{
		// show it
		$childUL.animate({ height: "show" },200);
		$(this).addClass('active');
	}
	e.preventDefault();
});
						   
});