jQuery.ajaxSetup({ 
  beforeSend: function(xhr) { xhr.setRequestHeader("Accept", "text/javascript")} 
});

/* External links */
function externalLinks() {
  $('a').each(function(i) {
    if ($(this).attr('href') && $(this).attr('rel') == 'external') {
      $(this).attr('target', '_blank');
    }
  });
}

$(externalLinks);

$(document).ready(function() {
  $('.help').hover(
    function() {
    this.tip = this.title;
    $(this).append('<div class="tooltip">' + this.tip + '</div>');
    this.title = "";
    this.width = $(this).width();
    $(this).find('.tooltip').css({left:this.width-22})
    $('.tooltip').fadeIn(300);
  },
    function() {
      $('.tooltip').fadeOut(100);
      $(this).children().remove();
        this.title = this.tip;
      }
  );
});