// Create the tooltips only on document load
(function($)
{
   // Notice the use of the each method to gain access to each element individually
   $('#websites_listing a').each(function()
   {
      // Create image content using websnapr thumbnail service
      var content = '<img src="http://images.websnapr.com/?url=';
      content += $(this).attr('href');
      content += '" alt="Loading thumbnail..." height="152" width="202" />';
      
      // Setup the tooltip with the content
      $(this).qtip(
      {
         content: content,
         position: {
            corner: {
               tooltip: 'bottomMiddle',
               target: 'topMiddle'
            }
         },
         style: {
            tip: true, // Give it a speech bubble tip with automatic corner detection
            name: 'cream'
         }
      });
   });
   
   $('.websites_heading').mouseover(function () {
		$(this).css('cursor', 'pointer');
	});
})(jQuery);

