﻿if (!window.LandingVideo)
	LandingVideo = {};

LandingVideo.Page = function() 
{
}

LandingVideo.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;    
        this.movie = control.content.findName("landingPlayer");
        // Add an Event Listener for the "MediaEnded" Event
      	this.movie.addEventListener("MediaEnded", Silverlight.createDelegate(this,this.movieMediaEnded));
    }, 

    //When the end of the movie is reached, return the movie to the start and play it again
    movieMediaEnded: function(sender, eventArgs)
    {
        sender.Position = "00:00:00";
        sender.play();
    },

	
	// Sample event handler
	handleMouseDown: function(sender, eventArgs) 
	{
		// The following line of code shows how to find an element by name and call a method on it.
		// this.control.content.findName("Storyboard1").Begin();
	}
}