<?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" style="outline-left: 1px solid red;">
    
        <a href="<?php echo url('/today'); ?>"><img src="<?php echo asset('/images/logos/OSAAtoday-Tagline.png'); ?>" data-hover-src="<?php echo asset('/images/logos/OSAAtoday-Tagline-Hover.png'); ?>" data-original-src="<?php echo asset('/images/logos/OSAAtoday-Tagline.png'); ?>" alt="" title="" style="width: 100%;" /></a>
        
        <div class="stories" style="width: 100%; height: 375px; overflow: hidden; overflow-y: scroll;">
            <?php
                $max_list = 15;
                $count = 0;
            ?>

            <?php foreach ($info['news_articles'] as $article): ?>
                <?php
                    if (!Helpers::strEqual($article->type, 'OSAAtoday'))
                    {
                        continue;
                    }
                    $count++;
                    if ($count > $max_list)
                    {
                        break;
                    }
                ?>                
                <h3><?php echo $article->date; ?></h3>
                <h2><a href="<?php echo $article->link; ?>" target="_blank"><?php echo $article->title; ?></a></h2>
                <p>
                    <?php echo $article->line; ?>
                    <?php if (!Helpers::strIsEmpty($article->author)): ?>                    
                        |
                        <?php if (!is_null($article->author_link)): ?>
                            <a href="<?php echo $article->author_link; ?>"><?php echo $article->author; ?></a>
                        <?php else: ?>
                            <?php echo $article->author; ?>
                        <?php endif; ?>
                    <?php endif; ?>
                </p>                
            <?php endforeach; ?> 

            <?php if (Helpers::isGibby()): ?>

                <div style="text-align: center;">
                    <p><a href="<?php echo url('/today'); ?>">More Stories</a></p>                    
                </div>

            <?php endif; ?>
            
        </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="twitter_feed">

        <?php /*  New widget  <a class="twitter-timeline" href="https://twitter.com/OSAASports?ref_src=twsrc%5Etfw">Tweets by OSAASports</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>  */ ?>

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

        <?php /*  <h1>Twitter Feed</h1>                     */ ?>            


        <a class="twitter-timeline" data-width="410" data-height="400" data-dnt="true" href="https://twitter.com/OSAASports?ref_src=twsrc%5Etfw" data-chrome="nofooter transparent">Tweets by OSAASports</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>


        <?php /*  <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>  


    <?php /*  <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 style="width: 300px; height: 260px; margin: 5px 0 0 5px; float: left; line-height: 110%;">
        <h1 style="font-weight: bold; color: #990000; font-size: 12pt;">Around the State</h1>
        <div class="stories" style="width: 100%; height: 242px; overflow: hidden; overflow-y: scroll; padding-right: 3px;">            
             <?php foreach ($info['news_articles'] as $article): ?>
                <?php
                    if (!Helpers::strEqual($article->type, 'RSS'))
                    {
                        continue;
                    }                    
                ?>                
                <h3 style="font-weight: normal; color: #7d7b7d; font-size: 9pt; float: right;"><?php echo $article->date; ?></h3>
                <h2 style="font-weight: bold; color: #1c43a6; font-size: 10pt; margin-top: 3px;"><a href="<?php echo $article->link; ?>" target="_blank"><?php echo $article->title; ?></a></h2>
                <p style="margin-bottom: 12px; line-height: 110%; font-size: 9pt;">
                    <?php echo $article->line; ?><?php if (!Helpers::strIsEmpty($article->author)): ?> | <?php echo $article->author; ?><?php endif; ?>
                </p>                
            <?php endforeach; ?>
        </div>
    </div>

    <?php /*  <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>

    <script src="http://jwpsrv.com/library/d3LbCBzkEeSiiSIACtqXBA.js"></script>    

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

<?php $__env->startSection('jquery_init'); ?>   
    
    $('.nfhs_video').click(function(event)
    {
        event.preventDefault();

        $('<div><div>')
            .addClass('ui-widget-overlay ui-front video_overlay')
            .appendTo('body');
          
        $('<div id="video_player"><div>').appendTo('body')
            .css({'width' : '856px',
                  'height' : '482px',
                  'text-align' : 'center',
                  'padding' : '0.25em',
                  'position' : 'relative'})
            .position({my : "center center", at : "center center", of : window})
            .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-di buttons video_overlay')
            .html('<a href="#" style="position: absolute; right: -16px; top: -16px; background: none;" class="close_video_player"><img src="<?php echo asset('/images/icons/close_icon_2_32px.png'); ?>" alt="" title="" style="" /></a><iframe width="854" height="480" src="https://www.youtube.com/embed/G8BHE5EmrIU?autoplay=1" frameborder="0" allowfullscreen></iframe>');

        $('.close_video_player').click(function(event)
        {
            event.preventDefault();

            $('.video_overlay').remove();
        });
    });


    $('.heads_up_video').click(function(event)
    {
        event.preventDefault();

        $('<div><div>')
            .addClass('ui-widget-overlay ui-front video_overlay')
            .appendTo('body');
          
        $('<div id="video_player"><div>').appendTo('body')
            .css({'width' : '642px',
                  'height' : '482px',
                  'text-align' : 'center',
                  'padding' : '0.25em',
                  'position' : 'relative'})
            .position({my : "center center", at : "center center", of : window})
            .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-di buttons video_overlay')
            .html('<a href="#" style="position: absolute; right: -16px; top: -16px; background: none;" class="close_video_player"><img src="<?php echo asset('/images/icons/close_icon_32px.png'); ?>" alt="" title="" style="" /></a><iframe width="640" height="480" src="https://www.youtube.com/embed/zFnr916Usus?autoplay=1" frameborder="0" allowfullscreen></iframe>');

        $('.close_video_player').click(function(event)
        {
            event.preventDefault();

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

    $('.button').button();



    /* NEW ADJUSTMENTS */
    $('#twitter_feed').css({'width' : '410px'});
    $('.timeline-Viewport').css({'height' : '377px !important'});
    $('.divider').remove();
    $('#osaa_headlines').css({'height' : '450px', 'border-bottom' : '2px solid #cccccc'});    

    $('a img[data-hover-src]').hover(function()
    {
        $(this).attr('src', $(this).attr('data-hover-src'));
    },
    function()
    {
        $(this).attr('src', $(this).attr('data-original-src'));
    });

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

