

	if((typeof AFL_JS == 'undefined') || (typeof AFL_JS.Common == 'undefined'))
		throw("AFL_JS.VideoPlayer requires the AFL JavaScript framework");
	
	if((typeof FAVideo == 'undefined'))
		throw("AFL_JS.VideoPlayer requires the FAVideo class.");
	
	if((typeof AC_SW_RunContent == 'undefined'))
		throw("AFL_JS.VideoPlayer requires the AC_RunActiveContent class.");
	
	var FAV = AFL_JS.VideoPlayer = new Object();
	
	FAV.Settings = {
		BasePath : '/assets/js/FAVideo/'
	}
	
	FAV.Storage = {};
	
	FAV.Initialize = function(oContainer, sMoviePath, iWidth, iHeight, oOptions) {
		oOptions = oOptions || {}
		oContainer = $(oContainer);
		FAV.Storage[oContainer.id] = new FAVideo(FAV.Settings.BasePath, oContainer.id, sMoviePath, iWidth, iHeight, oOptions);
		return FAV.Storage[oContainer.id];
	}
	
	FAV.Load = function(oContainer, sMoviePath, bAutoPlay) {
		oContainer = $(oContainer);
		FAV.Storage[oContainer.id].load(sMoviePath);
		if(bAutoPlay) {
			FAV.Storage[oContainer.id].play();
		}
	}
	
	FAV.GetInstance = function(oContainer) {
		oContainer = $(oContainer);
		return FAV.Storage[oContainer.id];
	}

