$(document).ready(function() {
						   
	$('.help').each(function(){
		$(this).qtip({
			content:'<div class="tips"><ul><li>Dublin Castle: will find images with Dublin Castle in the title, and in that specific order.</li><li>Dublin <strong>AND</strong> Castle: will find any image with BOTH of the words in the information record</li><li>Dublin <strong>OR</strong> Castle: will find any image with EITHER of the words in the information record</li><li>Dub*: will return any image that has a combination of the word or letters in the information record.</li></ul></div>',
   		show: 'mouseover',
   		hide: 'mouseout',
			position: {
			corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				},
				adjust: {
					screen: true,
				  x: 0, y: 25
				}
			},
			style: {
				border: {	width: 2,	radius: 3, color: '#CCC'},
				width: 350,
				height: 200
			}
		})
	});

	// tooltip logged in version
	$('.image_thumb img').each(function(){
		$(this).qtip({
			show: { delay: 500 },
			content: { url: '/search/tooltip_detail/'+($(this).attr('id'))},
			hide: {
				fixed:true,
				delay: 500
			},
			position: {
				corner: {
					target: 'topRight',
					tooltip: 'topLeft'
				},
				adjust: {
					screen: true,
				  x: 15, y: 0
				}
			},
			style: {
				border: {	width: 3,	radius: 8, color: '#CCC'},
				width: 450
			}
		})
	});


	// tooltip logged out version (yes it makes a difference 

	$('.image_thumb_public img').each(function(){
		$(this).qtip({
			content: { url: '/public/tooltip_detail/'+($(this).attr('id'))},


			hide: {
				fixed:true,
				delay: 500
			},

			position: {
				corner: {
					target: 'topRight',
					tooltip: 'topLeft'
				},
				adjust: {
					screen: true,
					x: 15, y: 0
				}
			},

			style: {
				border: {
					width: 3,
					radius: 8,
					color: '#CCC'
				},
				width: 450
			}

		})
	});

});
