<?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;">
]>
<!--

-->
<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="xs ou fn ouc"
	expand-text="yes">

	<xsl:template match="table[@class = 'ou-landing-row']">

		<xsl:apply-templates select="tbody/tr[@class = 'row-item']" mode="row-item" />

	</xsl:template>
	<xsl:template match="tr" mode="row-item">
		<div class="col-md-4 match-height">
			<a href="{td[1]//a[1]/@href}">
				<div class="landing-image">
					<img class="img-responsive" src="{td[2]//img[1]/@src}" alt="{td[2]//img[1]/@alt}" />
				</div>
				<div class="landing-label">
					{td[1]//text()}
				</div>
			</a>
		</div>
	</xsl:template>

	<xsl:template match="table[@class = 'ou-accordion']">
		<div class="panel panel-default">

			<xsl:apply-templates select="tbody/tr[@class = 'panel']" mode="panel">
				<xsl:with-param name="accordion-id" select="generate-id()" />
			</xsl:apply-templates>

		</div>
	</xsl:template>
	<xsl:template match="tr" mode="panel">
		<xsl:param name="accordion-id" />

		<div class="panel-heading">
			<h4 class="panel-title">
				<a role="button" data-toggle="collapse" data-parent="#accordion-{$accordion-id}" href="#collapse-{$accordion-id}-{position()}">
					{td[1]}
				</a>
			</h4>
		</div>
		<div id="collapse-{$accordion-id}-{position()}" class="panel-collapse collapse">
			<div class="panel-body">

				<xsl:apply-templates select="td[2]/node()" />

			</div>
		</div>
	</xsl:template>

	<xsl:template match="table[@class = 'ou-nav-tabs']">
		<xsl:variable name="tabs-id" select="generate-id()" />

		<ul class="nav nav-tabs">

			<xsl:apply-templates select="tbody/tr[@class = 'nav-tab']" mode="tab-title">
				<xsl:with-param name="tabs-id" select="$tabs-id" />
			</xsl:apply-templates>

		</ul>

		<div class="tab-content">

			<xsl:apply-templates select="tbody/tr[@class = 'nav-tab']" mode="tab-content">
				<xsl:with-param name="tabs-id" select="$tabs-id" />
			</xsl:apply-templates>

		</div>
	</xsl:template>
	<xsl:template match="tr" mode="tab-title">
		<xsl:param name="tabs-id" />

		<li class="{if (position() = 1) then 'active' else ''}">
			<a data-toggle="tab" href="#{$tabs-id}-{position()}">{td[1]}</a>
		</li>
	</xsl:template>
	<xsl:template match="tr" mode="tab-content">
		<xsl:param name="tabs-id" />

		<div id="{$tabs-id}-{position()}" class="tab-pane fade {if (position() = 1) then 'in active' else ''}">
			<span>

				<xsl:apply-templates select="td[2]/node()" />

			</span>
		</div>
	</xsl:template>

	<xsl:template match="table[@class = 'ou-2-column']">
		<div class="row">

			<xsl:apply-templates select="tbody/tr[2]/td" mode="column">
				<xsl:with-param name="col-md" select="'6'" />
			</xsl:apply-templates>

		</div>
	</xsl:template>
	<xsl:template match="table[@class = 'ou-3-column']">
		<div class="row">

			<xsl:apply-templates select="tbody/tr[2]/td" mode="column">
				<xsl:with-param name="col-md" select="'4'" />
			</xsl:apply-templates>

		</div>
	</xsl:template>
	<xsl:template match="td" mode="column">
		<xsl:param name="col-md" />

		<div class="col-md-{$col-md}">

			<xsl:apply-templates />

		</div>
	</xsl:template>

	<!-- Homepage -->

	<xsl:template match="table[@class = 'ou-icon-strip']">
		<xsl:apply-templates select="tbody/tr[@class = 'icon']" mode="icon" />
	</xsl:template>
	<xsl:template match="tr" mode="icon">
		<div class="col-lg-2 col-md-2 col-xs-6 text-center">
			<a href="{td[1]//a[1]/@href}">
				<img class="img-responsive home-icon" src="{td[2]//img/@src}" alt="{td[1]}" aria-hidden="true" />
				{td[1]}
			</a>
		</div>
	</xsl:template>

	<xsl:template match="table[@class = 'ou-parallax-scroll']">
		<xsl:apply-templates select="tbody/tr[@class = 'parallax-row']" mode="parallax-row" />
	</xsl:template>
	<xsl:template match="tr" mode="parallax-row">
		<div class="row {if (td[2]//img) then 'custom-sm-flex-order' else 'custom-parallax-bg-pos-left'}">

			<xsl:apply-templates select="td" mode="parallax-column" />

		</div>
	</xsl:template>
	
	<!-- Changed min-height from 315px to 400px # 47705 -->
	<xsl:template match="td" mode="parallax-column" expand-text="no">

		<xsl:choose>
			<xsl:when test=".//img">

				<div class="col-md-6 p-none">
					
					<section class="parallax section section-parallax match-height m-none" data-plugin-parallax="data-plugin-parallax" data-plugin-options="{{'speed': 1.5, 'horizontalPosition': '100%'}}" data-image-src="{.//img[1]/@src}" style="min-height: 325px;"></section>
				</div>

			</xsl:when>
			<xsl:otherwise>

				<xsl:apply-templates select=".//table" mode="button-card">
					<xsl:with-param name="td-position" select="position()" />
				</xsl:apply-templates>

			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>
	<xsl:template match="table[@class = 'ou-button-card']" mode="button-card">
		<xsl:param name="td-position" />
		<xsl:variable name="left-right" select="if ($td-position = 1) then 'right' else 'left'" />

		<div class="col-md-6 p-none">
			<section class="section section-no-border match-height m-none">
				<div class="row m-none">
					<div class="col-half-section col-half-section-{$left-right} custom-text-align-{$left-right}">
						<h2 class="text-uppercase font-weight-bold custom-text-color-5">{tbody/tr[1]/td}</h2>
						<p class="custom-text-color-5 mb-xlg">{tbody/tr[2]/td}</p>
						<a href="{tbody/tr[3]/td//a[1]/@href}" class="btn btn-primary custom-btn-style-2 font-weight-semibold text-uppercase mt-sm">{tbody/tr[3]/td}</a>
					</div>
				</div>
			</section>
		</div>
	</xsl:template>

</xsl:stylesheet>
