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

<?php $__env->startSection('page_sub_title'); ?>    
    
    OSAA Radio Network powered by Pacific Office Automation    

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

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

<?php $__env->startSection('scripts'); ?>
    @parent

    <style type="text/css">
    	
        h3 {
    		color: #1C43A6 !important;
    	}    	    	   	

    	.page_functions {
    		width: auto !important;
    	}          

        .gradient {
            background: rgb(226,226,226); /* Old browsers */
            background: -moz-linear-gradient(top,  rgba(226,226,226,1) 0%, rgba(219,219,219,1) 50%, rgba(209,209,209,1) 51%, rgba(254,254,254,1) 100%); /* FF3.6+ */
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(226,226,226,1)), color-stop(50%,rgba(219,219,219,1)), color-stop(51%,rgba(209,209,209,1)), color-stop(100%,rgba(254,254,254,1))); /* Chrome,Safari4+ */
            background: -webkit-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* Chrome10+,Safari5.1+ */
            background: -o-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* Opera 11.10+ */
            background: -ms-linear-gradient(top,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* IE10+ */
            background: linear-gradient(to bottom,  rgba(226,226,226,1) 0%,rgba(219,219,219,1) 50%,rgba(209,209,209,1) 51%,rgba(254,254,254,1) 100%); /* W3C */
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#fefefe',GradientType=0 ); /* IE6-9 */

        }

    </style>

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

<?php $__env->startSection('jquery_init'); ?>		
	
    $('img[data-live="true"]')
        .hover(function() {
            var img = $(this);

            img.attr('data-original', img.attr('src'))
               .attr('src', '<?php echo asset('/images/icons/radio_icon_hover_52px.png'); ?>')
               .css({'cursor' : 'pointer'});
        },
        function ()
        {
            var img = $(this);

            img.attr('src', img.attr('data-original'));            
        });

    $('.main_content')
        .css({ 'background-image' : 'url(<?php echo url('/images/abstract-wallpapers-blue-abstract-backgrounds-wallpaper-37219.jpg'); ?>)'});
        
    
    
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>  	

     <img src="<?php echo asset('/images/ads/sponsors/POA_111x50px.png'); ?>" alt="" title="" style="position: relative; top: -10px;" />
    
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    		

    <?php /*  Errors  */ ?>
     <?php if (Session::has('errors')): ?>                
        <div class="error ui-state-error" style="font-weight: bold; padding: 1em;">
            <span class="ui-icon ui-icon-alert box_icon"></span>
            <?php foreach ($errors->all() as $error): ?>
                <?php echo $error; ?>
            <?php endforeach; ?>
        </div>
    <?php endif; ?>   

    <br />

    <?php if (count($info['schedules']) < 1): ?>

        <h1>Schedule Coming Soon</h1>

        <h2>There are currently no upcoming broadcasts scheduled on the OSAA Radio Network powered by Pacific Office Automation.</h2>

    <?php else: ?>

        
        <?php foreach ($info['schedules'] as $schedule): ?>

            <div style="clear: both;">                
                
                <?php
                    if ($schedule->is_live)
                    {
                        $image = '/images/icons/radio_icon_live_52px.png';
                    }
                    else
                    {
                        $image = '/images/icons/radio_icon_inactive_52px.png';   
                    }

                ?>

                <?php if ($schedule->is_live): ?>
                    <a href="<?php echo $schedule->link; ?>" target="_blank">
                <?php endif; ?>
                
                <img src="<?php echo asset($image); ?>" alt="" title="" style="float: left; margin: 5px 10px 20px 5px;" data-live="<?php echo ($schedule->is_live) ? 'true' : 'false'; ?>" />
                
                <?php if ($schedule->is_live): ?>
                    </a>
                <?php endif; ?>

                <div class="gradient" style="float: right; width: 150px; text-align: center; padding: 0.5em 0 0.5em 0; color: #990000; font-weight: bold;">
                    <?php echo Helpers::formatDateTime('%RADIO_NETWORK_TIMESTAMP%',
                                               strtotime($schedule->contest->event->start_at),
                                               $schedule->contest->event->time_zone); ?>
                </div>

                <div style="float: left; font-weight: bold; padding-top: 0.5em; width: 800px; border-top: 1px solid #dedede;">
                    <?php echo $schedule->title; ?>
                </div>

                <div style="font-size: 10pt; font-style: italic;">                    
                    <?php if ($schedule->is_live): ?>
                        <img src="<?php echo asset('/images/icons/on_air_tiny.png'); ?>" alt="" title="" style="" />
                    <?php endif; ?>
                    Live from <?php echo $schedule->location_name; ?> on <?php echo $schedule->network->name; ?>
                    <div style="float: right; margin-right: 5px;"><a href="<?php echo $schedule->link; ?>" target="_blank"><?php echo $schedule->link; ?></a></div>
                </div>

            </div>

            

        <?php endforeach; ?>
        

    <?php endif; ?>

    <br class="clear" />

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