PODS = {};
var st_left;
var st_right;

function defaultDisp(flag) {
	if (!flag) {
		return 'none';
	} else {
		return 'inline';
	}
}

PODS.droidX = function(isDefault) {
	var content = $(document.createElement('div')).addClassName('pod_content').setStyle({'display':'none'});
	content.id = 'pod_droidX';
	content.setStyle({'display':defaultDisp(isDefault)});

	var htmlString = '<img src="images/pods/droidx_bg.png" class="png" style="position:absolute;top:0px;left:0px;" alt="Droid X" />';
		htmlString += '<img src="images/pods/droidx_phone.png" class="png" style="position:absolute;top:0px;left:0px;" alt="Droid X" />';
		htmlString += '<div style="position:absolute;top:55px;left:90px;width:320px;">';
		htmlString += '<p class="headline" style="font-size:13px">SPEED ON SCREEN, SPEED BEHIND THE SCREEN</p>';
		htmlString += '<p class="copy" style="width:270px">Feast your action-hungry eyes on the massive 4.3" screen with a turbocharged 1Ghz processor.</p>';
		htmlString += '</div>';
		htmlString += '<a href="http://www.droiddoes.com/" target="_blank" name="&lid=droidx+pod+clicked"><img src="images/pods/droidx_btn.png" class="png" style="position:absolute;top:106px;left:264px;" alt="Discover DroidX" /></a>';

	content.insert(htmlString);

	return content;
}

PODS.power_road = function(isDefault) {
	var content = $(document.createElement('div')).addClassName('pod_content').setStyle({'display':'none'});
	content.id = 'pod_power_road';
	content.setStyle({'display':defaultDisp(isDefault)});

	var htmlString = '<img src="images/pods/power_signal.jpg" style="position:absolute;top:0px;left:0px;" alt="Will Power" />';
		htmlString += '<div style="position:absolute;top:25px;left:145px;width:265px;">';
		htmlString += '<p class="headline" style="font-size:13px">CONGRATS TO POWER ON ROAD COURSE TROPHY WIN!</p>';
		htmlString += '<p class="copy" style="width:270px;margin-top:5px;">We&#39;re proud of #12 for winning the 1st Mario Andretti Trophy, and the rest of Verizon Team Penske for their successful season! See more with V CAST Video on Demand.</p>';
		htmlString += '<p class="copy"><span style="font-weight:bold;">&gt; <a href="multimedia/applications.htm" style="color:#FFFFFF;" name="&lid=power+trophy+pod+clicked">Text <span style="color:#E10000;">INDY</span> to <span style="color:#E10000;">3406</span> for the Sleek New App</a></span></p>';
		htmlString += '</div>';

	content.insert(htmlString);

	return content;
}

function initPods() {
	$('pod_left').insert(PODS.droidX(true));
//	$('pod_left').insert(PODS.vcast(false));
	$('pod_right').insert(PODS.power_road(true));
//	$('pod_right').insert(PODS.skype(false));
//	st_left = setInterval('swapPods("pod_storm2","pod_vcast")',4000);
//	st_right = setInterval('swapPods("pod_power_road","pod_skype")',4000);
}

// swap pod images
function swapPods(pod1,pod2){
	$(pod1).toggle();
	$(pod2).toggle();
}
