$(document).ready(function(){
  // Add onclick event to all wmslib <a> tags 
  $("a[href^='/wmslib/']").click(function(){
    pageTracker._trackPageview($(this).attr('href'));
  });
  if (location.pathname=="/") {
    // Add onclick event to sectorLinks
    $(".sectorLinks a").click(function(){
      pageTracker._trackPageview($(this).attr('href') + "/homeboxclick");
    });
  }
  // Add onclick event to newslettersignup 
  $(".mainNewsBtn").click(function() {
    var u = location.pathname;
    if (/\/$/.test(location.pathname)) u = location.pathname.slice(0, -1);
    pageTracker._trackPageview(u + "/newslettersignup");
    });
  // Add onclick event to SectorNewsLetter 
  $(".SectorNewsLetterSubmit").click(function() {
    var u = location.pathname;
    if (/\/$/.test(location.pathname)) u = location.pathname.slice(0, -1);
    pageTracker._trackPageview(u + "/sectornewslettersignup");
    });
});

