$(document).ready(function() {

  	$("#enews").fancybox({
  		'scrolling'		: 'no',
  		'titleShow'		: false,
  		'showCloseButton'		: false,
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000',
  		});
  	
  	$("a[rel=group]").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'titlePosition' 	: 'inside',
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-inside">' + (title && title.length ? '<strong>' + title + '</strong>' : '' ) + (currentIndex + 1) + ' of ' + currentArray.length + '</span>';
			}
		});
		
		$("a[rel=group2]").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'titlePosition' 	: 'inside',
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-inside">' + (title && title.length ? '<strong>' + title + '</strong>' : '' ) + (currentIndex + 1) + ' of ' + currentArray.length + '</span>';
			}
		});
		
		$("a[rel=group3]").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'titlePosition' 	: 'inside',
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-inside">' + (title && title.length ? '<strong>' + title + '</strong>' : '' ) + (currentIndex + 1) + ' of ' + currentArray.length + '</span>';
			}
		});
		
		$("a[rel=group4]").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'titlePosition' 	: 'inside',
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-inside">' + (title && title.length ? '<strong>' + title + '</strong>' : '' ) + (currentIndex + 1) + ' of ' + currentArray.length + '</span>';
			}
		});
		
		$("a.single_image").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'fade',
			'showCloseButton'	: false,
			'titlePosition' 	: 'inside',
			'overlayOpacity'	: '0.9',
			'overlayColor'		: '#000'
		});
		
	});
