$(function() {
  $("#InternetSpecials img").tooltip({ 
    /*effect: 'fade',*/
    tip:'#theTooltip',
    onBeforeShow: function(){
      theUrl = '/internetSpecial.cfm?ID=' + this.getTrigger().attr('altid');
      getAjaxData(theUrl, this.getTip());
    }
  });

  function getAjaxData(theUrl, $tip) {
    $tip.html('loading...');
    $.ajax({
      url:theUrl,
      success: function(response) {$tip.html(response);}
    });
  }

  
  
  
  
  
  /*
  $('#InternetSpecials img').each(function() {
    $(this).qtip({
      content: {
        url: '/internetSpecial.cfm?ID=' + $(this).attr('altid'),
        data:{},
        method: 'get'            
      },
      position:{
        corner:{target: 'topMiddle',tooltip: 'bottomMiddle'}
      },
      style: { 
        width: 200,
        padding: 0,
        background: '#000',
        color: 'black',
        textAlign: 'center',
        border: {
          width: 1,
          radius: 0,
          color: '#ddd'
        },
        tip: {
          color: '#fff',
          corner:'bottomMiddle',
          size:{x:25,y:15}
        }, // Notice the corner value is identical to the previously mentioned positioning corners
        name: 'dark' // Inherit the rest of the attributes from the preset dark style
      }
    });
  });
  */  
});

