//Scripts by Maciek Ladkowski m.ladkowski@gmail.com
$(document).ready(function(){
    $(".menubutton").mouseenter(function(){
		$(this).css("background","url('images/m1on.gif')");
		$(":first-child",this).css("color","#666666");
		$(":first-child",this).css("margin-left","50px");
		});
	 $(".menubutton").mouseleave(function(){
		$(this).css("background","url('images/m1.gif')");
		$(":first-child",this).css("color","#F5F5AF");
		$(":first-child",this).css("margin-left","20px");
		});
	 $(".menubutton").click(function(){
	   var id = $(this).attr("id");
		window.location.replace(id+".php");
	   });
	 var sciezka = window.location.pathname;
	 if(sciezka.search("programy")>-1){	
	 $("#wskaznik").css("margin-left","224px");}
	 else if(sciezka.search("referencje")>-1){	
	 $("#wskaznik").css("margin-left","244px");}		
	 else if(sciezka.search("dane")>-1){	
	 $("#wskaznik").css("margin-left","264px");}	
	 else $("#wskaznik").css("margin-left","204px");
  });
var program = 'pale2005';
function prog_details(prog){
program = prog;
$("#skroty").slideUp("slow",function(){$("#skroty").load(program+".php",function(){$("#skroty").slideDown("slow");});});
}
function wyslij_mail(){
name = $("#name").val();
email = $("#email").val();
tresc = $("#tresc").val();
$.post("kontakt.php", {name: name, email: email, tresc: tresc}, function(data){$("#formularz").html("<h2>Formularz wysłany</h2>");} );

}

