<?php $__env->startSection('page_title'); ?>
    OSAA - Home
<?php $__env->stopSection(); ?>

<?php $__env->startSection('live_alert'); ?>
<?php
   GeneralController::getLiveAlert();   
?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('tool_box'); ?>
    <?php /* 
    <div id="tool_box">
        <img src="images/icons/blue_flag_32px.png" alt="" title="" width="32" height="32" />
        <a href="#" class="">Go to my<br />schools</a> 
        <a href="#" class="">View/edit<br />my profile</a>
    </div>
     */ ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('osaa_headlines'); ?>
    <div id="osaa_headlines">
    
        <h1>OSAA Headlines</h1>
        
        <div class="stories">
            <?php echo $__env->make('home.stories', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
    </div>    
<?php $__env->stopSection(); ?>     

<?php $__env->startSection('osaa_highlights'); ?>
    <?php echo $__env->make ('/home/highlights', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>    
<?php $__env->stopSection(); ?>

<?php $__env->startSection('seasonal_activities'); ?>
    <?php
        $season_id = Helpers::getCurrentSeason();

        switch($season_id)
        {
            case 'F': $season_name = 'Fall'; break;
            case 'W': $season_name = 'Winter'; break;
            case 'S': $season_name = 'Spring'; break;
            default: $season_name = 'Fall';
        }        

    ?>

    <div id="season_activities" class="<?php echo strtolower($season_name); ?>">                                               
        <?php if ($season_id == 'F'): ?>
            <!-- Fall -->
            <?php echo link_to('activities/fbl', 'Football'); ?> |
            <?php echo link_to('activities/vbl', 'Volleyball'); ?> |
            <?php echo link_to('activities/bsc', 'Boys Soccer'); ?> |
            <?php echo link_to('activities/gsc', 'Girls Soccer'); ?> | 
            <?php echo link_to('activities/bxc', 'Boys Cross Country'); ?> | 
            <?php echo link_to('activities/gxc', 'Girls Cross Country'); ?>
        <?php elseif ($season_id == 'W'): ?>
            <!-- Winter -->
            <b>Winter:</b> 
            <?php echo link_to('activities/bbx', 'Boys Basketball'); ?> |
            <?php echo link_to('activities/gbx', 'Girls Basketball'); ?> |
			<?php echo link_to('activities/bsw', 'Boys Swimming'); ?> |
            <?php echo link_to('activities/gsw', 'Girls Swimming'); ?> |
            <?php echo link_to('activities/wre', 'Wrestling'); ?> |
            <?php echo link_to('activities/dnc', 'Dance/Drill'); ?> |
            <?php echo link_to('activities/che', 'Cheerleading'); ?>
        <?php elseif ($season_id == 'S'): ?>
            <!-- Spring -->
            <?php /* <b>Baseball: </b> */ ?>
            <?php /* link_to('activities/bbl/teams-leagues', 'Leagues') */ ?> 
            <?php /* link_to('activities/bbl/schedules', 'Schedules &amp; Scores') */ ?>
            <?php /* link_to('activities/bbl/rankings', 'Rankings') */ ?> 
			<?php /* <b>Softball: </b> */ ?>
            <?php /* link_to('activities/sbl/teams-leagues', 'Leagues') */ ?> 
            <?php /* link_to('activities/sbl/schedules', 'Schedules &amp; Scores') */ ?>
            <?php /* link_to('activities/sbl/rankings', 'Rankings') */ ?>
            <?php echo link_to('activities/btf', 'Boys T&amp;F'); ?> | 
            <?php echo link_to('activities/gtf', 'Girls T&amp;F'); ?> | 
            <?php echo link_to('activities/btn', 'Boys Tennis'); ?> | 
            <?php echo link_to('activities/gtn', 'Girls Tennis'); ?> | 
            <?php echo link_to('activities/bgf', 'Boys Golf'); ?> | 
            <?php echo link_to('activities/ggf', 'Girls Golf'); ?> | 
            <?php echo link_to('activities/bnd', 'Band/Orchestra'); ?> | 
            <?php echo link_to('activities/cho', 'Choir'); ?> | 
            <?php echo link_to('activities/sol', 'Solo Music'); ?> |
            <?php echo link_to('activities/spe', 'Speech'); ?> 
        <?php else: ?>

        <?php endif; ?>        

    </div> 
<?php $__env->stopSection(); ?>  

<?php $__env->startSection('score_buzz'); ?>
    <div id="score_buzz">
        <?php echo $__env->make('home.side_section', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    </div>        
<?php $__env->stopSection(); ?>     

<?php $__env->startSection('rss_feed'); ?>
    <div id="rss_feed">
        <h1>In the News</h1>
        <div id="rss_stories">
            
            <div style="width:16px; height:11px; margin:0 auto; margin-top: 3em; background-image: url('http://www.osaa.org/images/icons/ajax_loader2.gif'); background-repeat:no-repeat;"></div>

            <div style="text-align: center; font-size: 8pt; margin: 1em 0 0 0;">Loading ...</div>
            
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('twitter_feed'); ?>
    <div id="twitter_feed">

        <!-- Follow Button -->
        <h2><a href="https://twitter.com/OSAASports" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @OSAASports</a></h2>

        <h1>Twitter Feed</h1>                   
                                               
        <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/search?q=%23opreps+OR+%23oprep+OR+%23osaasports+OR+from%3AOSAASports+OR+from%3Ahssports_olive+geocode%3A44.29253%2C-120.83449%2C250mi"
        data-widget-id="350308894033203200" data-chrome="noheader nofooter transparent" data-border-color="#990000" data-link-color="#005fa9" >
            <div style="width:16px; height:11px; margin:0 auto; margin-top: 3em; background-image: url('http://www.osaa.org/images/icons/ajax_loader2.gif'); background-repeat:no-repeat;"></div>

            <div style="text-align: center; font-size: 8pt; margin: 1em 0 0 0;">Loading ...</div>
        </a>
    </div>    
    
    <!-- End Twitter Feed -->
<?php $__env->stopSection(); ?>                              


<?php $__env->startSection('scripts'); ?>
    @parent
    
    <script src="<?php echo asset('scripts/jquery.cycle.lite.js'); ?>" type="text/javascript"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>   
    
    var jqxhr = $.ajax(
                  {
                      type : 'GET',
                      url : '/news/top-stories',                      
                      dataType : 'html'
                  })
                  .done(function (data)
                  {                                                          
                      $('#rss_stories').html(data);

                      $('#rss_stories .item').hover(
                                                function ()
                                                {
                                                    $(this).addClass('hover');
                                                },
                                                function()
                                                {
                                                    $(this).removeClass('hover');
                                                })
                                             .click(function ()
                                                {
                                                    window.open($(this).attr('data-href'));
                                                });  
                  })
                  .fail(function ()
                  {
                      $('#rss_stories').html('There was an error loading the news stories.');
                  }); 

    
    $('.slide_presentation').cycle({pause : true,
                                    timeout : 4500,
                                    speed : 2000});

    $('.button').button();
<?php $__env->stopSection(); ?>

