﻿/* Tracking code for PDF links is installed */
jQuery(document).ready(function() {

    var host = window.location.host;

    jQuery('a').each(function() {
        if (jQuery(this).attr('href') != null) {
            var thisHref = jQuery(this).attr('href');
            //jQuery(this).attr('href', 'javascript:void(0)');         
            if ((thisHref).match(/.pdf/i)) {
                jQuery(this).bind('click', function() {
                    //alert("You are out of our site");
                    pageTracker._trackPageview('/pdf/' + thisHref);
                });
            }
            if (((thisHref).match(/^http/)) && (!(thisHref).match(host))) {
                //jQuery(this).attr('href', 'javascript:void(0)\;');
                jQuery(this).bind('click', function() {
                    //alert("You are out of our site");
                    
                    pageTracker._trackPageview('/outgoing/' + thisHref);
                    //window.location.href = thisHref;
                    //alert('->' + thisHref);
                });
            }
        }
    });
});
/*
$("document").ready(function() {
    $("a[href$=.pdf]")
});
*/
