function VideoPreview() {

	var hasImagePreviewContainer = false;
	var arrVideos = new Array(1);
	
	this.add = function(videoURL) {
		var objVideo = new Object();
		var arrIndex = arrVideos.length;
		objVideo.videoURL = videoURL;
		
		return arrIndex;
	}
	
	this.previewVideo = function(videoID) { 

		
		if (!hasImagePreviewContainer) {
			$("body").prepend("<div id=\"videoPreview\"><div id=\"video\"><div class=\"blank\">&nbsp;</div></div></div>")
			$("#videoPreview").css("padding",2);
			hasImagePreviewContainer = true;
		}
		//$("#imageLoading").show();
		if ( $("#videoPreview").modal( { onClose: function (dialog) { $.modal.close(); } } ) ) {
			$("#simplemodal-container").hide();
			$("#simplemodal-container").fadeIn();
		}
	
// set the window size
	var win_width = 770;
	var win_height = 370;
	
	$("#videoPreview").css("width",win_width);
	$("#videoPreview").css("height",win_height);

	$.modal.setPosition();	
	
	//create the content for the inner window
	var this_content = "";
	this_content += "<iframe width='"+win_width+"' height='"+win_height+"' frameborder='0' scrolling='no' allowtransparency='true' ";
	this_content += "src='" + videoID;
	this_content += "'></iframe>";
	$("#videoPreview #video").html(this_content);
	
	}

}