$(document).ready(function() {
    var tabContainers = $('div.featuredtabs > div');
    
   $height = tabContainers.height();
   $ckwheight = tabContainers.height();
	
	
	
   $('div.featuredtabs > div').each(function() {
   	if($(this).height() > $height) {
   		$height = $(this).height();
   	}
   	
   
   });


  	

   	$height = $height + 450;
	$ckwheight = $ckwheight + 850;
	$height = $height + 'px';
  	
	$('.featuredtabs').height($height);
	
	$('div.featuredtabs ul.tabNavigation li:first a').addClass('first');
	$('div.featuredtabs ul.tabNavigation li:last a').addClass('last');
	
	 
	
    $('div.featuredtabs ul.tabNavigation a').click(function (e) {
		
		
        tabContainers.css({'position' : 'absolute', 'left' : '-10000px'}).filter(this.hash).css({ 'position' : 'absolute', 'left' : '0px'  });
        
        $('div.featuredtabs ul.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');

		
		
        return false;
    }).filter(':first').click();
});

$(document).ready(function(){

	$(".reservation-link").click(function(){
	  $("#tab3").css({ 'position' : 'absolute', 'left' : '0px'  });
	  $("#tab1").css({ 'position' : 'absolute', 'left' : '-10000px'  });
	  $(".last").addClass("selected");
	  $(".first").removeClass("selected");
	});

});

$(window).load(function() {
	var tabContainers = $('div.featuredtabs > div');
    
   $height = tabContainers.height();
   $('div.featuredtabs > div').each(function() {
   	if($(this).height() > $height) {
   		$height = $(this).height();
   	}
   	
   
   });
  	

   	$height = $height + 200;
	$ckwheight = $ckwheight + 850;
	
 	$height = $height + 'px';

   	
 	$ckwheight = $ckwheight + 'px';

});
