﻿////////////
// GLOBAL //
////////////

var params = 
{
	// properties of the embed and object html tags
	menu: 	"true",
	scale: 	"noscale", 
	wmode: 	"transparent"
};

/////////////////////////////////
// Header videoPlayer varibles //
/////////////////////////////////
var flashvars = 
{
	//custom flash vars go here as JavaScript object properites
	//use native data types where necessary i.e. Boolean, Number, String
	xmlPath: path + "/content/xml/live/home.xml",
	siteRoot: path
};

var attributes = 
{
	// any custom HTML attributes
	id: 	"flashMovie",
	name: 	"flashMovie"
};



///////////////////////////////
// Header video Player embed //
///////////////////////////////

// does the actual embed, replace all values wrapped in <>
swfobject.embedSWF(path + "/flash/SBA-NonStops.swf", "flashMovie", "499", "324", "9.0.0", "js/swfobject/expressInstall.swf", flashvars, params, attributes);

function LoadMapData(location)
{
	new Request.HTML({
		url: path + '/travel_info/ajaxMapData.rails',
		update: 'ajaxBottom'
	}).post({'location':  location});
}

window.addEvent('domready', function() {
	$$('#smallRightCol a').addEvent('click', function(e)
	{
		e.stop();
		
		var url = this.getProperty('href').split('/');
		
		LoadMapData(url[url.length - 1]);
	});
});