var initSWFAddressPaths = SWFAddress.getPathNames();

function hideNews() { jQuery('#whats-new').stop().animate({ right:-258 }, 400); };
function showNews() { jQuery('#whats-new').stop().animate({ right:0	 }, 400); };
function flashLoaded(msg) { jQuery('#flashFeature').css({ top:0, left:0 }); jQuery('#features a').remove(); };
function openLinkInWindow(urlStr) { 
	var newWin = window.open(urlStr, "popup", "width=1024,height=670"); 
	if(!newWin) { window.location = urlStr; };
};
function forceTrack(urlStr) { pageTracker._trackPageview(urlStr+'/'); };

(function($) {
	$.easing.def = "easeOutExpo";
	$(document).ready(function() {
		$('#body').css({ position:'relative', overflow:'hidden' });
		$('#features').css({ position:'relative' });
		_loadFlashFeatures();
		if(initSWFAddressPaths.length>0 && getFlashVersion().split(',').shift() >= 9) flashLoaded();
	});
	
	function _loadFlashFeatures() {		
		$('<div id="flashFeature"></div>').appendTo($('#features'));
		var bh = String(window.location).split('/');
		swfobject.embedSWF("/flash/homeTrio.swf?v=2.2.1", "flashFeature", "742", "530", "9.0.0","/flash/expressInstall.swf", { baseHREF:bh[0]+'//'+bh[2]+'/', trioID:$('#features').attr('rel') }, { menu:"false", wmode:"opaque", bgColor:'#2E2E2E', allowFullScreen:"true", allowScriptAccess:"sameDomain" }, { style:'position:absolute; top:-529px; left:483px;' });
		$('#whats-new').css({ background:'#000000', position:'absolute', zIndex:11, right:0, top:0});
	};
})(jQuery);

function getFlashVersion(){ try { try { var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); try { axo.AllowScriptAccess = 'always'; } catch(e) { return '6,0,0'; }} catch(e) {} return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; } catch(e) { try { if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; }} catch(e) {}; }; return '0,0,0'; };