/******RESIZE*******/
jQuery.event.add(window, "load", resizeFrame);
jQuery.event.add(window, "resize", resizeFrame);

function resizeFrame() 
{
	var bw = 980;
	var bh = 800;
	
	var cw = 900;
	var ch = 600;
	
	/*var bw = 500;
	var bh = 580;*/
	
	var w = $(window).width();
    var h = $(window).height();
	
	width = w-bw;
	height = h-bh;
	
	if(height<width && height>0){
		//height

		$("#main").css('width', bw+height);	
		$("#main").css('height', bh+(height/3*2));		
			
		$("#content").css('width', cw+height);
		//contentw = cw+height;
		//$("#content").css('height', ch+(height/3*2));	
		$(".slideshow-container").css('height', ch+(height/3*2));	
		
		$("#header").css('width', cw+height);
		$("#footer").css('width', cw+height);
						
	}else if(height>width && width>0){
		//width

		$("#main").css('width', bw+width);
		$("#main").css('height', bh+(width/3*2));	
		
		$("#content").css('width', cw+width);
		//contentw = cw+width;
		//$("#content").css('height', ch+(width/3*2));
		$(".slideshow-container").css('height', ch+(width/3*2));	
		
		$("#header").css('width', cw+width);
		$("#footer").css('width', cw+width);
		
	}else{
		//default
		$("#main").css('width', bw);
		$("#main").css('height', bh);
		
		$("#content").css('width', cw);
		//contentw = cw;
		//$("#content").css('height', ch);
		$(".slideshow-container").css('height', ch);		
		
		$("#header").css('width', cw);
		$("#footer").css('width', cw);
	}
}


