<div class="section product view">
    <div class="product">
        <div class="item">
            <div class="details">
                <h2><?php echo htmlspecialchars($product['name']); ?></h2>
                <p class="price"><?php echo htmlspecialchars($product['price']); ?></p>
                <?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) : ?>
                    <h3>Features</h3>
                    <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>
            <div class="images">
                <div class="image">
                    <p>
                        <?php if ($image = product::get_image($product['id'])) : ?>
                            <a id="thumb1" href="<?php echo htmlspecialchars(product::get_image_url($product['id'], $image, 800, 800) . '?' . time()); ?>" class="highslide" onclick="return hs.expand(this)"><img src="<?php echo htmlspecialchars(product::get_image_url($product['id'], $image, 700, 700) . '?' . time()); ?>" alt="" title="Click to enlarge" /></a><br />
                        <?php endif; ?>
                    </p>
                </div>
                <div class="image_extra">
                    <p> 
                        <?php foreach (product::get_image_list($product['id']) as $image) : ?>
                            <a id="thumb_extra_<?php echo htmlspecialchars($product['id']); ?>" href="<?php echo htmlspecialchars(product::get_image_url($product['id'], $image, 600, 600) . '?' . time()); ?>" class="highslide" onclick="return hs.expand(this)"><img src="<?php echo htmlspecialchars(product::get_image_url($product['id'], $image, 88, 88) . '?' . time()); ?>" alt="" title="Click to enlarge" /></a>
                        <?php endforeach; ?>
                    </p>
                </div>
            </div>
            <?php if ($con = trim($product['content'])) : ?>
                <div class="desc html">
                    <?php echo $con; ?>
                </div>
            <?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>
