// =============================================================================
//
// DIG CMS Template                                                             
//                                                                      
//  $Rev: 823 $
//  $Author: herzog $
//  $Date: 2011-02-07 13:20:49 +0100 (Mo, 07 Feb 2011) $
//
// =============================================================================

/*
 * Funktion zum einbetten von BC-Videos.
 * 
 * playerId: PlayerId
 * videoId: VideoId
 * config: optional - dient dazu die portalspezifische Standardkonfiguration zu überschreiben
 * 		   Bsp: video(234234,123434,{token:'irgendwas',width:'500',dir:'www.irgendwas.de',postfix:'irgendein Postfix'});
 * 		   Anmerkung: es müssen nur die Parameter angegeben werden, die überschrieben werden sollen
 */
function video(playerId, videoId, config) {
	
	if(playerId && videoId) {
		
		try {
			
			bc_widget_single(
					
					{
						'token':config && config.token ? config.token : BC_VIDEO_PARAM_TOKEN,
						'dir':config && config.dir ? config.dir : BC_VIDEO_PARAM_DIR,
						'width':config && config.width ? config.width : BC_VIDEO_PARAM_WIDTH,
						'postfix':config && config.postfix ? config.postfix : BC_VIDEO_PARAM_POSTFIX,
						'videoIds':[videoId],
						'playerIds':[playerId]
					}
					
							);
		} catch(err) {}
	}
}

