var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-9156172-1']);
_gaq.push(['_setDomainName', '.cybersource.com']);
_gaq.push(['_setAllowLinker', true]);
_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);
})();

$(document).ready(function() {
	$('a.home_logo').click(function() {
		_gaq.push(['_trackEvent', 'Home Logo', 'Click', $(this).attr('href')]);
	});
	
	$('a.home_topbar').click(function() {
		_gaq.push(['_trackEvent', 'Home Top Bar', 'Click', $(this).attr('href')]);
	});
	
	$('a.home_sidebar').click(function() {
		_gaq.push(['_trackEvent', 'Home Side Bar', 'Click', $(this).attr('href')]);
	});
	
	$('a.home_maincat').click(function() {
		_gaq.push(['_trackEvent', 'Home Main Categories', 'Click', $(this).attr('href')]);
	});
	
	$('a.home_banner').click(function() {
		_gaq.push(['_trackEvent', 'Home Banners', 'Click', $(this).attr('href')]);
	});
	
	$('a.home_footer').click(function() {
		_gaq.push(['_trackEvent', 'Home Footer', 'Click', $(this).attr('href')]);
	});
	
	$('a.external').click(function() {
		_gaq.push(['_trackEvent', 'External Links', 'Click', $(this).attr('href')]);
	});

	$('a.visa_dev_center').click(function() {
		_gaq.push(['_trackEvent', 'Visa Developer Center', 'Click', $(this).attr('href')]);
	});
	
	$('a.webinar').click(function() {
		_gaq.push(['_trackEvent', 'Webinars', 'Click', $(this).attr('href')]);
	});
	
	$('a.document').click(function() {
		_gaq.push(['_trackEvent', 'Documents', 'Click', $(this).attr('href')]);
	});
	
	$('a.form').click(function() {
		_gaq.push(['_trackEvent', 'Forms', 'Click', $(this).attr('href')]);
	});
	
	$('a.login').click(function() {
		_gaq.push(['_trackEvent', 'Login', 'Click', $(this).attr('href')]);
	});
	
	$('input#resource_center').click(function() {
		_gaq.push(['_trackEvent', 'Documents', 'Click', 'http://www.cybersource.com/cgi-bin/resource_center/submit.html']);
	});
});
