	window.onresize=size;
	$(document).ready(function(){
		var count = $(".panel").size();
		var panelWidth = $(".panel").width() + 57;
		w = (count * panelWidth) - 350;
 
		var screenWidth = $("body").width();
		var screenHeight = $("html").height();
 
		$(".contentcontainer").css("width",w);
		            	$(".news").css({height:screenHeight});
		if(screenHeight <= 700){
			$("#mainscroll").css({
				width: screenWidth,
				height: screenHeight - 10,
				marginTop:0
			});
		}else{
			$("#mainscroll").css({
				width: screenWidth,
				height: screenHeight - 10,
				marginTop:5
			});
		}
		if(screenWidth <= 1500){
			$("#top h1").css({
				left: (1536 - screenWidth) / 2,
			})
		}
		
		
	});
	
	function size(){
		var screenWidth = $("body").width();
		var screenHeight = $("html").height();
                 	$(".news").css({height:screenHeight});
		$(".contentcontainer").css("width",w);
		if(screenHeight <= 700){
			$("#mainscroll").css({
				width: screenWidth,
				height: screenHeight + 0,
				marginTop:0
			})
		}else{		
			$("#mainscroll").css({
				width: screenWidth,
				height: screenHeight + 210,
				marginTop:5
			})
		}
	       
               if(screenWidth <= 1500){
			$("#top h1").css({
				left: (1536 - screenWidth) / 2,
			})
		}
		
	
	}


		$(document).ready(function() {
			$("#n1,#n2,#n3,#n0").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		        : 'none',
				'transitionOut'		        : 'none',
				'type'				: 'iframe'
			});
			
		      $("#p1,#p2,#p3,#p0").fancybox({
				'titlePosition'	: 'over'
			});



		});

function flash(id, kolor, czas, kolor2, czas2)
{
	document.getElementById(id).style.color = kolor;
	setTimeout('flash("' + id + '","' + kolor2 + '",' + czas2 + ',"' + kolor + '",' + czas + ')', czas);
}

