var profileId = "UA-3741125-29";

try {
var pageTracker = _gat._getTracker(profileId);
pageTracker._trackPageview();
} catch(err) {}


if (typeof jQuery != "undefined"){ 
	$(document).ready(function(){
		
		//Track external links , Not DMS
		$("a[href*='http://']:not([href*='" + location.hostname + "']):not([href*='dms'])").click(function(event){
			var url = $(this).attr('href')
			var pageTracker = _gat._getTracker(profileId);
			pageTracker._trackPageview('/external/' + url);
		});
		
		//Track document (doc, txt, rtf, pdf, zip, ppt, xls) links not hosted on DMS 
		$("a[href$='.doc'], a[href$='.txt'], a[href$='.rft'], a[href$='.pdf'], a[href$='.zip'], a[href$='.ppt'], a[href$='.xls']").click(function(event){
			var url = $(this).attr('href')
			var pageTracker = _gat._getTracker(profileId);
			pageTracker._trackPageview('/documents/' + url);
		});
		
		//Track All DMS links
		//This is needed because DMS links dont have an extension at the end
		$("a[href*='http://dms.']").click(function(event){
			var url = $(this).attr('href')
			var pageTracker = _gat._getTracker(profileId);
			pageTracker._trackPageview('/documents/' + url);
		});
		
		//Track mailto links
		$("a[href*='mailto']").click(function(event){
			var url = $(this).attr('href')
			var pageTracker = _gat._getTracker(profileId);
			pageTracker._trackPageview('/mailto/' + url);
		});
	});
}