
	function potwierdzenie(pytanie,adres) { if (confirm(pytanie)) { document.location.href = adres; } }  
  
  jQuery(document).ready(function(){
		
jQuery.metadata.setType("attr", "validate");

	//jQuery("div#cont_r form").validate();
	
	jQuery('form', this).each(function(){
            jQuery(this).validate();
        });
	
	function replaceString(oldS, newS, fullS) {
		// Replaces oldS with newS in the string fullS
			for (var i = 0; i < fullS.length; i++) {
				if (fullS.substring(i, i + oldS.length) == oldS) {
					fullS = fullS.substring(0, i) + newS + fullS.substring(i + oldS.length, fullS.length);
				}
			}
		return fullS;
	}	

	//jQuery("#aaa_01").click(function(){jQuery("body").css("font-size","10px");});
	//jQuery("#aaa_02").click(function(){jQuery("body").css("font-size","11px");});
	//jQuery("#aaa_03").click(function(){jQuery("body").css("font-size","12px");});

	jQuery(".jezyki_show > div").hide();
	jQuery(".jezyki_show > div.show").show();

	jQuery(".lang_tlum > div").hide();
	jQuery(".lang_tlum > div.show").show();
	
	jQuery("div.znaki select").live("click",function()
	{
		var thisid = jQuery(this).attr("value");
		var thisid2 = jQuery(this).attr("name");
		var thisid_l = parseInt(replaceString("tlum","",thisid2));
		var thisid_l = parseInt(replaceString("_znak","",thisid_l));
		var link = "tlum_div_"+thisid_l;
		var link2 = "tlum_span_"+thisid_l;
		if (thisid==1) { 
			jQuery("div."+link).hide(); 
		} else { 
			var tekst = jQuery("div.znaki select[name='"+thisid2+"'] option[value='"+thisid+"']").text();
			jQuery("span."+link2).html(tekst); 
			jQuery("div."+link).show(); 
		}
	});
	
	jQuery(".jezyki_check input[name='jezyki[]']").live("click",function()
	{
		var thisid = jQuery(this).attr("value");
		var link = "jezyk"+thisid;
		jQuery("div#"+link).toggle();	
	});
	
	var login = jQuery("input[name=f_login]").val();
	var haslo = jQuery("input[name=f_passwd]").val();
	jQuery("input[name=f_login]").click(function(){if(jQuery(this).val()==login){jQuery(this).val("");}});
	jQuery("input[name=f_passwd]").click(function(){if(jQuery(this).val()==haslo){jQuery(this).val("");}});

	
	jQuery(".powrot a").live("click",function() {history.back();return false;});
	
	jQuery(".literki span").live("click",function(){
		var add = jQuery(this).html();
		var obadd = jQuery(this).parent().parent().find("input[name=slowo]");
		var val = obadd.val();
		obadd.val(val+add);
	});
	
  });
  
  
