function switchclass(cl, n)
{
	var g = cl.getAttribute("class");
	if(g == n)		g = n+"_sulki";
	else			g = n;

//	if(g == n+"_sulki")	g = n;
//	else			g = n+"_sulki";

//	if(g == n+"_sulki")
//		setTimeout("cl.setAttribute(\"class\", g);",1250);
//	else

	cl.setAttribute("class", g);
	resizeit();
}

	function resizeit(){
		var window_width = $(window).width();
		if (window_width < 950) {
		$('#wrap').css('width', '950px');
		}else {
		$('#wrap').css('width', '100%');
		}
		var wrap_height = $("#wrap").height();	
		var lastwrap = $("#footerwrap").prev();		
		var lastwrap_height = lastwrap.offset().top + lastwrap.height();
		var footerwrap_height = $("#footerwrap").height() + 2;
		var footer_old = $("#footer").height();
		var footer_height = wrap_height - lastwrap_height - footerwrap_height;
		var footer_total = footer_old + footer_height + 100;

		if(footer_total > 100) footer_total = 100;
		$('#footer').css('height', ''+(footer_total)+'px');
	}

