/*function resize() {

    var startwidth = 1060;
    var startheight = 600;
    var minratiosize = 0.1;
    var scrollwidth = 20;

    var minwidth = minratiosize*startwidth;
    var minheight = minratiosize*startheight;
    var ratio = startwidth/startheight;

    var bg = $('#headerimages img');

    var imagewidth = bg.width();
    var imageheight = bg.height();

    var windowwidth = $(window).width();
    var windowheight = $(window).height();
    
    var browserwidth = windowwidth+scrollwidth;
    var browserheight = windowheight;
    
    // Check for minimum dimensions
    if ((browserheight<  minheight)&&  (browserwidth<  minwidth)){
        bg.height(minheight);
        bg.width(minwidth);
    } else{   
        // browser is taller   
        if (browserheight>  browserwidth){
            imageheight = browserheight;
            bg.height(browserheight);
            imagewidth = browserheight*ratio;
            bg.width(imagewidth);
            if (browserwidth>  imagewidth){
                imagewidth = browserwidth;
                bg.width(browserwidth);
                imageheight = browserwidth/ratio;
                bg.height(imageheight);
            }
        }
        // browser is wider
        if (browserwidth>= browserheight){
            imagewidth = browserwidth;
            bg.width(browserwidth);
            imageheight = browserwidth/ratio;
            bg.height(imageheight);
            if (browserheight>  imageheight){
                imageheight = browserheight;
                bg.height(browserheight);
                imagewidth = browserheight*ratio;
                bg.width(imagewidth);
            }
        }
    }
    // Bild zentrieren
    var verschiebunghorizontal = (0 - Math.abs(browserwidth - imagewidth)) / 2;
    var verschiebungvertikal = (0 - Math.abs(browserheight - imageheight)) / 2;
    bg.css("margin-left", verschiebunghorizontal+"px");
    bg.css("margin-top", verschiebungvertikal+"px");
};
*/

/*
function resizemap() {

    var bg = $('#map');

    var windowwidth = $(window).width() - 450;
    var windowheight = $(window).height() - $("#navigation").height() - 33;
	
	bg.width(windowwidth);
	bg.height(windowheight);
    
};
*/

/*
function scrollbar() {
  newHeight = $("#content").height() - $("#text").height();
  if(newHeight < 435) {
    $("body").css("overflow", "auto");
  }
}
*/


$(window).bind('resize', function(){
  //resize();
  //resizemap();
  //scrollbar();

});

$(document).ready(function(){
  //resize();
  //resizemap();
  //scrollbar();

  
/* ----------------------------------------------- */
/* ---   anfrage-formular zimmerinfo Ã¤ndern   --- */
/* ----------------------------------------------- */

$("#zimmerinfo_1").children().hide();
$("#platzhalter_1").show();
$("#zimmertyp_1").change(function(){
		$("#zimmerinfo_1").children().hide();
		$("#" + this.value + "_1").show();
		if(this.value == "") {
			$("#platzhalter_1").show();
		}
	});
	
contentWidth = ($("#content").width() - 20) * -1;

$("#logo-home").animate({
				right: 130
	},2000);
$("#sonnen").animate({
				top: 8
	},3000);


$("#fade-in").click(function(){
	$("#content").animate({
				marginLeft: 0
	},1500);
	$("#fade-in").animate({
				opacity: 0
	},1500);
	$("#fade-out").animate({
				opacity: 1
	},1500);
	
	setTimeout('$("#fade-in").css("display", "none");', 1500);
});
$("#fade-out").click(function(){
	$("#content").animate({
				marginLeft: contentWidth
	},1500);
	$("#fade-out").animate({
				opacity: 0
	},1500);
	$("#fade-in").animate({
				opacity: 1
	},1500);
	$("#fade-in").css("display", "block");
	//setTimeout('$("#container-sidebar").css("display", "none");', 1500);
});

});


