<?php

defined('_GOOFY') or die;
$call_parts = wed_getSystemValue('CALL_PARTS');
if (isset($call_parts[1])) {
    $catg = $call_parts[1];
} elseif (!empty($call_parts[0])) {
    $catg = $call_parts[0];
} else {
    $catg = 'homepage';
}
$holiday = array('start_date' => '12/1/2013', 'end_date' => '1/2/2014');
if (wed_getMomentInTime($holiday)) {
    // Randomize $catg
}
$animator = $walt->getImagineer('animation');
$slider = array('SLIDER_ID' => 'layerslider', 'COMPONENT' => 'layerslider', 'STYLE' => 'large_slider', 'IMAGE_SIZE' => '1200_500', 'IMAGE_FOLDER' => $catg, 'SLIDER_HEIGHT' => '500px', 'CELL_TEMPLATE' => 'tmpl_image_logo');
$animator->newAnimation($slider);
$slider_html = $animator->getHTML(array('SLIDER_ID' => 'layerslider'));
$color_class = getRandomColorClass();
?>

<div id="slideshow" class="gradient <?php 
echo $color_class;
?>
">
	<div class="container">
		<?php 
echo $slider_html;
?>
	</div>
function kly_getHoverBox($options = array(), $content = '')
{
    // Produces the boxes that turn red when you hopver over them
    $html = '';
    if (wed_getMomentInTime($options)) {
        $link = isset($options['link']) ? $options['link'] : '#';
        $image = isset($options['image']) ? $options['image'] : 'checkbox.png';
        $title = isset($options['title']) ? $options['title'] : 'Announcing!';
        $subtitle = isset($options['subtitle']) ? $options['subtitle'] : '{{GROUP_TITLE}}';
        $span = isset($options['span']) ? $options['span'] : '4';
        $image_path = '/files/images/icons/60_60/' . $image;
        $span_class = 'col-md-' . $span;
        $html = '<div class="' . $span_class . '"><a href="' . $link . '" class="hover-box-green fixclear"><img src="' . $image_path . '" alt=""><h3>' . $title . '</h3>
	<h4>' . $subtitle . '</h4><p>' . $content . '</p></a></div>';
    }
    return $html;
}
$group = isset($call_parts[1]) ? $call_parts[1] : null;
if ($control == 'register' && !is_null($group)) {
    $ontime = false;
    $sport = ucfirst($group);
    $start = false;
    $end = false;
    $early = $sport . '_registration_early';
    $standard = $sport . '_registration';
    $schedule_db = wed_getDBObject('wed_schedules');
    $title = 'Deadline is approaching!';
    if (wed_getMomentInTime(array('schedule' => $early)) && $schedule_db->getRecordByCode($early)) {
        $start = $schedule_db->getValue('start');
        $end = $schedule_db->getValue('end');
        $title = 'Early Deadline is approaching!';
        $ontime = true;
    } elseif (wed_getMomentInTime(array('schedule' => $standard)) && $schedule_db->getRecordByCode($standard)) {
        $start = $schedule_db->getValue('start');
        $end = $schedule_db->getValue('end');
        $ontime = true;
    }
    if ($ontime) {
        $dt_end = new DateTime($end);
        $end_date = $dt_end->format("m/d/Y");
        $bar_title = '[countdown title="' . $title . '" date="' . $end_date . '" /]';
    }
}
?>

<div id="action_box" data-arrowpos="center">
	<div class="container">
		<div class="row">