<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>
    <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>