$(document).ready(function() {
	$('.show_thumb').hover(
		function() {
			$(this).children('.show_mask').children('.show_cap').animate({ "margin-top": '0px' }, 300, function() { });
		},
		function() {
			$(this).children('.show_mask').children('.show_cap').animate({ "margin-top": '40px' }, 500, function() { });
		});
		
	$('.show_thumb').hover(
		function() {
			$(this).children('.show_mask').children('.show_cap_artist').animate({ "opacity": '1' }, 200, function() { });
		},
		function() {
			$(this).children('.show_mask').children('.show_cap_artist').animate({ "opacity": '.7' }, 400, function() { });
		});

	$('.show_group').each(function (t) {
		$(this).attr("href", (this.href.replace(new RegExp("\/(shows|artists)\/", "i"), '/media/$1/gallery/')+'.jpg'))
	});

	$('.show_group').fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'inside',
		'overlayOpacity'	: 0.4,
		'centerOnScroll'	: true,
		'titleFormat'       : function(title, c_array, c_index, c_opts) {
			var titties = $('#show_no_'+(c_index+1)).val();
			return titties;
		}
	});


	$('#blaag a[href$="jpg"], #blaag a[href$="JPG"], #blaag a[href$="jpeg"], a[rel="hipop"], #blaag a[href$="png"], #blaag a[href$="PNG"]').fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity': 0.4,
		'centerOnScroll'	: true,
		'titleShow'			: false
	})


	$("a.load_vid").fancybox({ 'overlayShow': true, 'overlayOpacity': 0.5, 'overlayColor': '#000', 'hideOnContentClick': true });			

});
