<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY copy   "&#169;">
<!ENTITY nbsp "&#xa0;">
]>

<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"
	xmlns="http://www.w3.org/1999/xhtml"
	exclude-result-prefixes="ou xsl xs fn ouc">

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

	<xsl:template name="common-layout">
 			<xsl:call-template name="common-header" /> 
			<xsl:call-template name="page-content" />
 			<xsl:call-template name="common-footer" /> 
	</xsl:template>

	<xsl:template name="page-content">	
		
		<xsl:param name="path" select="$dirname" />
		
		<xsl:param name="updated-date" select="$ou:modified" />
		<xsl:variable name="banner_type_1" select="banner-items/banner-1/ouc:div[@label='display-type-1']" />
		<xsl:variable name="banner_type_2" select="banner-items/banner-2/ouc:div[@label='display-type-2']" />
		<xsl:variable name="banner_type_3" select="banner-items/banner-3/ouc:div[@label='display-type-3']" />	
		<xsl:variable name="banner_type_4" select="banner-items/banner-4/ouc:div[@label='display-type-4']" />
		<xsl:variable name="banner_type_5" select="banner-items/banner-5/ouc:div[@label='display-type-5']" />
		<xsl:variable name="banner_type_6" select="banner-items/banner-6/ouc:div[@label='display-type-6']" />
		<xsl:variable name="banner_type_7" select="banner-items/banner-7/ouc:div[@label='display-type-7']" />
        <xsl:variable name="banner_type_8" select="banner-items/banner-8/ouc:div[@label='display-type-8']" />
        <xsl:variable name="banner_type_9" select="banner-items/banner-9/ouc:div[@label='display-type-9']" />
        <xsl:variable name="banner_type_10" select="banner-items/banner-10/ouc:div[@label='display-type-10']" />
			
		<xsl:variable name="video_banner_1" select="banner-items/banner-1/ouc:div[@label='banner-video']" />
		<xsl:variable name="video_banner_2" select="banner-items/banner-2/ouc:div[@label='banner-video']" />
		<xsl:variable name="video_banner_3" select="banner-items/banner-3/ouc:div[@label='banner-video']" />
		<xsl:variable name="video_banner_4" select="banner-items/banner-4/ouc:div[@label='banner-video']" />
		<xsl:variable name="video_banner_5" select="banner-items/banner-5/ouc:div[@label='banner-video']" />
		<xsl:variable name="video_banner_6" select="banner-items/banner-6/ouc:div[@label='banner-video']" />
        <xsl:variable name="video_banner_7" select="banner-items/banner-7/ouc:div[@label='banner-video']" />
        <xsl:variable name="video_banner_8" select="banner-items/banner-8/ouc:div[@label='banner-video']" />
        <xsl:variable name="video_banner_9" select="banner-items/banner-9/ouc:div[@label='banner-video']" />
        <xsl:variable name="video_banner_10" select="banner-items/banner-10/ouc:div[@label='banner-video']" />
		
		<xsl:variable name="this-props-path" select="concat($ou:root, $ou:site, $path, $props-file)"/>	<!-- props-file is defined in vars xsl -->
		
		<xsl:variable name="iframe-link" select="iframe-video/ouc:div[@label='iframe-video-link']" />
										
		<xsl:variable name="vid">
			<xsl:analyze-string select="$iframe-link" regex="(((https://)?)((http://)?)(www\.)?((youtube\.com/)|(youtu\.be)|(youtube))(.+=)(.+))">
				<xsl:matching-substring>http://www.youtube.com/embed/<xsl:value-of select="regex-group(12)"/></xsl:matching-substring>
				<xsl:non-matching-substring>
					<xsl:copy-of select="."/>
				</xsl:non-matching-substring>
			</xsl:analyze-string>
		</xsl:variable>
		
<div class="col-sm-12-cvpa marquee-content-cvpa" role="region" aria-label="Marquee Header">
         <div class="marquee-cvpa">
			 <div class="hmove">
			 <div class="marquee-vert-center">
            <h1>
				<!-- <xsl:value-of select="ouc:properties[@label='config']/parameter[@name='marquee']"/> --> <!-- This would need to be set if you want the marquee on individual pages -->
				<xsl:value-of select="document($this-props-path)/document/ouc:properties[@label='config']/parameter[@name='marquee']"/> <!-- This sets the header scrolling marquee on the section level -->
				
				 
				 </h1>
				 </div>
				 </div>
         </div>
      </div>
		
		<div id="HomeSliderSec" class="carousel slide innerPageSlider" data-ride="carousel">
		
		
            
				<div class="carousel-inner" role="region" aria-label="Marquee Image Slider">

					


					<xsl:choose> <!-- Banner 1-->
						<xsl:when test="$banner_type_1 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-1/ouc:div[@label='banner-image-1']}" alt="{banner-items/banner-1/ouc:div[@label='banner-image-alt-1']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_1 ='Video'">
							<div class="carousel-item">
								<div id="video_1" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:choose> <!-- Banner 2-->
						<xsl:when test="$banner_type_2 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-2/ouc:div[@label='banner-image-2']}" alt="{banner-items/banner-2/ouc:div[@label='banner-image-alt-2']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_2 ='Video'">
							<div class="carousel-item">
								<div id="video_2" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:choose> <!-- Banner 3-->
						<xsl:when test="$banner_type_3 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-3/ouc:div[@label='banner-image-3']}" alt="{banner-items/banner-3/ouc:div[@label='banner-image-alt-3']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_3 ='Video'">
							<div class="carousel-item">
								<div id="video_3" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
			
			<xsl:choose> <!-- Banner 4-->
						<xsl:when test="$banner_type_4 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-4/ouc:div[@label='banner-image-4']}" alt="{banner-items/banner-4/ouc:div[@label='banner-image-alt-4']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_4 ='Video'">
							<div class="carousel-item">
								<div id="video_4" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
			
			<xsl:choose> <!-- Banner 5-->
						<xsl:when test="$banner_type_5 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-5/ouc:div[@label='banner-image-5']}" alt="{banner-items/banner-5/ouc:div[@label='banner-image-alt-5']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_5 ='Video'">
							<div class="carousel-item">
								<div id="video_5" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
			
			<xsl:choose> <!-- Banner 6-->
						<xsl:when test="$banner_type_6 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-6/ouc:div[@label='banner-image-6']}" alt="{banner-items/banner-6/ouc:div[@label='banner-image-alt-6']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_6 ='Video'">
							<div class="carousel-item">
								<div id="video_6" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					
				<xsl:choose> <!-- Banner 7-->
						<xsl:when test="$banner_type_7 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-7/ouc:div[@label='banner-image-7']}" alt="{banner-items/banner-7/ouc:div[@label='banner-image-alt-7']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_7 ='Video'">
							<div class="carousel-item">
								<div id="video_7" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					
					<xsl:choose> <!-- Banner 8-->
						<xsl:when test="$banner_type_8 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-8/ouc:div[@label='banner-image-8']}" alt="{banner-items/banner-8/ouc:div[@label='banner-image-alt-8']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_8 ='Video'">
							<div class="carousel-item">
								<div id="video_8" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					
					<xsl:choose> <!-- Banner 9-->
						<xsl:when test="$banner_type_9 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-9/ouc:div[@label='banner-image-9']}" alt="{banner-items/banner-9/ouc:div[@label='banner-image-alt-9']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_9 ='Video'">
							<div class="carousel-item">
								<div id="video_9" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>
					
            <xsl:choose> <!-- Banner 10-->
						<xsl:when test="$banner_type_10 ='Image'">
							<div class="carousel-item">
								<img src="{banner-items/banner-10/ouc:div[@label='banner-image-10']}" alt="{banner-items/banner-10/ouc:div[@label='banner-image-alt-10']}" class="w-100"/>
							</div>
						</xsl:when>
						<xsl:when test="$banner_type_10 ='Video'">
							<div class="carousel-item">
								<div id="video_10" class="carousel-video-item"></div>
							</div>
						</xsl:when>
						<xsl:otherwise>
						</xsl:otherwise>
					</xsl:choose>

			 <xsl:choose>
     <xsl:when test="$banner_type_2 ='Image' or $banner_type_2 ='Video'">
					<a class="carousel-control-prev" href="#HomeSliderSec" role="button" data-slide="prev" onClick="pauseVideo()">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="carousel-control-next" href="#HomeSliderSec" role="button" data-slide="next" onClick="pauseVideo()">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
					</xsl:when>
     <xsl:otherwise>
		  </xsl:otherwise>
   </xsl:choose>
					
					
			<!--		
			<a class="carousel-control-prev" href="#HomeSliderSec" role="button" data-slide="prev" onClick="pauseVideo()">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="carousel-control-next" href="#HomeSliderSec" role="button" data-slide="next" onClick="pauseVideo()">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
-->
		</div>
</div>

		
			<!--             <hr class="transition-timer-carousel-progress-bar" /> -->
			

<!-- <script type="text/javascript" src="/_resources/js/gallery-secondary.js"></script>  -->			
<!-- <script src="/_resources/js/cvpa-header-randomSlideShow.js"></script>	-->
	<script src="/_resources/js/header-randomSlideShow.js"></script>
		
	<script type="text/javascript" src="/js/youtubebackground.js"></script>
			
			<script type="text/javascript">

				$('#video_1').YTPlayer({
					playerVars: {
					  controls: 0,
					  showinfo: 0,
					  branding: 0,
					  rel: 0
    				},
					fitToBackground: true,
					videoId: '<xsl:value-of select="$video_banner_1" />'
				});
				$('#video_2').YTPlayer({
					playerVars: {
					  controls: 0,
					  showinfo: 0,
					  branding: 0,
					  rel: 0
    				},
					fitToBackground: true,
					videoId: '<xsl:value-of select="$video_banner_2" />'
				});
				$('#video_3').YTPlayer({
					playerVars: {
					  controls: 0,
					  showinfo: 0,
					  branding: 0,
					  rel: 0
    				},
					fitToBackground: true,
					videoId: '<xsl:value-of select="$video_banner_3" />'
				});
			function pauseVideo()
			{
			/*
				if($('#video_1'))
				{
					var player1 = $('#video_1').data('ytPlayer').player;
					player1.pauseVideo();
				}
				if($('#video_2'))
				{
					var player2 = $('#video_2').data('ytPlayer').player;
					player2.pauseVideo();
				}
				if($('#video_3'))
				{
					var player3 = $('#video_3').data('ytPlayer').player;
					player3.pauseVideo();
				}
			*/
			}
</script>
		<div class="container card-container general">
            <nav class="nav-breadcrumb" aria-label="breadcrumb">
            	<ol class="breadcrumb">
					<xsl:call-template name="breadcrumb" />
				</ol>
			</nav>
			<div class="row top-pad">
 				<xsl:if test="ou:pcf-param('display-menu1') = 'display' or ou:pcf-param('display-menu2') = 'display' or ou:pcf-param('display-menu3') = 'display'" > 
					<div class="col-lg-3 col-md-4 col-sm-6 padding-lrt">
						<xsl:if test="ou:pcf-param('display-menu1') = 'display'">
  							<xsl:call-template name="navigation" /> 
						</xsl:if>
						<div class="xs-hide-box-content">
							<xsl:call-template name="sidebar-content" />
							<xsl:if test="ou:pcf-param('sidebar-region') = 'display'">
								
								<!-- J.R. edit 3/27/2019 -->
								<!--<xsl:apply-templates select="ouc:div[@label = 'related-links']" />
								<xsl:apply-templates select="ouc:div[@label = 'contact']" />-->
								<!-- End J.R. edit 3/27/2019 -->
								
							</xsl:if>
<!-- 							<xsl:if test="ou:pcf-param('display-menu2') = 'display'">
									<xsl:apply-templates select="ouc:div[@label = 'side-menu2']" />
							</xsl:if>
							<xsl:if test="ou:pcf-param('display-menu3') = 'display'">
									<xsl:apply-templates select="ouc:div[@label = 'side-menu3']" />
								<xsl:call-template name="sidebar-content" />
							</xsl:if> -->
						</div>
					</div>
 				</xsl:if>
				<xsl:choose>
					
					<xsl:when test="ou:pcf-param('display-right-content') = 'display'">

						<!-- <div class="col-lg-9 col-md-8 col-sm-6"> -->
							
							<div class="col-sm-12">
						

							
							<div role="main" id="main" class="text-block">
								<xsl:if test="not(ou:pcf-param('heading')='')">
    <h1><xsl:value-of select="ou:pcf-param('heading')" /></h1>
</xsl:if>
<xsl:if test="ou:pcf-param('heading')=''">

</xsl:if>

<!-- <h1><xsl:value-of select="ou:pcf-param('heading')" /></h1> -->
								
								
								<!-- COVID-19 Coronavirus special message for admissions -->
															 <!-- 
								<div id="message">
																<p>Don't miss out on Admissions <a href="/admissions/visit-the-campus.aspx" title="virtual and  in-person events">virtual and  in-person events</a> we have to offer this Fall including Weekday and Saturday  Visits, Major Knowledge Sessions with Winthrop Faculty, Transfer Information  Sessions, and <a href="/admissions/visit-the-campus.aspx" title="SO MANY MORE  HERE">SO MANY MORE  HERE</a>! </p>
<p>Check out our <a href="/admissions/admissionsnewsletter.aspx" title="Monthly  Admissions Newsletter">Monthly  Admissions Newsletter</a> and <a href="https://content.yudu.com/web/440bg/Viewbook/viewbook/html/index.html" title="Digital  Viewbook" target="_blank">Digital  Viewbook</a></p>
																 
																 
								</div>
								
								
								<script type="text/javascript" src="/_resources/js/special-message.js"></script>

-->
								
								<xsl:apply-templates select="ouc:div[@label = 'page-content-top']" />
								<hr />
								<div class="slider-intro">

<div>
	<xsl:apply-templates select="ouc:div[@label = 'upcoming-events-left']" />	
	</div>
	
	
	
<div>
	<xsl:apply-templates select="ouc:div[@label = 'upcoming-events-right']" />	
	</div>
	</div>
								<div class="col-md-12 col-sm-12">
		<xsl:choose>
								<xsl:when test="$ou:action = 'pub' or $ou:action = 'cmp'">
									<xsl:text disable-output-escaping="yes">&lt;%</xsl:text>
								  Response.Write(OUC.CVPAEvents.GetEvents("https://www.winthrop.edu/rss/cvpa-events.xml", "Future"));<xsl:text disable-output-escaping="yes">%&gt;</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:variable name="events-script" select="concat($domain, '/_resources/cs/get-events.ashx')" />
									<xsl:if test="unparsed-text-available($events-script)">
										<xsl:value-of select="unparsed-text(concat($events-script, '?feed=', 'https://www.winthrop.edu/rss/cvpa-events.xml'))" disable-output-escaping="yes" />
									</xsl:if>
								</xsl:otherwise>
							</xsl:choose>
		</div>
								
								<hr />
								<xsl:apply-templates select="ouc:div[@label = 'page-content-bottom']" />
								
					<!--			<h2 style="text-align: center;" class="headlineH2">Upcoming Events</h2>	
								<div class="horizontal-slick">
									<xsl:apply-templates select="ouc:div[@label = 'events-content']" />
								</div>
								
								<xsl:apply-templates select="ouc:div[@label = 'bottom-content']" />
								-->
								<p></p>
								<!-- J.R. 3/28/2019 -->
<!-- <a class="button btn" title="Apply Now" href="{general-info/ouc:div[@label='apply-now-link']}"><xsl:value-of select="general-info/ouc:div[@label='apply-now-label']" /><img class="arrow-icon img-fluid" src="/_resources/images/Button_Arrow_Icon.png" alt="Button Arrow" /></a>-->
								<!-- END J.R. 3/28/2019 -->
								
							</div>
							<xsl:choose><xsl:when test="ou:pcf-param('display-video-content') = 'display'">
								<div class="col-lg-9 col-sm-12 video-martopbtm no-padding">
									<div class="embed-responsive h-100 embed-responsive-16by9">
										<iframe class="embed-responsive-item" src="{$vid}" allowfullscreen=""></iframe>
									</div>
								</div>
						   </xsl:when></xsl:choose>
							
						<div class="sm-hide-box-content">
							<!-- <xsl:if test="ou:pcf-param('display-menu2') = 'display'">
									<xsl:apply-templates select="ouc:div[@label = 'side-menu2']" />
							</xsl:if>
							<xsl:if test="ou:pcf-param('display-menu3') = 'display'">
									<xsl:apply-templates select="ouc:div[@label = 'side-menu3']" />
							</xsl:if> -->
						</div>
								
						</div>					
						
					</xsl:when>
						
					<xsl:otherwise>
					</xsl:otherwise> 
					
				</xsl:choose>
			</div> 
		</div>
	</xsl:template>
	
<xsl:template name="common-footer">
	
	<script type="text/javascript" src="/_resources/js/cvpa-remove-marquee.js"></script> 
	
	<script type="text/javascript" src="/_resources/js/cvpa-social-media-links-and-ticket-stub-for-dept-template.js"></script> 
	
		<xsl:call-template name="unparsed-include-file">
			<xsl:with-param name="path">/_resources/includes/footer-cvpa.inc</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template name="common-header">
		<xsl:call-template name="unparsed-include-file">
				<xsl:with-param name="path">/_resources/includes/header-cvpa.inc</xsl:with-param> 
		</xsl:call-template>
		
		<!-- BEGIN: This section is for the event listings -->
		<script src="/_resources/js/fadeInAnimation.js" />
		    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
			<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
		
		<script type="text/javascript" src="/_resources/js/custom.js"></script>
		
		<script>
			$(".description p").addClass("description");
			
			$(".btn-primary").closest(".description").removeClass();
			
			$(document).ready(function() {
		$('.faq_title').click(function(){
  $(this).toggleClass('active');
  $(this).parent().find('.arrow').toggleClass('arrow-animate');
  $(this).parent().find('.content').slideToggle(280);
});
			});

		</script>
		<script src="/_resources/js/cvpa-events-checkboxes.js"></script>
		
		<!-- END: This section is for the event listings -->
		
	</xsl:template>
</xsl:stylesheet>
