

activemenu = 0;

Ext.namespace('VD');

VD.CenterPanel = Ext.extend(Ext.Panel, {
	curText: 1,
	initComponent: function (){		
		var config = {	
			layout: {
		        type:'vbox',	
				overflow:"auto",				
		        align:'stretch'
		    },
			items:[
			/*{
				xtype: 'box',
				id: 'investor-link-container',				
				html:'<a href="investor.php" style="float:right;" ><img src="http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/investor-reg.png" onmouseover="this.src=' + "'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/investor-over.png'" + '" onmouseout="this.src=' + "'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/investor-reg.png'" + '" onmousedown="this.src=' + "'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/investor-down.png'" + '" onmouseup="this.src=' + "'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/investor-over.png'" + '" ></a>'					
			},*/{
				xtype: 'container',
				id: 'home-player-container',			
				layout: {
					overflow:"auto",
			        type:'vbox',	        
			        align:'center'
			    },
				items:[{				
					id: 'player',
					xtype: 'box'		
				}]
			},{
				xtype: 'container',
				layout: 'column',
				id: 'home-content',
				height: 200,
				cls: 'content',
				defaults: {
					xtype: 'container'
				},
				items: [{
			        columnWidth: .5,
			        contentEl: 'content-left'
	
				},{
			        columnWidth: .5,
			        contentEl: 'content-right'
				}]
			}]
		};
		Ext.apply(this, config);
		Ext.apply(this.initialConfig, config);
		VD.CenterPanel.superclass.initComponent.call(this);
		
		flowplayer("player", "flowplayer/flowplayer-3.1.5.swf",{
			plugins: {
			   controls: {
				  volumeSliderColor: '#000000',
			      tooltipTextColor: '#ffffff',
			      buttonColor: '#002e33',
			      durationColor: '#37be3e',
			      timeColor: '#209c9d',
			      tooltipColor: '#5F747C',
			      buttonOverColor: '#137c2a',
			      volumeSliderGradient: 'none',
			      borderRadius: '10',
			      sliderColor: '#843f10',
			      backgroundGradient: 'high',
			      bufferGradient: 'none',
			      backgroundColor: 'gray',
			      progressColor: '#209d33',
			      bufferColor: '#133d58',
			      sliderGradient: 'none',
			      progressGradient: 'medium',
			      timeBgColor: '#555555',
			      height: 24,
			      opacity: 1.0
			   }
			},
			clip: {
				autoPlay: true,
				autoBuffering: true,
				url: 'http://dhihoamb9m6x3.cloudfront.net/venus-teaser.flv'
			}
		});

		this.playAnim = new Ext.util.DelayedTask(function(){
			Ext.get('s'+this.curText).fadeOut();
			this.curText++;
			if (this.curText>4) this.curText=1;
			Ext.get('s'+this.curText).fadeIn();
			this.playAnim.delay(5000);
		}, this);
		
		this.playAnim.delay(5000);
		
		Ext.get('explore').on({
			mouseover : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-explore_hi.png';
			},
			mouseout : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-explore.png';
			},
			mousedown : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-explore_on.png';
			},
			mouseup : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-explore.png';
			}
		});
		
		Ext.get('getstarted').on({
			mouseover : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-getstarted_hi.png';
			},
			mouseout : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-getstarted.png';
			},
			mousedown : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-getstarted_on.png';
			},
			mouseup : function(e,t){
				t.src = 'http://d33yedrtgjxwfm.cloudfront.net/visualdomains/img/img/btn/btn-getstarted.png';
			}
		});
	}
});

Ext.reg('vd_center', VD.CenterPanel);

include('flowplayer/flowplayer-3.1.4.min.js');

