<?php if ($this->canShowBlock()): ?>
    <div class="block block-layered-nav">
        <div class="block-title">
            <strong><span><?php echo $this->__('Shop By') ?></span></strong>
        </div>
        <div class="block-content">
            <?php echo $this->getStateHtml() ?>
            <?php if ($this->canShowOptions()): ?>
                <p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
                <dl id="narrow-by-list">
                    <?php $_filters = $this->getFilters() ?>
                    <?php foreach ($_filters as $_filter): ?>
                        <?php if ($_filter->getItemsCount()): ?>
                            <dt><a href="/"><?php echo $this->__($_filter->getName()) ?></a></dt>
                            <dd>
                                <ol>
                                    <?php foreach ($_filter->getItems() as $_item): ?>
                                        <li>
                                            <?php if ($_item->getCount() > 0): ?>
                                                <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a>
                                            <?php else: echo $_item->getLabel() ?>
                                            <?php endif; ?>
                                            (<?php echo $_item->getCount() ?>)
                                        </li>
                                    <?php endforeach ?>
                                </ol>
                            </dd>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </dl>
                <script type="text/javascript">decorateDataList('narrow-by-list')</script>
				<script type="text/javascript">
                /* <![CDATA[ */
                jQuery(document).ready(function(){
                jQuery("dl#narrow-by-list> dd:not(:first)").hide();
                jQuery("dl#narrow-by-list> dt a").click(function(){
                jQuery("dl#narrow-by-list> dd:visible").slideUp("fast");
                jQuery(this).parent().next().slideDown("fast");
                return false;
                });
                });
                /* ]]> */
                </script>
            <?php endif; ?>
        </div>
    </div>
<?php endif; ?>