// Fancyboxes insertions 

$(document).ready(function() {

	$('a#fancybox_single').fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 		: 'over',
		'padding' 				: 0,
		'titleShow'		: false,
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	$('a[rel=fancybox_gallery]').fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 		: 'over',
		'padding' 	: 0,
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

});

$(document).ready(function(){
	// Shadowbox	
	
	$('a[rel*=shadowbox]').each(function(index) {
		$(this).css('position','relative');
		$(this).css('display','block');
		$(this).css('marginBottom','10px');
		$(this).append( '<span class="overlayPlay"></span>' );

		//console.log(str);
	});

	Shadowbox.init();

	// $("a[rel='tinybox|']").lightBox();
	
});

/*alert("test_");*/
