/**
 * setImageZoom.js
 * @author R.A. Ray
 * @version 1.0.1
 * @date 02/27/08
 * 
 * Sets up image zooming on links with a rel of 'lightbox'
 * 
 * @requires /scripts/jquery/core.js
 * @requires /scripts/jquery/plugins/imagezoom/eye.js
 * @requires /scripts/jquery/plugins/imagezoom/utils.js
 * @requires /scripts/jquery/plugins/imagezoom/zoomimage.js
 */
				
var setImageZoom = function ()
{
	$( 'a[rel*="lightbox"]' ).zoomimage(
		{
			opacity: 0.5,
			centered: true,
			border: 1,
			controlsTrigger: 'mouseover',
			beforeZoomIn: function(boxID) 
				{
					$('#' + boxID)
						.find('img')
						.css('opacity', 0)
						.animate(
							{'opacity':1},
							{ duration: 500, queue: false }
						);
				},
			beforeZoomOut: function(boxID) 
				{
					$('#' + boxID)
						.find('img')
						.css('opacity', 1)
						.animate(
							{'opacity':0},
							{ duration: 500, queue: false }
						);
				}
		}
	);	
};

$( document ).ready
( 
	function () 
	{
	 	setImageZoom();
	}
);