$(document).ready(function() {
	$("a[rel=group]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
				
	$('#gallery').click(function(){
		close_all();
		$('#gallery_close').show();
		$('#gallery_popup').show();
	});
				
	$('#gallery_close').click(function(){
		close_all();
		$('#gallery_close').hide();
		$('#gallery_popup').hide();
	});				
	
	$('#story').click(function(){
		close_all();
		$('#story_close').show();
		$('#story_popup').show();
	});
	
	$('#story_close').click(function(){
		close_all();
		$('#story_close').hide();
		$('#story_popup').hide();
	});				
	
	$('#menu').click(function(){
		close_all();
		$('#menu_close').show();
		$('#menu_popup').show();
	});
				
	$('#menu_close').click(function(){
		close_all();
		$('#menu_close').hide();
		$('#menu_popup').hide();
	});				
	
	$('#reservation').click(function(){
		close_all();
		$('#reservation_close').show();
		$('#reservation_popup').show();
	});
	
	$('#reservation_close').click(function(){
		close_all();
		$('#reservation_close').hide();
		$('#reservation_popup').hide();
	});	
	
	$('#downtown').click(function(){
		close_all();
		$('#downtown_close').show();
		$('#downtown_popup').show();
	});
	
	$('#downtown_close').click(function(){
		close_all();
		$('#downtown_close').hide();
		$('#downtown_popup').hide();
	});	
	
	$('#leawood').click(function(){
		close_all();
		$('#leawood_close').show();
		$('#leawood_popup').show();
	});
	
	$('#leawood_close').click(function(){
		close_all();
		$('#leawood_close').hide();
		$('#leawood_popup').hide();
	});
	
	function close_all(){
		$('.popup_close').hide();
		$('.popup').hide();
	}
		
	jwplayer("video").setup({
		flashplayer: "jwplayer/player.swf",
		autostart: true,
		repeat: 'always',
		file: "jwplayer/LaBodegawMusicv1.mp4",
		controlbar:'none',
		volume: 20,
		height: 324,
		width: 544});
});
