<!DOCTYPE html>
<html lang="en">

    <!-- HTML Head -->
    <head>

        <!-- Page Title -->
        <title>
            <?php echo $__env->yieldContent('page_title'); ?>
        </title>
        
        <!-- Meta Tage -->          
        <?php $__env->startSection('meta_tags'); ?>
            <meta charset="utf-8" />
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <meta name="description" content="Oregon School Activities Association">
            <meta name="viewport" content="width=device-width">
        <?php echo $__env->yieldSection(); ?>

        <?php echo $__env->make ('layouts.jquery_theme', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>        

        <!-- Stylesheets -->
        <link rel="stylesheet" type="text/css" href="<?php echo asset('css/default.css'); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo asset('css/fix_nav.css'); ?>">                 

        <!-- JQuery -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>       
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>        

        <!-- JavaScripts -->
        <?php $__env->startSection('scripts'); ?>
            
        <?php echo $__env->yieldSection(); ?>

        <!-- JQuery Page Initialization -->
        <script type="text/javascript">         
            $(document).ready(function()
            {
                $('.button').button();
                $('.button.home').button({ icons : { primary : 'ui-icon-home'}});
                $('.button.account').button({ icons : { primary : 'ui-icon-gear'}});
                $('.button.help').button({ icons : { primary : 'ui-icon-help'}, text : false});
                $('.button.close').button({ icons : { primary : 'ui-icon-closethick'}, text : false});
                $('.button.save').button({ icons : { primary : 'ui-icon-disk'}});
                $('.button.check').button({ icons : { primary : 'ui-icon-check'}});

                $('a.no_text').css('height', '24px').css('margin-left', '5px');

                $('.tabs').tabs();

                $('.tooltip').tooltip();

                $('.submit_form').click(function ()
                {
                    id = $(this).attr('data-form-id');                    
                    var form = $('#' + id);                                        
                    form.submit();
                }); 

                <?php echo $__env->yieldContent('jquery_init'); ?>                                      
                
            });
                
                
        </script>          

        <?php if (Session::get('year') != Helpers::getCurrentYear()): ?>
            <script type="text/javascript">

                $().ready(function ()
                {
                    var year = <?php echo Session::get('year'); ?>;
                    var current = <?php echo Helpers::getCurrentYear(); ?>;

                    $('<div id="other_year_alert_text"></div>')
                        .appendTo('body')
                        .html('Viewing ' + year + '-' + (year + 1) + ' School Year<br /><a href="http://www.osaa.org?year=' + (current) + '"><u>&raquo;Switch to ' + current + '-' + (current + 1) + '</u></a>')
                        .addClass('ui-corner-left ui-state-active')
                        .css({
                            'position' : 'fixed',                        
                            'top' : '38px',
                            'right' : '-1px',
                            'padding' : '0.5em 2em 0.5em 1em',
                            'z-index' : '5000',
                            'width' : '100%'
                        });

                    $('<div id="other_year_alert_bar"></div>')
                        .appendTo('body')                    
                        .addClass('ui-corner-left ui-state-highlight')
                        .css({
                            'position' : 'fixed',                        
                            'top' : '0',
                            'right' : '-1px',
                            'width' : '100%',
                            'height' : '100%',
                            'z-index' : '4999',
                            'opacity' : '0'
                        });

                    $('#other_year_alert_text').animate({'width' : '264'}, 3600, 'easeOutQuad');
                    $('#other_year_alert_bar').animate({'width' : '10', 'opacity' : '1.0'}, 3600, 'easeOutQuad');
                });

            </script>
        <?php endif; ?>

        <script src="<?php echo asset('scripts/analyticstracking.js'); ?>" type="text/javascript"></script> 
                
    </head>

    <body class="admin_body">                                   
                        
        <div class="admin_header ui-widget-header">            
            <a href="<?php echo url('/admin'); ?>" class="button account">Dashboard</a>                                                

            <h1><?php echo $__env->yieldContent ('header'); ?></h1>

            <a href="<?php echo url('/account'); ?>" class="button close float_right no_text"></a>
            <a href="<?php echo url('/admin/help'); ?>" class="button help float_right no_text"></a>
            <a href="<?php echo url('/'); ?>" class="button home float_right">Front Page</a>            
        </div>            

        <?php echo $__env->yieldContent ('content'); ?>        
        
    </body>    
</html>