( function($) {
$(document).ready( function() {
	$('.norollover').each( function() {
		// The thumbnail has no 425 image associated with it yet, so display a helpful message
		$(this).qtip({
			overwrite: false,
			content: {
				text: "<span class='norollover'>We're sorry, but no rollover image exists yet for this book.  Please click on the thumbnail to see the fullsize image.</span>",
				title: {
					text: $(this).attr('title'), // Give the tooltip a title using each element's title text
					button: true
				}
			},
			position: {
				at: 'right center',
				my: 'left center',
				viewport: $(window) // Keep the tooltip on-screen at all times
			},
			show: {
				event: 'mouseenter',
				solo: true // Only show one tooltip at a time
			},
			hide: {
				event: 'mouseout'
			},
			style: {
				classes: 'ui-tooltip-light ui-tooltip-shadow no425',
				width: 450,
				height: 100
			}
		})
	});
	
	$('.425gallery').each( function() {
		// We make use of the .each() loop to gain access to each element via the "this" keyword...
		$(this).qtip({
			overwtite: false,
			content: {
				// Set the text to an image HTML string with the correct src URL to the loading image you want to use
				text: '<img src="' + $(this).attr('rel') + '" />',
				title: {
					text: $(this).attr('title'), // Give the tooltip a title using each element's title text
					button: true
				}
			},
			position: {
				at: 'right center',
				my: 'left center',
				viewport: $(window) // Keep the tooltip on-screen at all times
			},
			show: {
				event: 'mouseenter',
				solo: true // Only show one tooltip at a time
			},
			hide: {
				event: 'mouseout'
			},
			style: {
				classes: 'ui-tooltip-light ui-tooltip-shadow yes425'
			}
		})
	});
});

} ) ( jQuery );

