// Create the tooltips only on document load
$(document).ready(function() 
	{
	// Notice the use of the each method to gain access to each element individually
	$('.library a, .social-container ul li a, .qtip').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 website thumbnail..." height="152" width="202" />';

		// Setup the tooltip with the content
		 $(this).qtip(
		{
			content: content,
			position: {
				corner: {
					tooltip: 'bottomMiddle',
					target: 'topMiddle'
				}
			},
			style: { 
				width: 235,
				padding: 10,
				background: '#ecebe5',
				color: '#88756a',
				textAlign: 'left',
				border: {
					width: 5,
					radius: 5,
					color: '#cfcac3'
				},
				tip: 'bottomMiddle',
				name: 'dark' // Inherit the rest of the attributes from the preset dark style
			}

		});
	});
	
	
});
