$(document).ready(function() {

	$("a[rel=Shows]").fancybox({
		'titlePosition' 	: 'over',
	    'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("a[rel=Band]").fancybox({
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("a[rel=Flyers]").fancybox({
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	$("a[rel=Art]").fancybox({
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("a.eventArchive").fancybox({
		'scrolling'			: 'no',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	
	$("a.eventMap").fancybox({
		'width' 			: 425,
		'height' 			: 350,
		'scrolling'			: 'no',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
		});
	
	$("a.newsletterArchive").fancybox({
		'width' 			: 580,
		'height' 			: 400,
		'scrolling'			: 'auto',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'hideOnContentClick': false
	});	
	
	$("a.eventFlyer").fancybox({
		'titleShow'			: false
	});
	
	$("a.eventThumb").fancybox({
		'titleShow'			: false
	});
	
	$("a.news").fancybox({
		'titlePosition'	: 'over'
	});

	var clearMePrevious = '';
	// Clear Input On Focus
	$('.clearMeFocus').focus(function(){if($(this).val()==$(this).attr('title')){clearMePrevious = $(this).val();$(this).val('');}});
	// If Field Returns to Empty, Text is Re-Entered
	$('.clearMeFocus').blur(function(){if($(this).val()==''){$(this).val(clearMePrevious);}});
	
});
