function check_frm() {
	var chyby = 0;
	var str_err = "";
	if(document.add_rady.nadpis.value == "") {
		str_err = str_err + "Nevyplnili ste otázku \n";
		chyby++;
	}
	if(document.add_rady.clanok.value == "") {
		str_err = str_err + "Nevyplnili ste e-mail\n";
		chyby++;
	}
	if(chyby == 0) {
		document.add_rady.submit();
	} else {
		alert(str_err);
	}
}

function check_frm_recept() {
	var chyby = 0;
	var str_err = "";
	if(document.add_rec.meno.value == "") {
		str_err = str_err + "Nevyplnili ste meno \n";
		chyby++;
	}
	if(document.add_rec.mesto.value == "") {
		str_err = str_err + "Nevyplnili ste mesto \n";
		chyby++;
	}
	if(document.add_rec.nadpis.value == "") {
		str_err = str_err + "Nevyplnili ste názov \n";
		chyby++;
	}
	if(document.add_rec.clanok.value == "") {
		str_err = str_err + "Nevyplnili ste postup\n";
		chyby++;
	}
	if(chyby == 0) {
		document.add_rec.submit();
	} else {
		alert(str_err);
	}
}




$(function() {  
  $("img[@type=transparent], .header-top, .footer, .kvetina .strawberry ul li").ifixpng();
  $('a[@rel*=facebox]').facebox();
  
  $(".uroven1 > li, .uroven2 > li").hover(
    function(){
      $(this).children().filter("[class=uroven2], [class=uroven3]").not(":animated").fadeIn("fast");
      $(this).addClass("hover");
    },
    function(){
      $(this).children().filter("[class=uroven2], [class=uroven3]").fadeOut("fast");
      $(this).removeClass("hover");
    }
  );
  
  $("#container > div.content > div[class!=clear]").equalHeights(true);
  
  
  // NVM CO S TYM
  // TODO: FINISH OR DELETE
  
  /*
  var footer = $("#container > div.footer");
  var footerBottom = footer.position().top + footer.outerHeight();
  var contentBottom = ($("#container > div.content").position().top + $("#container > div.content").outerHeight());
  var addContentHeight = footerBottom - contentBottom;
  */
  
});


var globZal = '';

function selZalozka(id, go) {
	$('#tab_'+id).attr('class', 'tab big');
	$('#tab_'+globZal).attr('class', 'tab');
	globZal = id;
	
	var data = '';
	
	jQuery.ajax({
		data: data,
		url: 'services.php?get=search-type&show='+go,
		type: 'POST',
		timeout: 3000,
				
		error: function() {
			alert('Dotaz zlyhal');
		},
		success: function(result) {
			$('#zalContent').html(result);
		},
		beforeSend: function() {
			
		},
		complete: function() {
			
		}
	})		
}

/*
function get_cat(go, item) {
	var data = '';
	
	jQuery.ajax({
		data: data,
		url: 'page.php?go='+go+'&parent='+item+'&sid=<?echo $_GET["sid"]?>',
		type: 'POST',
		timeout: 30000,
				
		error: function() {
			alert('Dotaz zlyhal');
		},
		success: function(result) {
			$('#zalContent').html(result);
		},
		beforeSend: function() {
			
		},
		complete: function() {
			
		}
	})		
}

function get_item(go, parent, item) {
	var data = '';
	
	jQuery.ajax({
		data: data,
		url: 'page.php?go='+go+'&parent='+parent+'&item='+item+'&sid=<?echo $_GET["sid"]?>',
		type: 'POST',
		timeout: 30000,
				
		error: function() {
			alert('Dotaz zlyhal');
		},
		success: function(result) {
			$('#zalContent').html(result);
		},
		beforeSend: function() {
			
		},
		complete: function() {
			
		}
	})		
}

*/

