/**
 * Google Analytics tracking of download-files and external links
 * Integrate this file below the google analytics integration code
 *
 * @author Dan Untenzu <untenzu@webit.de>
 * @version 0.1 stable
 * @since 2010-02-19 17:58:19 CET
 */

$('#content a').filter(function() {
	//if (this.hostname && this.hostname !== location.hostname) {
	//	pathToTrack = '/gatracker-external/' + $(this).attr('href');
	//	if (pageTracker) $(this).bind('click', function(event) { pageTracker._trackPageview(pathToTrack); });
	//}
	//else if ((this.href).match(/\.pdf$/i)) {
	if ((this.href).match(/(\.pdf|\.doc|\.xls)$/i)) {
		//$(this).addClass('download').css('color', 'red');
		pathToTrack = '/gatracker-download/' + $(this).attr('href');
		if (pageTracker) $(this).bind('click', function(event) { pageTracker._trackPageview(pathToTrack); });
	}
});