function fadeWindow(cssid, link, topsize) {
	//document.getElementById('list').style.display='block';
	//document.getElementById('fade').style.display='block';
			
	if (!topsize) topsize = 200;
			
	$("#fade")					
		.css("display","block")
		.css("height", $(document).height())					

	$("#"+cssid)					
		.css("display","block")	
		.css("top", $(window).scrollTop() + topsize)				
		
		$.ajax({
			type: "GET",			
			url: "" + link,

    			error: function(){
        			alert('Error loading XML document.');
    			},
															
			success: function(response){
				$("#"+cssid).html(response);		
			}
		});
}

/*
$(window).scroll(function()
{
	$('.overlay-content').animate({top:$(window).scrollTop()+"px" },{queue: false, duration: 350});  
});
*/

function ajaxSubmit(formid, cssid, link){
	//$('#'+formid).click(function() {		
		//var form = $(this);	
		var form = $('#'+formid);			
		$.ajax({
			type: "POST",			
			url: "" + link,			 
			data: form.serializeArray(),

			error: function(){
        			alert('Error loading XML document.');
    			},

			success: function(response) {
				$("#"+cssid).html(response);								        
		}});
	//});
}

function checkBrowser() {
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	if(IE6) {
		alert('Prosím aktualizujte so váš Internet Explorer.\nTáto stránka je optimalizovaná pre IE 7 a vyšší.\n\nPlease update your Internet Explorer.\nThis page is optimized for IE 8 and higher.');
		window.open('http://www.microsoft.com/windows/internet-explorer/default.aspx','_self','');  		
	}
}

$(document).ready(function() {
	$("#formSearch").attr("autocomplete", "off");   
	$("#formNewsletter").attr("autocomplete", "off");		
}); 


