<?php
$this->addJs('jcycle.plugin.js');
$this->addJs('jcycle.js');
if (!$loggedInUser) $this->addSidebarBlock('home_login.phtml');
?>

<?php if ($logout): ?>
    <div class="message success"><?=Language::getText('success_logout')?></div>
<?php endif; ?>

<h1><?=Language::getText('home_header')?></h1>

<!-- BEGIN SLIDESHOW -->
<div id="slideshow">
    
    <!--
    Slides 1-3 are for demonstration purposes only. They are merely for
    displaying your ability to add custom slides. You may remove them as you
    wish.
    -->
          
    <!-- BEGIN SLIDE 1 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide1.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips - Free Video CMS. Start your own video sharing website with CumulusClips video sharing script. You can build a YouTube clone where users can upload videos, rate videos, comment on videos, and much more.</p>
                <a class="button" href="http://cumulusclips.org/">Learn More</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 1 -->
          
    <!-- BEGIN SLIDE 2 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide2.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips Documentation - Guides on managing, modifying, and general information regarding the CumulusClips Video CMS.</p>
                <a class="button" href="http://cumulusclips.org/docs/">Documentation</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 2 -->
          
    <!-- BEGIN SLIDE 3 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide3.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips Support Forums - Ask questions, share ideas and solutions, and get connected with the CumulusClips community.</p>
                <a class="button" href="http://cumulusclips.org/forums/">Visit Forums</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 3 -->
    
    <!-- BEGIN FEATURED VIDEO SLIDES -->
    <?php foreach ($featured_videos as $featuredVideo): ?>
        <div>
            <img width="600" height="287" src="<?=$config->thumbUrl?>/<?=$featuredVideo->filename?>.jpg" />
            <div class="slide-text">
                <div>
                    <p class="large"><u><?=Language::getText('featured')?>:</u> <?=$featuredVideo->title?></p>
                    <p><?=Functions::cutOff($featuredVideo->description, 80)?></p>
                    <a class="button" href="<?=$this->getService('Video')->getUrl($featuredVideo)?>/">Watch Now</a>
                    
                </div>
            </div>
        </div>
    <?php endforeach; ?>
    <!-- END FEATURED VIDEO SLIDES -->
   
</div>
<!-- END SLIDESHOW -->
                    
<!-- SLIDESHOW SLIDE LINKS -->
<div id="slideshow_nav"></div>
                
<!-- BEGIN RECENT VIDEOS -->
<div class="recent_videos">

    <h1><?=Language::getText('recent_videos')?></h1>

    <div class="videos_list">
        <?php if (!empty ($recent_videos)): ?>
            <?php $this->repeatingBlock('video.phtml', $recent_videos); ?>
        <?php else: ?>
            <div class="block"><strong><?=Language::getText('no_videos')?></strong></div>
        <?php endif; ?>
    </div>

</div>
<!-- END RECENT VIDEOS --> 