// When the document loads do everything inside here ...
     $(document).ready(function()
	 {
	 Nifty("#menu a","small top transparent");
	 Nifty("#outcontent","medium bottom transparent");
	 $('.content').load('boo.php');	//by default initally load text from boo.php
        $('#menu a').click(function() 
		{ //start function when any link is clicked
		 	$(".content").slideUp("slow");
			var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
				
				$.ajax
				({
					method: "get",url: "boo.php",data: "page="+content_show,
					beforeSend: function(){$("#loading").show("fast");}, //show loading just when link is clicked
					complete: function(){ $("#loading").hide("fast");}, //stop showing loading when the process is complete
					success: function(html)
					{ //so, if data is retrieved, store it in html
						
						$(".content").show("slow"); //animation
						$(".content").html(html); //show the html inside .content div
						
						document.getElementById("about").className = ""; 
						document.getElementById("contact").className = ""; 
						document.getElementById("noutati").className = ""; 
						
						document.getElementById(content_show).className = "active";
						
						document.getElementById("sound").innerHTML = '<embed  src="sound3.wav" hidden="true" volume="200" loop="0" type="audio/midi" >'; //play sound
					}
				}); 
			});
	 });