// UTF8‼
$(document).ready(function(){

	if (/MSIE\s(5\.5|6\.)/.test(navigator.userAgent)) {
		DD_belatedPNG.fix('#logo,#nav,#nav .container,#feature,#foot,#cta li a,#homepagecontent h2 a');
	} else {
		Cufon
		.replace('h1,#ident,#strapline,#description',{
			fontFamily:'Skia',
			textShadow:'rgba(0,0,0,0.5) 2px 2px'
		})
		.replace('#subnav li a',{
			fontFamily:'Skia',
			hover:true
		})
		.replace('#cta li a, #homepagecontent h2 a',{
			fontFamily:'Skia',
			textShadow:'rgba(255,255,255,0.5) 2px 1px'
		});
	}

//	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent) == false) {
//		// Scrolling Background
//		var scrollingbackground = setInterval(function() {
//			$('#strip').css('background-position',(parseInt($('#strip').css('background-position'))-5) + 'px 11px');
//		},1);
//	}

	// Clicks
	$('#nav a').click(function(){
		try{pageTracker._trackEvent('Home Nav','Click',$(this).attr('href') + ' (Nav)');}catch(err){}
		location.href = $(this).attr('href');
		return false;
	});
	$('#subnav a').click(function(){
		try{pageTracker._trackEvent('Home Nav','Click',$(this).attr('href') + ' (Sub Nav)');}catch(err){}
		location.href = $(this).attr('href');
		return false;
	});
	$('#stripcontent a').click(function(){
		try{pageTracker._trackEvent('Home Nav','Click',$(this).attr('href') + ' (Strip Content)');}catch(err){}
		location.href = $(this).attr('href');
		return false;
	});
	$('#homepagecontent a, #cta a').click(function(){
		try{pageTracker._trackEvent('Home Nav','Click',$(this).attr('href') + ' (CTA)');}catch(err){}
		location.href = $(this).attr('href');
		return false;
	});
	$('#foot a').click(function(){
		try{pageTracker._trackEvent('Home Nav','Click',$(this).attr('href') + ' (Foot)');}catch(err){}
		location.href = $(this).attr('href');
		return false;
	});

	// Flash
	if (swfobject.hasFlashPlayerVersion('7.0.19.0')) {
		// Logo
		swfobject.embedSWF(
			v_url_root + 'media/swf/logo.swf',
			'logo',
			154,154,
			'7.0.19.0',
			v_url_root + 'media/swf/expressInstall.swf',{},{
				menu:'false',
				wmode:'transparent'
			},{
				salign:'left',
				id:'logo',
				name:'logo'
			}
		);
		// Home Page Videos
		function f_vid(v_id) {
			swfobject.embedSWF(
				v_url_root + 'media/swf/monoslideshow.swf',
				'strip_' + v_id,
				314,267,
				'7.0.19.0',
				v_url_root + 'media/swf/expressInstall.swf',
				{
					showLogo:false,
					showVersionInfo:false,
					dataFile:v_url_root + 'portfolio/xml/?i=' + v_id + '&s=l'
				},
				{
					bgcolor:'#1d3a4e',
					menu:'false',
					wmode:'opaque'
				},
				{
					id:'strip_' + v_id,
					name:'strip_' + v_id
				}
			);
		}
		f_vid('web');
		f_vid('photo');
		f_vid('print');
	}

});

function f_link(v_href) {
	try{pageTracker._trackEvent('Home Nav','Click',v_href + ' (Monoslideshow)');}catch(err){}
	location.href = v_href;
}