// JavaScript Document
var flashObj;

window.addEvent('domready',function(){
    $('mainnav').getElements('li').addEvents({
										'mouseover':function(){this.addClass('selected');},
										'mouseout':function(){this.removeClass('selected');}
								   });
	
	flashObj=new Swiff('homepageFlash.swf',{
		id: "flash0",			   
		height:222,
		width:628,
		params:{wMode:'transparent',allowScriptAccess:'always'}
	});
	flashObj.replaces($('flashholder'));
	$$('#panels .button').addEvents({'mouseenter':doPanelButton,'click':goPanelLink});
	
	
});

function doPanelButton(e){
	e.stop();
	var t=e.target.getParent().href.split("/");
	var z = t.pop();
	//alert(">>> "+z);
	flashObj.toElement().setID(z);
	//alert(">> "+flashObj.toElement().setID(z));
	//$('flash0').setID(z);
}
function goPanelLink(e){
	e.stop();
	var t=e.target.getParent().href.split("/");
	var z = t.pop();
	switch(z){
		case "1":
			location.href="about/unique-point-of-view.php";
		break;
		case "0":
			location.href="expertise/capabilities/index.php";
		break;
		case "2":
			location.href="about/how-we-are-different.php";
		break;
	}
}



// Google Analytics

//  var _gaq = _gaq || [];
//  _gaq.push(['_setAccount', 'UA-23134460-1']);
//  _gaq.push(['_trackPageview']);
//  (function() {
//    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
//    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
//    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
//  })();


