// ASYNCHRONOUS GOOGLE ANALYTICS CODE.
// http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

	/* Hack to work around sites that use JQuery's noconflict rule (the
	 * news site does this.) */
	if ($ == undefined) 
		$ = jQuery;

	/* load Google Analytics script. */
	(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';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
	})();

	/* Set up GA global variable. */
	var _gaq = _gaq || [];

	var q = 'http://www.lib.uchicago.edu/cgi-bin/subnetclass?jsoncallback=?';

	$.getJSON(q, function(data) { 
		/* Generate stats for .uchicago.edu and subdomains. */
		_gaq.push(['_setAccount', 'UA-15705691-1']);
		_gaq.push(['_setCustomVar', 1, 'Location', data]); 
		_gaq.push(['_setDomainName', '.uchicago.edu']);
		_gaq.push(['_gat._anonymizeIp']);
		_gaq.push(['_trackPageview']);
	});


