/* Google Analytics */
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
	var pageTracker = _gat._getTracker('UA-10215924-1');
	pageTracker._trackPageview();
} catch(err) {}


$(function() {
	/* stripe table rows */
	$('.striped tbody tr:even').addClass('alt');
	$('.striped tbody tr').mouseover(function() {
		$(this).addClass('over');
	}).mouseout(function() {
		$(this).removeClass('over');
	});


	/* parse a tags */
	var urls = ['http://s75224.gridserver.com/','http://www.whitgiftfoundation.co.uk/'];
	
	$('a[href]').each(function() {
		var a = $(this).attr('href');
		
		/* outbound links */
		if (jQuery.inArray(a,urls) < 0 && a.indexOf('http') >= 0) {
			$(this).click(function() {
				pageTracker._trackPageview($(this).attr('href'));
			});
		}
		
		/* files */
		var fs = ['.pdf','.zip','.tar','.gz','.txt','.dmg','.exe'];
		jQuery.each(fs,function() {
			if (a.indexOf(this) >= 0) {
				$(this).click(function() {
					pageTracker._trackPageview($(this).attr('href'));
				});
			}
		});
	});
});
