$(document).ready(function() {

	var protocol = jQuery.url.attr("protocol"); // returns 'http'
	var host = jQuery.url.attr("host"); 
	var port = jQuery.url.attr("port"); 
	
	var url = protocol + '://' + host;
	if (port != null) { var url = url + ':' + port;}
	
	var res_btn_src = $('.btn_resa').attr("src");

	$('.btn_resa').hover(
						 
						
            function(){ // Change the input image's source when we "roll on"
				
				var fileName = res_btn_src.substr(0,res_btn_src.length -4);
	 

                $(this).attr({ src : fileName + '_hover.gif'});
            },
            function(){ // Change the input image's source back to the default on "roll off"
			
                $(this).attr({ src : res_btn_src});            
				
	});

						   
	$('p.email').defuscate();
	
	$('a.lightbox').lightBox({
							 imageBtnPrev: url+ '/images/lightbox/lightbox-btn-prev.gif',
							 imageBtnNext: url+ '/images/lightbox/lightbox-btn-next.gif',
							 imageBtnClose: url+ '/images/lightbox/lightbox-btn-close.gif',
							 imageLoading: url+ '/images/lightbox/lightbox-ico-loading.gif',
							 imageBlank: url+ '/images/lightbox/lightbox-blank.gif'
							 });
	
	
	$('#slide_show').cycle();
	
	
	$('table.alt_rows tbody tr:odd').addClass('odd');
	$('table.alt_rows tbody tr:even').addClass('even');



	$("a.fancybox").fancybox({ 				 

					 'hideOnContentClick': false,

					 'frameWidth':600,

					 'frameHeight':400

					 }); 
	
	
	
	$("#victor_hugo").click(function() {
						$("#centre_reservation").hide();	
						$("#wilson_reservation").hide();
						$("#victor_hugo_reservation").show();		  
	});
	
	$("#centre").click(function() {
											  
						$("#victor_hugo_reservation").hide();
						$("#wilson_reservation").hide();
						$("#centre_reservation").show();
	});
	
	$("#wilson").click(function() {
											  
						$("#victor_hugo_reservation").hide();
						$("#centre_reservation").hide();
						$("#wilson_reservation").show();
	});
	
	$('.date-pick').datePicker();
	$('input').focus(function() {
				$(this).addClass("focus");			  
							  
	});
	
	$('input').blur(function() {
				$(this).removeClass("focus");			  
							  
	});
	
	$('textarea').focus(function() {
				$(this).addClass("focus");			  
							  
	});
	
	$('textarea').blur(function() {
				$(this).removeClass("focus");			  
							  
	});
});//end document ready
DD_belatedPNG.fix('.png_fix');