$j = jQuery.noConflict();
$j(document).ready(function(){
	$j("a[rel=lightbox_set]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' - ' + title : '') + '</span>';
		}
	});
	if($j('#myGallery').length > 0)
	{
		$j('#myGallery div.imageElement-overlay').each(function(){
			$j(this).css('top',0-($j(this).height()+13));
			$j(this).css('visibility','visible');
		});
		$j('#myGallery').innerfade({
	        'animationtype'		: 'fade',
	        'speed'				: 'slow',
	        'type'				: 'sequence',
	        'timeout'			: 10000,
	        'containerheight'	: 351
		});
	}
});