function homeEvent(eventid) {
	logItem("homeEvent called with event ID = " + eventid);
	
	//not starting eventCode with '/' for home page...
	var eventCode = "EVENT/flash/tile/TO/";
	
	switch(eventid) 
	{
		case 'maincta':
			//event code for "main flash call to action" - not one of the normal tiles
			trackEvent('EVENT/flash/maincta/TO/fbThoseWhoKnow');
			window.open(DKO.fbse2curl + '/know.jsp?src=dcwebhmcta');
			break;
		case 'se2boost':
			trackEvent(eventCode + 'fbGetBoost');
			window.open(DKO.fbse2curl + '/boost.jsp?src=dcwebhmtil');
			break;
		case 'se2tips':
			trackEvent(eventCode + 'fbTipsTricks');
			window.open(DKO.fbse2curl + '/tips.jsp?src=dcwebhmtil');
			break;
		case 'sswatch':
			trackEvent(eventCode + 'ssWatch');
			location.href='/styleseries/';
			break;
		case 'sevids':
			trackEvent(eventCode + 'stayExtraCommercials');
			showJQM('sevids');
			break;
		case 'ht2010':
			trackEvent(eventCode + 'theHeartTruth');
			location.href='/hearttruth/';
			break;
		case 'ce':
			trackEvent(eventCode + 'kitchen');
			location.href='/cooking-entertaining.jsp';
			break;
		case 'sstc':
			trackEvent(eventCode + 'videoNobody');
			showJQM('tom');
			break;
		case 'op':
			trackEvent(eventCode + 'ourProducts');
			location.href='/about-diet-coke/our-products.jsp';
			break;
		case 'mcr':
			trackEvent(eventCode + 'myCokeRewards');
			window.open(DKO.mcrdkolbe);
			break;
		default:
			break;
	}
}

function showJQM(tile) 
{
	$('.tomCWrapper').jqmShow();
	
	if (tile == 'tom') 
	{
		var flashvars = {};
		var params = { wmode: 'transparent' };
		var attributes = {};
		swfobject.embedSWF('/inc/obj/tom/sampleVideoTC.swf?v=' + DKO.swfvrsnId, 
							'tomC', '575', '450', '9.0.0', 
							null, flashvars, params, attributes);
	}
	else if (tile == 'sevids') 
	{
		var flashvars = { xmlPath: '/inc/obj/home/xml/video_commercials.xml?v=' + DKO.swfvrsnId };
		var params = {
			menu: 'false',
			scale: 'noscale',
			allowscripaccess: 'always',
			wmode:'transparent'
			};
		var attributes = {};
		swfobject.embedSWF('/inc/obj/home/video_commercials.swf?v=' + DKO.swfvrsnId, 
							'tomC', '575', '450', '9.0.0',
							null, flashvars, params, attributes);
	}
}
				
$(document).ready(function () 
{
	if ($.hasFlashPlayerVersion('9')) 
	{
		$('#homeFlash').hide().flash( { 
			swf:'/inc/obj/home/Dock.swf?v=' + DKO.swfvrsnId,
			height:650,
			width:990,
			flashvars: {
				xmlPathName :'/inc/obj/home/xml/dock.xml?v=' + DKO.swfvrsnId
			},
			params: {
				wmode:'transparent'
			}
		}).show();
	}
	
	if ($.jqm) 
	{
		$('.tomCWrapper').jqm();
	}
});
