(function(){

/*
	Class: LightBoxCommentView 
	The class for a making comments tree
*/
function LightBoxCommentView() { }

//LightBoxCommentView extends CommentView.  
YAHOO.lang.extend( LightBoxCommentView, window['SB']['ui']['CommentView']);

LightBoxCommentView.prototype.toString = function() { return "[SB.ui.LightBoxCommentView]"; };

LightBoxCommentView.prototype.setConfig = function( inObj )
{
	SBui.LightBoxCommentView.superclass.setConfig.call(this, { comment_obj:inObj.comment_obj, template:"listview_comment", depth:0 } );

	YUIDom.setStyle( this.htmlObj, "max-width", "none" );
	YUIDom.setStyle( this.htmlObj, "width", "100%" );

	var color = "0";
	if( inObj.comment_obj.color )
		color = inObj.comment_obj.color;

	var bgcolor = "bgcolor"+color;
	var pointer = "pointer"+color;

	//Set the color of the bubble
	YUIDom.addClass( YUIDom.getElementsByClassName("bb1","b",this.htmlObj) , bgcolor);
	YUIDom.addClass( YUIDom.getElementsByClassName("bb2","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("bb3","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("bb4","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("bb5","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("bb6","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("bb7","b",this.htmlObj) , bgcolor);
	YUIDom.addClass( YUIDom.getElementsByClassName("bb8","b",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("sb_box_list_view_comment_item","div",this.htmlObj) , bgcolor);	
	YUIDom.addClass( YUIDom.getElementsByClassName("pointerarrow","div",this.htmlObj) , pointer);

	if( inObj.noreply )
	{
		YUIDom.getElementsByClassName("reply_button", "div", this.htmlObj, function(el) { YUIDom.setStyle( el, "display","none" ); } );	
	}
};

window['SB']['ui']['LightBoxCommentView'] = LightBoxCommentView;


})();
