/*!
 * Entourage 1.1.2 - Automatic Download Tracking for Asynchronous Google Analytics
 *
 * Copyright (c) 2011 by Tian Valdemar Davis (http://techoctave.com/c7)
 * Licensed under the MIT (http://en.wikipedia.org/wiki/MIT_License) license.
 *
 * Learn More: http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics
 */
(function(){var entourage=new(function(){var version="1.1.2";var whitelist=/\.pdf$|\.zip$|\.od*|\.doc*|\.xls*|\.ppt*|\.exe$|\.dmg$|\.mov$|\.avi$|\.mp3$/i;var getFileName=function(pathname){pathname=pathname.substring(0,(pathname.indexOf("#")==-1)?pathname.length:pathname.indexOf("#"));pathname=pathname.substring(0,(pathname.indexOf("?")==-1)?pathname.length:pathname.indexOf("?"));pathname=pathname.substring(pathname.lastIndexOf("/")+1,pathname.length);return pathname};var autograph=function(){console.log("autograph");var fileName,associate;fileName=getFileName(this.pathname);associate='/download/'+fileName;console.log("associate: "+associate);_gaq.push(['_trackPageview',associate])};var initialize=function(){console.log("initialize");var links=document.links;for(var i=0,l=links.length;i<l;i++){var match=links[i].pathname.match(whitelist);if(typeof match!=="undefined"&&match!==null){links[i].onclick=autograph}}};return{version:version,initialize:initialize}})();window.entourage=entourage;window.onload=entourage.initialize})();
