You could use .stopPropagation()
on the folded out menu to prevent it from toggle on click.
$(function () {
$('.headlink').click(function () {
$('ul', this).slideToggle();
});
$('.headlink ul').click(function(e) {
e.stopPropagation();
});
});