// FancyPlayer.js - A spicy mix of FancyBox and Flowplayer

	function formatTitle(title, currentArray, currentIndex, currentOpts) {
    return '<table id="fancybox-title-float-wrap" cellspacing="0" cellpadding="0"><tbody><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main"><b style="padding-right:10px">' + title + '</b> (' + (currentIndex + 1) + ' / ' + currentArray.length+')</td><td id="fancybox-title-float-right"></td></tr></tbody></table>';
	}
	
$(document).ready(function() {
	$(".video_link").fancybox({
		'hideOnContentClick':false,
		'overlayOpacity' :.6,
		'zoomSpeedIn'    :400,
		'zoomSpeedOut'   :400,
		'easingIn'		 : 'easeOutBack',
		'easingOut'		 : 'easeInBack',
      'titleFormat':formatTitle
		});
 

	$('.open_gal').click(function(e){
		$('a.'+$(this).attr('id')).first().trigger('click');
		e.preventDefault();
		e.stopPropagation();
	});

});
