<?php
/**
 * @package XpertScroller
 * @version 2.5.5
 * @author ThemeXpert http://www.themexpert.com
 * @copyright Copyright (C) 2009 - 2011 ThemeXpert
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted accessd');
$index=0;
?>
<!--ThemeXpert: XpertScroller module version 2.0 Start here-->
<div class="<?php echo $moduleId;?> <?php echo $params->get('moduleclass_sfx');?> <?php echo $params->get('scroller_layout');?> clearfix">

    <?php if($params->get('navigator')):?>
    <!-- wrapper for navigator elements -->
    <div class="navi"></div>
    <?php endif;?>

    <?php if($params->get('control','1')):?>
        <a class="prev browse left"></a>
    <?php endif;?>

    <div id="<?php echo $moduleId;?>" class="scroller">


        <div class="items">
        <?php for($i = 0; $i<$totalPane; $i++){?>
            <div class="pane">
            <?php for($col=0; $col<(int)$params->get('col_amount'); $col++, $index++) {?>
                <?php if($index>=count($items)) break;?>
                <div class="item">
                    <div class="padding clearfix">
                        <?php echo ($params->get('item_image') == '1')? $items[$index]->image : '';?>

                        <?php if($params->get('article_title') === '1'):?>
                            <h4><?php echo $items[$index]->title;?></h4>
                        <?php endif;?>
                        
                        <?php if($params->get('intro_text') === '1'):?>
                            <div class="xs_intro"><?php echo $items[$index]->introtext;?></div>
                        <?php endif;?>

                        <?php if($params->get('readmore') === '1'):?>
                            <p class="xs_readmore">
                                <a class="btn" href="<?php echo $items[$index]->link;?>">
                                    <?php echo JText::_('Readmore');?>
                                </a>
                            </p>
                        <?php endif;?>
                    </div>
                </div>
                <?php if($col == (int)$params->get('col_amount') ){$col=0; break;} ?>
            <?php } ?>
            </div>
        <?php }?>
        </div>
    </div>
    <?php if($params->get('control','1')):?>
        <a class="next browse right"></a>
    <?php endif; ?>
</div>
<!--ThemeXpert: XpertScroller module version 2.0 End Here-->