/*
 * ============================================================================ 
 * (c) 2005 - 2010 Liss-Design Aachen, Deutschland 
 * ----------------------------------------------------------------------------
 * File:         .js                                                           
 * Description:                                                                
 * ============================================================================
 */
const logo_left_min = 48; const logo_left_dfl = "5%";
const content_left_min = 153; const content_left_dfl = "16%";
const navigation_left_min = 768; const navigation_left_dfl = "80%";
	
$( function ()
{
	var slider        = $(".slider");
	var $logo         = $(".logo");
	var $content      = $(".content");
	var $navigation   = $(".navigation");
	var imgBackGround = $("#img_background_page");
	
	var hdlGeometry = function () {
		
		var wWidth = $(window).width();
		var wHeight = $(window).height();
		var wRatio  = wWidth / wHeight;
		
		if (wWidth < 960)
		{
			$logo.css("left", logo_left_min+"px");	
			$content.css("left", content_left_min +"px");
			$navigation.css("left", navigation_left_min+"px");
		}
		else
		{
			$logo.css("left", logo_left_dfl);
			$content.css("left", content_left_dfl);
			$navigation.css("left", navigation_left_dfl);
		}

		slider.width($(".active").width());

		if (wRatio < 1.7)
		{
			//imgBackGround.css("height", "100%" );
			imgBackGround.css("height", wHeight+"px" );
		}
		else
		{
			//imgBackGround.css("width", "100%" );
			imgBackGround.css("width", wWidth+"px" );
		}
	};
	
	$(window).resize ( hdlGeometry );
	$(window).load ( hdlGeometry );
});

