/* $Id: code.js 148 2009-01-22 21:59:26Z tom $ */

$(document).ready(function () {

	try {
		var pageTracker = _gat._getTracker('UA-4630806-2');
		pageTracker._trackPageview();
	} catch(err) {}
	
	$('a.new-window').click(function() { 
		window.open(this.href);
		return false;
	});
	
	// editions: downloads tracking
	$('#editions li a').each(function (index, el) {
		var pdfRegex = /[a-z0-9_-]*\.pdf$/; 
		$(el).bind('click', function () {
			details = pdfRegex.exec($(this).attr('href'));
			pageTracker._trackEvent('editions', 'download', details[0]);
		});
	});
	
	$('div[id^="group_"]').cycle({
		fx: 'turnDown',
		height: '200px',
		pause: 1,
		speed: 1000,
		timeout: 5000
	});
	
});
