var bookedDays = new Array();

var resizeBg = function() { 
		var h = self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
	  	var w = self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
  		var elem = $('#backgroundImage');

	  	if($('.container').height() > h) {
  			h = $('.container').height();
  		}
  		
  		 h += 30;
 
	  	$('#background').height(h);
  
  		if (w / h > 982 / 1886) {
    		elem.width(w);
			elem.height(w * 1886 / 982);
	  	} else {
    		elem.height(h);
    		elem.width(h * 982 / 1886);
	  	}
	}



  
  function isAvailable(date){
    var dateAsString = date.getFullYear().toString() + "-" + (date.getMonth()+1).toString() + "-" + date.getDate();
    var result = $.inArray( dateAsString, bookedDays ) ==-1 ? [true] : [false];
    return result
  }


	
	$(document).ready(function(){
    	$('.sb-nav li a').corner();
		$(".sb-nav ul li a").hover(function() {
			$(this).parent().find(".bpf").show();
		}, function(){ 
			$(this).parent().find(".bpf").hide();
		});
		$(".sb-nav ul li a.current").hover(function() {
			$(this).parent().find(".bpf").show();
		}, function(){ 
			$(this).parent().find(".bpf").show();
		});
		
		
    	$(window).resize(function(){
		    resizeBg();
		});
		
		$('#backgroundImage').load(resizeBg);
		
		$('.slideshow_wrapper').cycle({
			fx: 'fade'
		});

		resizeBg();
		
		
  		
	});
	
resizeBg();


