﻿if (!window.RCDN)
	window.RCDN = {};

RCDN.logo = function() 
{
}

RCDN.logo.prototype =
{
	handleLoad: function(plugIn, userContext, rootElement) 
	{
		this.plugIn = plugIn;
		
		// Sample button event hookup: Find the button and then attach event handlers
		// this.button = rootElement.children.getItem(0);	
		
		// this.button.addEventListener("MouseDown", Silverlight.createDelegate(this, this.handleMouseDown));
		
        //  Get a reference to your media element (mine is called "MainMovie")          
        this.logoani = this.plugIn.content.findName("logoani");
        // Add an Event Listener for the "MediaEnded" Event
       this.logoani.addEventListener("MediaEnded", Silverlight.createDelegate(this,this.logoEnded));

	},
	
	//When the end of the movie is reached, return the movie to the start and play it again
    logoEnded: function(sender, eventArgs)
    {
        sender.Position = "00:00:00";
        sender.play();
    } 
}

function LogoCompleted(sender, eventArgs) {
	sender.findName("logo").Begin();
}

function OnMouseLeftButtonUp(sender, eventArgs) {
    window.location.href = "/";
}