<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY amp   "&#38;">
<!ENTITY copy   "&#169;">
<!ENTITY gt   "&#62;">
<!ENTITY hellip "&#8230;">
<!ENTITY laquo  "&#171;">
<!ENTITY lsaquo   "&#8249;">
<!ENTITY lsquo   "&#8216;">
<!ENTITY lt   "&#60;">
<!ENTITY nbsp   "&#160;">
<!ENTITY quot   "&#34;">
<!ENTITY raquo  "&#187;">
<!ENTITY rsaquo   "&#8250;">
<!ENTITY rsquo   "&#8217;">
]>
<!--
Implementations Skeleton - 01/10/2017

HOME PAGE
A complex page type.

Contributors: Your Name Here
Last Updated: Enter Date Here
-->
<xsl:stylesheet version="3.0"
				xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
				xmlns:xs="http://www.w3.org/2001/XMLSchema"
				xmlns:ou="http://omniupdate.com/XSL/Variables"
				xmlns:fn="http://omniupdate.com/XSL/Functions"
				xmlns:ouc="http://omniupdate.com/XSL/Variables"
				exclude-result-prefixes="ou xsl xs fn ouc"
				expand-text="yes">

	<xsl:import href="common.xsl"/>

	<xsl:param name="body-class" select="'body'" />

	<xsl:template name="page-content">

		<xsl:if test="ouc:properties[@label='config']/parameter[@name='emergency-alert']/option[@value='true']/@selected='true'">
			<section class="alert alert-danger" style="margin-bottom: -20px;">
				<div class="row message" style="padding: 15px;">
					<p><strong><xsl:value-of select="ouc:properties[@label='config']/parameter[@name='emergency-alert-text']/text()"/></strong></p>
				</div>
			</section>
		</xsl:if>

		<xsl:apply-templates select="ou:pcf-param('gallery-asset')" mode="homepage" />

		<section class="section section-no-border background-color-primary stats custom-section-spacement-1 m-none">
			<div class="container">
				<div class="row">

					<xsl:apply-templates select="ouc:div[@label = 'region-1']" />

				</div>
			</div>
		</section>
		<div class="container-fluid">

			<xsl:apply-templates select="ouc:div[@label = 'region-2']" />

		</div>

		<section class="section section-no-border custom-section-spacement-1 background-color-primary m-none">
			<div class="container">
				<div class="row center">
					<div class="col-md-12">
						<span class="home-section-heading">{ou:pcf-param('news-heading')}</span>
						<hr />
					</div>
				</div>
				<div class="row center">

					<xsl:call-template name="news-events">
						<xsl:with-param name="mode" select="'newshome'" />
						<xsl:with-param name="rss-feed" select="ou:pcf-param('news-feed')" />
						<xsl:with-param name="tags" select="ou:pcf-param('news-tags')" />
						<xsl:with-param name="count" select="'3'" />
					</xsl:call-template>

				</div>
			</div>
		</section>
		<section class="section section-no-border custom-section-spacement-1 m-none">
			<div class="container">
				<div class="row center">
					<div class="col-md-12 mt-md">
						<span class="home-section-heading">{ou:pcf-param('events-heading')}</span>
						<hr class="events" />
					</div>
				</div>
				<div class="row center">

					<xsl:call-template name="news-events">
						<xsl:with-param name="mode" select="'eventhome'" />
						<xsl:with-param name="rss-feed" select="ou:pcf-param('event-feed')" />
						<xsl:with-param name="tags" select="ou:pcf-param('event-tags')" />
						<xsl:with-param name="count" select="'3'" />
					</xsl:call-template>

				</div>
			</div>
		</section>

	</xsl:template>

	<xsl:template name="common-headcode">
		<xsl:copy-of select="ou:include-file('/_resources/includes/headcode-home.inc')"/>

		<xsl:call-template name="form-headcode" />
		<xsl:call-template name="gallery-headcode" />

	</xsl:template>

	<xsl:template name="common-footcode">
		<xsl:copy-of select="ou:include-file('/_resources/includes/footcode-home.inc')"/>

		<xsl:call-template name="form-footcode" />
		<xsl:call-template name="gallery-footcode" />

		<xsl:if test="$ou:action = 'pub'">
			<xsl:copy-of select="ou:include-file('/_resources/includes/analytics.inc')"/>
		</xsl:if>
	</xsl:template>

</xsl:stylesheet>
