<div class="prod">
    <div class="item">
        <div class="detail">
            <p class="name"><?php echo htmlspecialchars($product['name']); ?></p>
            <?php if (!$product['image']) : ?>
                <p class="price"><?php echo htmlspecialchars($product['price']); ?></p>
            <?php endif; ?>
            <?php if ($product['part']) : ?>
                <p class="part">Part Number: <?php echo htmlspecialchars($product['part']); ?></p>
            <?php endif; ?>
            <?php $feature = explode("\n", trim($product['feature'])); ?>
            <?php if ($feature) : ?>
                <ul class="feature">
                    <?php foreach ($feature as $f) : ?>
                        <?php if ($f = trim($f)) : ?>
                            <li><?php echo htmlspecialchars($f); ?></li>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </ul>
            <?php endif; ?>
            <div class="image">
                <p>
                    <?php if ($product['image']) : ?>
                        <a id="thumb1" href="<?php echo htmlspecialchars(product::DIRECTORY . $product['image'] . '.jpg' . '?' . time()); ?>" class="highslide" onclick="return hs.expand(this)"><img src="<?php echo htmlspecialchars(product::DIRECTORY . $product['image'] . '-m.jpg' . '?' . time()); ?>" alt="" title="Click to enlarge" /></a><br />
                        <span><?php echo htmlspecialchars($product['price']); ?></span>
                    <?php endif; ?>
                </p>
            </div>
            <div class="image_extra">
                <p>
                    <?php foreach (product::get_image_extra($product['id']) as $i) : ?>
                        <a id="thumb_extra_<?php echo htmlspecialchars($i['id']); ?>" href="<?php echo htmlspecialchars(product::DIRECTORY . $i['image'] . '.jpg' . '?' . time()); ?>" class="highslide" onclick="return hs.expand(this)"><img src="<?php echo htmlspecialchars(product::DIRECTORY . $i['image'] . '-s.jpg' . '?' . time()); ?>" alt="" title="Click to enlarge" /></a>
                    <?php endforeach; ?>
                </p>
            </div>
            <?php if ($con = trim($product['content'])) : ?>
                <p class="desc html"><?php echo $con; ?></p>
            <?php endif; ?>
        </div>
    </div>
</div>
<script type="text/javascript" src="web/product/widget/highslide/highslide.js"></script>
<script type="text/javascript">
    hs.graphicsDir = 'web/product/widget/highslide/graphics/';
    hs.outlineType = null;
    hs.wrapperClassName = 'colored-border';
</script>

<script type="text/javascript">
    $(document).ready(function(){
        var current = $('#navigation').find("a").filter(function() { return this.href.toLowerCase() == '<?php echo htmlspecialchars($request->base()); ?>product/index/<?php echo htmlspecialchars(rtrim($path, '/')); ?>'; });
        
        if ( current.length ) {
            current.addClass("selected").parents("ul, li").add( current.next() ).show();
        }
    });
</script>