
jQuery(document).ready(function($){

    // Add an "image" class to images in posts that are links so we can remove the default
    // dotted bottom border/ Can't easily to this with css or modify the dom generation
    // from WP to add the class there
    $('.entry-content img').parent('a').addClass('image');

    // jTweetsAnywhere
    $('#tweetsFeeder').jTweetsAnywhere({
        username: 'mettevangso',
        count: 2
    });

});


// :TODO: convert this to jQuery
// Fixup iphone phone number links, which want "tel:" instead of "callto:"
window.onload = function () {
  if (navigator.userAgent.match (/iPhone/i)) {
    var a = document.getElementsByTagName ("a");
    for (var i = 0; i < a.length; i++) {
      if (a[i].getAttribute ('href').search (/callto:/i) === 0) {
        a[i].setAttribute ('href', a[i].getAttribute ('href').replace (/^callto:/, "tel:"));
      }
    }
  }
};

