function videoPopup(xmlPath){
	this.xmlPath = xmlPath;
	this.shadowBoxObj = new shadowBox('div#shadowBox');
	
	this.init();
}

videoPopup.prototype = {
	init: function(){
		var instance = this;
		$('a.popupVideoLink').click(function(){
			instance.shadowBoxObj.showShadowBox('videoPopupContainer');
			instance.loadVideo($(this).attr('rel'));
		});
		
		$('div#videoPopupClose a').click(function(){
			instance.closeVideo();
		});
	},
	
	loadVideo: function(firstVideo){
		var flashvars = {
			xmlPath: this.xmlPath,
			firstVideo: firstVideo
		};
		swfobject.embedSWF("../videoJukebox/videoJukebox.swf", "videoPopup", "645", "380", "9.0.0","../includes/swf/expressInstall.swf", flashvars);
	},
	
	closeVideo: function(){
		swfobject.removeSWF('videoPopup');
		$('div#videoPopupContainerShadow').append('<div id="videoPopup"></div>');
		this.shadowBoxObj.hideShadowBox('videoPopupContainer');
	}
}