Ape.Element.videoteaser_sidecol = function() {
	var that 			= this,
		videos 			= [],
		current_video	= 0,
		new_current_vid = 0;
	
	/* Basics */
	this.start = function() {
		$('#videoteaser_play').bind('click', function() {
			
			if(parseInt(that.videos[that.current_video].Video_ID,10) > 0){
				
				var videoID = that.videos[that.current_video].Video_ID;
				
				var objectTag = '<object id="flashObj" width="278" height="200" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
				objectTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">';
				objectTag += '<param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/71778043001?isVid=1&publisherID=67005934001"/>';
				objectTag += '<param name="bgcolor" value="#FFFFFF"/>';
				objectTag += '<param name="flashVars" value="@videoPlayer='+videoID+'&playerID=71778043001&domain=embed&"/>';
				objectTag += '<param name="base" value="http://admin.brightcove.com"/>';
				objectTag += '<param name="seamlesstabbing" value="false"/>';
				objectTag += '<param name="allowFullScreen" value="true"/>';
				objectTag += '<param name="swLiveConnect" value="true"/>';
				objectTag += '<param name="allowScriptAccess" value="always"/>';
				objectTag += '<embed src="http://c.brightcove.com/services/viewer/federated_f9/71778043001?isVid=1&publisherID=67005934001" ';
				objectTag += 'bgcolor="#FFFFFF" flashVars="@videoPlayer='+videoID+'&playerID=71778043001&domain=embed&" ';
				objectTag += 'base="http://admin.brightcove.com" name="flashObj" width="278" height="200" seamlesstabbing="false" ';
				objectTag += 'type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" ';
				objectTag += 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
				objectTag += '</object>';
				
				$('#videoteaser_video').html(objectTag);
			}else{
				$('#videoteaser_video').html(that.videos[that.current_video].HTML);
			
				var breite_neu 	= 278,
					hoehe_neu	= 157;
				
				$('#videoteaser_video object').attr('width', breite_neu);
				$('#videoteaser_video object').attr('height', hoehe_neu);
				$('#videoteaser_video object embed').attr('width', breite_neu);
				$('#videoteaser_video object embed').attr('height', hoehe_neu);
			}
			
			
			
			$('#videoteaser_play').hide();
			$('#videoteaser_preview').hide();			
			$('#videoteaser_video').show();
			
			statistikclick();
		});
		
		$('#videoteaser_select_0').bind('click', function() {
			that.new_current_vid = 0;
			that.change_video();
		});
		
		$('#videoteaser_select_1').bind('click', function() {
			that.new_current_vid = 1;
			that.change_video();
		});

		$('#videoteaser_select_2').bind('click', function() {
			that.new_current_vid = 2;
			that.change_video();
		});
		
		$('#videoteaser_select_3').bind('click', function() {
			that.new_current_vid = 3;
			that.change_video();
		});
		
		$('#videoteaser_video_0').bind('click', function() {
			that.new_current_vid = 0;
			that.change_video();
		});
		
		$('#videoteaser_video_1').bind('click', function() {
			that.new_current_vid = 1;
			that.change_video();
		});

		$('#videoteaser_video_2').bind('click', function() {
			that.new_current_vid = 2;
			that.change_video();
		});
		
		$('#videoteaser_video_3').bind('click', function() {
			that.new_current_vid = 3;
			that.change_video();
		});		
	};
	
	this.change_video = function() {
		if (that.current_video != that.new_current_vid) {
			$('#videoteaser_video').hide();
			$('#videoteaser_video').html('');
			$('#videoteaser_play').show();
			$('#videoteaser_preview').show();			
			
			$('#videoteaser_video_'+that.current_video).removeClass('aktiv');
			$('#videoteaser_select_'+that.current_video).show();
			
			$('#videoteaser_video_'+that.new_current_vid).addClass('aktiv');
			$('#videoteaser_select_'+that.new_current_vid).hide();	
			$('#videoteaser_preview').html(that.videos[that.new_current_vid].Bild_Gross);
			$('#videoteaser_dachzeile').html(that.videos[that.new_current_vid].Dachzeile);
			$('#videoteaser_ueberschrift').html(that.videos[that.new_current_vid].Ueberschrift);
			
			that.current_video = that.new_current_vid;
			statistikclick();
		}		
	};

};