function recordOutboundLink(category, action) {
    try {
        var pageTracker = _gat._getTracker("UA-2272749-1");
        pageTracker._trackEvent(category, action);
    }
    catch (err) {
    }
}
$(document).ready(function () {

//qr code 
$('.qr').each(function () {
                var url = "http://chart.apis.google.com/chart?cht=qr&chs=110x110&chld=L&choe=UTF-8&chl=" + $(this).attr('src').replace(/\s/g, "").replace(/%20/g, '+').replace(/%F8/g, '%C3%B8').replace(/%A6/g, '%C3%A6').replace(/%A5/g, '%C3%A5');
                                $(this).attr('src', url);
      
            });
    $('a[href^=mailto:]').each(function () {
        // Modify the mailto: value
        var mailtoVal = $(this).attr('href');
        var mailtoHref = mailtoVal;
        mailtoVal = mailtoVal.replace("mailto:", "[email]");
        mailtoVal = mailtoVal.replace("@", "[snabela]");
        mailtoVal = mailtoVal.replace(".", "[punktumet]");
        // Auto-generate title tags for users
        $(this).attr('title', mailtoHref.replace("mailto:", "Email: "));
        // Auto-generate text for users
        $(this).text(mailtoHref.replace("mailto:", ""));
        $(this).attr('href', mailtoVal);
        $(this).click(function () {
            recordOutboundLink('Mailto Links', mailtoHref); //google analytics link tracking
            setTimeout('window.location.href = "' + mailtoHref + '"', 100)
            return false;
        });
    });
    $('a[href^="http://"').each(function () {
        var Href = $(this).attr('href');
        $(this).click(function () {
            recordOutboundLink('Outbound Links', Href); //google analytics link tracking
            setTimeout('window.location.href = "' + Href + '"', 100)
            return false;
        });
    });
});



/*$(document).ready(function() {
$('a[href^=mailto:]').each(function() {
// Modify the mailto: value
var mailtoVal = $(this).attr('href');
var mailtoHref = mailtoVal;
mailtoVal = mailtoVal.replace("mailto:", "[email]");
mailtoVal = mailtoVal.replace("@", "[snabela]");
mailtoVal = mailtoVal.replace(".", "[punktumet]");

// Auto-generate title tags for users
$(this).attr('title', mailtoHref.replace("mailto:", "Email: "));
// Auto-generate text for users
$(this).text(mailtoHref.replace("mailto:", ""));
// onClick Event
$(this).attr('href', mailtoVal);

$(this).click(function() {
window.location.href = mailtoHref;
return false;
});
});
}); */
