// used to add exit tracking data to google analytics
$(document).ready(function(){
//alert(document.title);
$('a').each(function() {
  var $a = $(this);
  var href = $a.attr('href');
  if (href==undefined) {
    href="";
	}
  //alert(href);
  // see if the link is external
  if ( (href.match(/^http/)) ) {
  
    // if so, add the GA tracking code
    $a.click(function() {
	  var postTitle = document.title;
        href = href.replace('http://',''); // cleanup for nice GA reports
       href = href.replace('https://',''); // cleanup for nice GA reports
		//href = href.replace("/", "-");
        href =  '/exit_track/' + postTitle + '/' + href;
        pageTracker._trackPageview(href);
		//alert(href);
	  
    });
  } 
  //alert("skipped it"); }
  
});
});
