/**
 * @author Aaron Static
 */


Ext.namespace('AaronStatic');

AaronStatic.Main = Ext.extend(Ext.Container, {
	layout: {
		type: 'column'
		
	},	
	defaults: {		
		border: false
	},
	initComponent: function(){
		var left = new Ext.Panel({
			columnWidth: 0.6,				
			padding: '0px 10px 0px 0px',
			items: [new AaronStatic.Clips({
				height: 1180
			})]
		});
		var right = new Ext.Panel({
			columnWidth: 0.4,
			height: 1200,
			layout: 'vbox',
			layoutConfig: {				
				align: 'stretch',
				pack: 'start'
			},
			defaults: {
				margins: {top:0, right:0, bottom:20, left:0}
			},	
			padding: '0px 0px 0px 10px',
			items: [new Ext.ux.Media.Flash.Panel({
				height: 340,
				frame: true,
				mediaCfg: {
					url: 'http://www.youtube.com/v/o0x9522TA9A&hl=en&fs=1',
					params: {
						allowfullscreen: true,
						scripting: 'always'
					}
				},
				title: ' ',				
				iconCls: 'icon-youtube-big',
				html: 'test'
			}),new AaronStatic.Downloads({
				height: 150
			}),new AaronStatic.NewsFeed({
				flex: 1
			})]
		});
		Ext.apply(this,{
			items: [left,right]
		});
		AaronStatic.Main.superclass.initComponent.call(this, arguments);
	}
});
Ext.onReady(function(){
	Ext.QuickTips.init();
	var app = new AaronStatic.Main({
		renderTo: 'container'		
	});
	
	var tabs = new Ext.TabPanel({
		renderTo: 'tabpanel',
		activeItem: 0,
		height: 190,
		layoutConfig: {
			animate: true
		},
		defaults: {			
			autoScroll: true,
			frame: true
		},
		items: [{
			title: 'Interact',
			html: '<a href="http://www.beatport.com/artist/Aaron+Static"><img src="images/banners/aaronstatic-beatport.jpg"/></a>',
			tbar: [{
				xtype: 'linkbutton',
				href: 'http://www.virb.com/aaronstatic',
				target: '_blank',
				id: 'virb-button',
				cls: 'network-button',				
				iconCls: 'btn-virb'				
			},{
				xtype: 'linkbutton',
				href: 'http://www.facebook.com/pages/Aaron-Static/10371333604',
				target: '_blank',
				id: 'facebook-button',
				cls: 'network-button',				
				iconCls: 'btn-facebook'				
			},{
				xtype: 'linkbutton',
				href: 'http://www.twitter.com/aaronstatic',
				target: '_blank',
				id: 'twitter-button',
				cls: 'network-button',				
				iconCls: 'btn-twitter' 
			},{
				xtype: 'linkbutton',
				href: 'http://www.myspace.com/aaronstatic',
				target: '_blank',
				id: 'myspace-button',
				cls: 'network-button',				
				iconCls: 'btn-myspace' 
			},{
				xtype: 'linkbutton',
				href: 'http://www.last.fm/user/aaronstatic',
				target: '_blank',
				id: 'lastfm-button',
				cls: 'network-button',				
				iconCls: 'btn-lastfm' 
			}]
		}]
	});
	var tip = new Ext.ToolTip({
		target: 'virb-button',
        anchor: 'top',
        html: 'Follow me on Virb',
		hideDelay: 100,
		showDelay: 0
	});
	var fbTip = new Ext.ToolTip({
		target: 'facebook-button',
        anchor: 'top',
        html: 'Become a fan on Facebook',
		hideDelay: 100,
		showDelay: 0
	});
	var twitterTip = new Ext.ToolTip({
		target: 'twitter-button',
        anchor: 'top',
        html: 'Follow me on Twitter',
		hideDelay: 100,
		showDelay: 0
	});
	var myspaceTip = new Ext.ToolTip({
		target: 'myspace-button',
        anchor: 'top',
        html: 'Become a friend on Myspace',
		hideDelay: 100,
		showDelay: 0
	});
	var lastfmTip = new Ext.ToolTip({
		target: 'lastfm-button',
        anchor: 'top',
        html: 'Become a friend on Last.fm',
		hideDelay: 100,
		showDelay: 0
	});
});