/*******

	Don't forget to put the rel attribute with value of download in your link!
	
	Note : using a rel like : <a href="%link%" rel="download-pdf">example</a>
		will allow for file type to be tracked within Analytics to be easily
		identifiable.
	
*****/
$(document).ready(function() {

	// find all the links with 'download' in the rel tag and assign click event
	$("a[rel^=download]").click(function() {
		
		var _rel = $(this).attr('rel').split('-');
		// use string to add to start to make it easily identifiable in analytics		
		var _filter = (_rel.length > 1) ? '/'+_rel[1]+'/' : '';
		// build link text to use for pagetracking
		var _linktext = _filter+$(this).attr('href');
		
		pageTracker._trackPageview(_linktext);
		
		return true;
	});
	
});
