

VideoGallery_View = Class.create();
VideoGallery_View.prototype = {
		
	width : 260,
	height : 240,
	container : '',
	prev_video : 0,
	
	initialize : function(width, height , container ) {
        this.width = width;
        
        this.height = height;
        
        this.container = container;
    },
	
	setVideo : function( provider , video_id , url )
	{	
    	if( !video_id )
    		return false;
    	
    	if( this.prev_video )
    		Element.hide('video-container-' + this.prev_video );
    	
    	this.prev_video = video_id;
    	
    	Element.show( 'video-container-' + video_id );
		
		return false;
	},
	
	setHeight : function ( height )
	{
		this.height = height;
	},
	setWidth : function( width )
	{
		this.width = width;
	},
	grow : function()
	{
		if( $('video-container-' + this.prev_video + ' video-object' ).getWidth() > 300 )
			return this.shrink();
		
		new Effect.Scale( 'video-container-' + this.prev_video + ' video-object' , 240 );
		Element.show( 'video-shrink');
		Element.hide( 'video-grow');
	},
	shrink : function( )
	{
		new Effect.Scale('video-container-' + this.prev_video + ' video-object' , 41.667 );
		Element.show('video-grow');
		Element.hide('video-shrink');
	}
}
