﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>



    <xsl:template match="/">
        <xsl:variable name="VideoURL" select="normalize-space(AjaxRequest/Params/VideoURL)"></xsl:variable>
        <xsl:variable name="Origin" select="AjaxRequest/Params/Origin"></xsl:variable>     

        <xsl:choose>
            <xsl:when test="$Origin = 'Action'">
                <iframe src="http://player.vimeo.com/video/{$VideoURL}?autoplay=1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1"
                        width="490"
                        height="350"
                        frameborder="0">
                </iframe>
            </xsl:when>
            <xsl:otherwise>
                <iframe src="http://player.vimeo.com/video/{$VideoURL}?autoplay=1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1"
                       width="690" height="388"
                        frameborder="0">
                </iframe>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
</xsl:stylesheet>
