// Create the tooltips only on document load
$(document).ready(function() 
{
	// Set up the video player
	$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_rounded'});
   
   // Notice the use of the each method to gain access to each element individually
   $('.product').each(function()
   {
      // lets pull the content from the description div
      var content = $(this).next('.tooltipCont').html();
      
      //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(
      {
         //show: { when: { event: 'click' } },
         content: content,
         position: {
            corner: {
               tooltip: 'leftMiddle',
               target: 'rightMiddle'
            }
         },
         
         style: {
            border: {
      		   width: 7,
      		   radius: 5
      		},

            width:300,
            tip: true, // Give it a speech bubble tip with automatic corner detection
            name: 'dark'
         }
      });
   });

});