<ul>
    <li class="title">
        <img src="<?php echo htmlspecialchars(($current['image']) ? category::DIRECTORY . $current['image'] . '-m.jpg' : 'admin/skin/icon/folder1.png'); ?>?<?php echo time(); ?>" /><br />
        <?php echo ($current['name']) ? htmlspecialchars($current['name']) : 'Top'; ?>
    </li>
    <?php if ($current['parent_id']) : ?>
        <li id="category_meta" class="category_meta"><a href="meta/edit/category/<?php echo htmlspecialchars($current['id']); ?>">Meta</a></li>
    <?php else : ?>
        <li id="category_meta" class="category_meta"><a href="meta/edit/category/1">Meta</a></li>
    <?php endif; ?>
    <li id="category_add_open" class="category_add"><a href="javascript:">Add sub-category</a></li>
    <?php if ($current['parent_id']) : ?>
        <li class="product_add"><a href="product/add/<?php echo htmlspecialchars($current['id']); ?>">Add product</a></li>
    <?php endif; ?>
</ul>

<script type="text/javascript">
    $(document).ready(function() {
        $('#category_add_open a').click(function() {
            $('#category_add_form').toggle();
        });
    });
</script>