function ClipView(settings, player) {
	this.ClipInfoDiv= $("#"+settings.clipInfoDiv);
	this.CurrentClip= null;
	
	// make sure we have the clip-info class...
	this.ClipInfoDiv.addClass("clip-info");
	
	this.Refresh= function(clip) {
		this.CurrentClip= clip;
		
		// do some formatting...
		var string= clip.Title+'<br/>'+clip.Author+'<br/>'+clip.Abstract+'<br/>'+clip.Copyright;
		// Title
		// Series Link
		// Duration | Star Rating
		// Description
		this.ClipInfoDiv.html(string);
	}
	this.SetRelease= function(release) {
		// do some formatting...

// agency matrix system.
if(false) {
		$('#the_clip_title').html(release.title);
		$('#the_clip_description').html(release.description);
		return;
}
		
//		this.ClipInfoDiv.empty();
		
		$('img', this.ClipInfoDiv).attr('src', release.thumbnailURL);
		$('img', this.ClipInfoDiv).attr('alt', release.title);
		var thumbnail_dimensions= release.td.split('-');
		if(thumbnail_dimensions.length==2) {
			$('img', this.ClipInfoDiv).attr('width', thumbnail_dimensions[0]);
			$('img', this.ClipInfoDiv).attr('height', thumbnail_dimensions[1]);
		}
		$('img', this.ClipInfoDiv).show();

		$('.title', this.ClipInfoDiv).html(release.title);
		$('.description', this.ClipInfoDiv).html(release.description);
		$('.long_description', this.ClipInfoDiv).html(release.longDescription);
		$('.author', this.ClipInfoDiv).html(release.author);
//		$('.copyright', this.ClipInfoDiv).html(release.copyright);

		this.ClipInfoDiv.show(); // make sure it's visible.

		return;
		
		var contents= '<div class="clipInfoRight">';
		contents+= '<div>***** (n votes)</div>';
		contents+= '<div>[] Add to Favorites</div>';
		contents+= '<div>&nbsp;</div>';
		contents+= '<div style="background-color: white">Random comment from a customer</div>';
		contents+= '<div style="float: right">-- rmartell</div>';
		contents+= '</div>'
		contents+= '<div class="clipInfoLeft">';
		contents+= '<h2>'+release.title+'</h2>';
		contents+= '<div class="description">'+release.description+'</div>';
		contents+= '</div>';

		var contents= '<div class="clipInfo">';
		contents += '<div class="thumb"><img src="'+release.thumbnailURL+'" width="100" height="100" alt="'+release.title+'"/></div>';
		contents += '<div class="description"><strong>'+release.title+'</strong><br/>'+release.description+'</div>';

		$(contents).appendTo(this.ClipInfoDiv);
return;
		
		/*
		stars: -1
		avg-stars: -1
		EpisodeCode: 2_PRM_07001
		favorite: false
		title: Creating the Marketing Mindset
		author: Ford Saeks
		airdate:
		avg-stars-count: 0
		length: 83000
		description: Ford Saeks walks you through the steps of creating YOUR Marketing Mindset using a visual mind map.
		*/
		$('<h2>'+release.title+'</h2>').appendTo(this.ClipInfoDiv);
		var starSection= '<div class="description"><ul><li class="first">'+player.ReleaseModel.DurationString(release.length)+'</li>';
		starSection+= '<li class="rating">';
		var starDescriptions= ["Poor", "Below Average", "Average", "Good", "Excellent"];
		for(var jj= 0; jj<5; jj++)
		{
			starSection += '<input type="radio" name="'+release.EpisodeCode+'" class="star" value="'+starDescriptions[jj]+'"';
			if(jj==Math.round(release["avg-stars"])) starSection+= 'checked="checked"'; // use partial stars..
			starSection += '/>';
		}
		starSection += '</li>';
		starSection+= '<li>('+release["avg-stars-count"]+' votes)</li>'; // release.stars, release["avg-stars"]
		starSection+= '</ul></div>'
		$(starSection).appendTo(this.ClipInfoDiv);

		$('<div class="description">'+release.description+'</div>').appendTo(this.ClipInfoDiv);
		
		if(player.WebService.Authenticated())
		{
			$('<div class="description"><span class="favorite-adjust"></span></div>').appendTo(this.ClipInfoDiv);
		}
		
		// setup the rating
		$('.star', this.ClipInfoDiv).rating({
			required: true,
			readOnly: true
/* 
			readOnly: !releaseModel.Player.WebService.Authenticated(), 
			callback: function(value, link) { 
					var starValue;
					for(var aa=0; aa<starDescriptions.length; aa++)
					{
						if(starDescriptions[aa]==value)
						{
							starValue= aa; // 0-4 ranking
							break;
						}
					}
					releaseModel.Player.WebService.Rate(
						$(this).attr('name'), starValue, 
						function(statusCode, jsonData) {
							releaseModel.Load();
						});
				} 
*/
			});


		// now setup the link to add to/remove from favorites..
		$(".favorite-adjust", this.ClipInfoDiv).unbind("click");
		$(".favorite-adjust", this.ClipInfoDiv).each(function(pos) {
			var button= $(this);
		
			if(release.favorite) {
				$(this).html("Remove from Favorites");
			} else {
				$(this).html("Add to Favorites");
			}
			$(this).bind("click", function(e) {
				player.WebService.AddOrRemoveFromFavorites(
					(release.favorite)?'del':'add', 
					release.EpisodeCode, 
					function(statusCode, jsonData, rm) {
						release.favorite= !release.favorite;
						if(release.favorite) {
							button.html("Remove from Favorites");
						} else {
							button.html("Add to Favorites");
						}							
						player.ReloadAll(false);
						
					}, player.ReleaseModel);
			});
		});
		
		//var string= release.title+'<br/>'+release.Author+'<br/>'+clip.Abstract+'<br/>'+clip.Copyright;
		// Title
		// Series Link
		// Duration | Star Rating
		// Description
		// this.ClipInfoDiv.html(string);
	};
}
