var maxGfx 		= "fileadmin/template/images/maximieren.jpg";
var minGfx 		= "fileadmin/template/images/minimieren.jpg";

//seite ist nicht zusammengefahren
var status = 0;

var maximize = function () {
	//jQuery(".maxi_de").attr("src", minGfx);
	jQuery("#tomin").show();
	jQuery("#tomin").css("display","block");
	jQuery("#tomax").hide();
	jQuery("div#gallery_img").animate({"height": "387px"});
	//jQuery("div#gallery_img").css({"height": "387px"});
	jQuery("#top_background").animate({"height": "568px" });
	jQuery("#gal_img_middle").animate({"height": "387px"});
	jQuery("#gal_img_left.animate").animate({"height": "385px" });
	jQuery("#content_all").animate({"top": "580px" });
	jQuery("#button_header_left").animate({"top" : "537px"});
	jQuery("#right").animate({"top": "574px"});
	//jQuery("#left").animate({"top": "569px", "min-height": "800px"});
	//jQuery("#left").css({"min-height": "700px"});
	
	leftheight = document.getElementById("left").offsetHeight - 187;	
	jQuery("#left").animate({"top" : "569px", "height" : leftheight});
	//jQuery("#inner_left").animate({"top" : "569px", "height" : leftheight});
	status = 0;
};

var minimize = function () {
	//jQuery(".maxi_de").attr("src", maxGfx);
	jQuery("#tomax").show();
	jQuery("#tomax").css("display","block");
	jQuery("#tomin").hide();
	jQuery("#gallery_img").animate({"height": "200px"});   
	jQuery("#top_background").animate({"height": "381px"}); 
	jQuery("#gal_img_middle").animate({"height": "200px"});
	jQuery("#gal_img_left").animate({"height": "200px"});
	jQuery("#content_all").animate({"top": "393px"});
	jQuery("#button_header_left").animate({"top": "350px"});
	jQuery("#right").animate({"top": "387"});
	//jQuery("#left").animate({top: "382px", "min-height": "900px"});
	//jQuery("#left").css({"min-height": "900px"});
	
	leftheight = document.getElementById("left").offsetHeight + 187;
	jQuery("#left").animate({"top" : "382px", "height" : leftheight});
	//jQuery("#inner_left").animate({"top" : "382px", "height" : leftheight});
	status = 1;
};


jQuery(document).ready(
	function ($) { 
	    $("#gallery_img").css({"display" : "block", "height" : "200px", "overflow" : "hidden"});
	    $("#top_background").css({"display" : "block", "height" : "381px"});
	    $(".gal_img_middle").css({"display" : "block", "height" : "200px"});
	    $(".gal_img_left").css({"display" : "block", "height" : "200px"});
	    $("#content_all").css({"display" : "block", "top" : "393px"});
	    $("#button_header_left").css({"top" : "350px"});
	    $("#left").css({"display" : "block", "top" : "382px"});
	    $("#footer").css({"display" : "block"});
	    $("#slider li").css({"display" : "block", "height" : "387px"});
	    // define the toggler for div#toggle
	   // $("#toggle").toggle(maximize,minimize);
	   //maximize();
	    $(".maximieren_link").toggle(minimize,maximize);
	}
);


