<?php
	$round_names = array('1'  => 'Round 1',						 
						 'QF' => 'Quarterfinals',
						 'SF' => 'Semifinals',
						 'F'  => 'Final');

?>

<div style="width: 200px; height: 50px; position: absolute; bottom: 50px; left: 50px; background-image: url(<?php echo asset('images/logos/USBank_200x50px.png'); ?>); background-repeat: no-repeat;"></div>

<div style="width: 200px; height: 50px; position: absolute; bottom: 50px; right: 50px; background-image: url(<?php echo asset('images/logos/LesSchwab_200x50px.png'); ?>); background-repeat: no-repeat;">
</div>

<div style="width: 250px; height: 130px; position: absolute; top:200px; right: 0; background-image: url(<?php echo asset('images/logos/OSAAStateChampionship_250x130px.png'); ?>); background-repeat: no-repeat;">
</div>


<!-- Area Container -->
<div style="height: 1275px;">	
	
	<!-- Round 0 (1) -->
	<div class="round left" style="height: 500px; padding: 0 8px; margin-left: 118px;">
		
		<!-- Round Info -->
		<div class="info" style="margin-top: 16px; margin-bottom: 47px;" data-round="<?php echo $information['bracket']->rounds[0]->round->id; ?>">
			<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
				<div class="reports">
					<img src="<?php echo asset('/images/icons/control-down-icon_32px.png'); ?>" alt="" title="" />
					<ul>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[0]->round->id . '/contests'); ?>">Round Contests</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[0]->round->id . '/media-rosters'); ?>">Media Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[0]->round->id . '/program-rosters'); ?>">Program Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[0]->round->id . '/statcrew-rosters'); ?>">StatCrew Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[0]->round->id . '/packets'); ?>">Packets Listing</a></li>
					</ul>
				</div>
			<?php endif; ?>

			<div class="title">
				<?php echo $round_names[$information['bracket']->rounds[0]->round->round_type]; ?>
			</div>
			<div class="date">
				<?php echo date('M. j', strtotime($information['bracket']->rounds[0]->event->start_at)); ?>
			</div>
		</div>

		<!-- Matchups -->
		<?php for ($i = 0; $i < 4; $i++): ?>

			<?php if ($i == 0): ?>						
				<div class="connector right top" style="margin-top: 31px; height: 74px;"></div>				
			<?php elseif ($i % 2 == 0): ?>								
				<div class="connector right top" style="margin-top: 41px; height: 74px;"></div>				
			<?php else: ?>							
				<div class="connector right bottom" style="margin-top: -33px; height: 74px;"></div>				
			<?php endif; ?>			

			<?php echo BracketsController::getMatchup('right', $information['bracket']->matchups[$i]); ?>
			
			<?php if ($i == 0 or $i == 2): ?>
				<div class="spacer" style="height: 360px;"></div>
			<?php else: ?>
				<div class="spacer" style="height: 64px;"></div>
			<?php endif; ?>

		<?php endfor; ?>

	</div>

	<!-- Round 1 (QF) -->
	<div class="round left" style="height: 500px; padding: 0 8px;">
		
		<!-- Round Info -->
		<div class="info" style="margin-top: 16px; margin-bottom: 121px;" data-round="<?php echo $information['bracket']->rounds[1]->round->id; ?>">
			<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
				<div class="reports">
					<img src="<?php echo asset('/images/icons/control-down-icon_32px.png'); ?>" alt="" title="" />
					<ul>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[1]->round->id . '/contests'); ?>">Round Contests</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[1]->round->id . '/media-rosters'); ?>">Media Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[1]->round->id . '/program-rosters'); ?>">Program Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[1]->round->id . '/statcrew-rosters'); ?>">StatCrew Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[1]->round->id . '/packets'); ?>">Packets Listing</a></li>
					</ul>
				</div>
			<?php endif; ?>

			<div class="title">
				<?php echo $round_names[$information['bracket']->rounds[1]->round->round_type]; ?>
			</div>
			<div class="date">
				<?php echo date('M. j', strtotime($information['bracket']->rounds[1]->event->start_at)); ?>
			</div>
		</div>

		<!-- Matchups -->
		<?php for ($i = 4; $i < 8; $i++): ?>

			<?php if ($i == 4): ?>		
				<div class="connector left bottom" style="margin-top: 31px;"></div>
				<div class="connector right top" style="margin-top: 31px; height: 141px;"></div>				
			<?php elseif ($i % 2 == 0): ?>				
				<div class="connector left bottom" style="margin-top: 41px;"></div>
				<div class="connector right top" style="margin-top: 41px; height: 141px;"></div>				
			<?php else: ?>			
				<div class="connector left bottom" style="margin-top: 41px;"></div>
				<div class="connector right bottom" style="margin-top: -112px; height: 153px;"></div>				
			<?php endif; ?>
			

			<?php echo BracketsController::getMatchup('right', $information['bracket']->matchups[$i]); ?>
			
			<div class="spacer" style="height: 212px;"></div>

		<?php endfor; ?>

	</div>

	<!-- Round 2 (SF) -->
	<div class="round left" style="height: 500px; padding: 0 8px;">
		
		<!-- Round Info -->
		<div class="info" style="margin-top: 16px; margin-bottom: 262px;" data-round="<?php echo $information['bracket']->rounds[2]->round->id; ?>">
			<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
				<div class="reports">
					<img src="<?php echo asset('/images/icons/control-down-icon_32px.png'); ?>" alt="" title="" />
					<ul>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[2]->round->id . '/contests'); ?>">Round Contests</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[2]->round->id . '/media-rosters'); ?>">Media Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[2]->round->id . '/program-rosters'); ?>">Program Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[2]->round->id . '/statcrew-rosters'); ?>">StatCrew Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[2]->round->id . '/packets'); ?>">Packets Listing</a></li>
					</ul>
				</div>
			<?php endif; ?>

			<div class="title">
				<?php echo $round_names[$information['bracket']->rounds[2]->round->round_type]; ?>
			</div>
			<div class="date">
				<?php echo date('M. j', strtotime($information['bracket']->rounds[2]->event->start_at)); ?>
			</div>
		</div>

		<!-- Matchups -->
		<?php for ($i = 8; $i < 10; $i++): ?>

			<?php if ($i == 8): ?>		
				<div class="connector left bottom" style="margin-top: 31px;"></div>
				<div class="connector right top" style="margin-top: 31px; height: 298px;"></div>				
			<?php elseif ($i % 2 == 0): ?>				
				<div class="connector left bottom" style="margin-top: 41px;"></div>
				<div class="connector right top" style="margin-top: 41px; height: 298px;"></div>				
			<?php else: ?>			
				<div class="connector left bottom" style="margin-top: 41px;"></div>
				<div class="connector right bottom" style="margin-top: -253px; height: 294px;"></div>				
			<?php endif; ?>
			

			<?php echo BracketsController::getMatchup('right', $information['bracket']->matchups[$i]); ?>
			
			<div class="spacer" style="height: 510px;"></div>

		<?php endfor; ?>

	</div>

	<!-- Round 3 (F) -->
	<div class="round left" style="height: 500px; padding: 0 8px;">
		
		<!-- Round Info -->
		<div class="info" style="margin-top: 16px; margin-bottom: 560px;" data-round="<?php echo $information['bracket']->rounds[3]->round->id; ?>">
			<?php if (Auth::check() and Auth::user()->isOsaaUser()): ?>
				<div class="reports">
					<img src="<?php echo asset('/images/icons/control-down-icon_32px.png'); ?>" alt="" title="" />
					<ul>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[3]->round->id . '/contests'); ?>">Round Contests</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[3]->round->id . '/media-rosters'); ?>">Media Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[3]->round->id . '/program-rosters'); ?>">Program Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[3]->round->id . '/statcrew-rosters'); ?>">StatCrew Rosters</a></li>
						<li><a href="<?php echo url('/brackets/' . $information['bracket']->bracket->id . '/rounds/' . $information['bracket']->rounds[3]->round->id . '/packets'); ?>">Packets Listing</a></li>
					</ul>
				</div>
			<?php endif; ?>

			<div class="title">
				<?php echo $round_names[$information['bracket']->rounds[3]->round->round_type]; ?>
			</div>
			<div class="date">
				<?php echo date('M. j', strtotime($information['bracket']->rounds[3]->event->start_at)); ?>
			</div>
		</div>

		<!-- Matchups -->
		<?php for ($i = 10; $i < 11; $i++): ?>
					
			<div class="connector left bottom" style="margin-top: 31px;"></div>						

			<?php echo BracketsController::getMatchup('right', $information['bracket']->matchups[$i]); ?>		
			
		<?php endfor; ?>

	</div>


</div>


<div class="contest_viewer" style="display: none;"></div>


