
		function refreshContent(action, lang, foto) {
		  
		  $("#content").fadeOut("fast", function(){
		  	$(".menu_bottom_left").fadeOut(1);
		  	
//		    $("#content").load("getrandomcontent.php?action="+action+"&lang="+lang +"&foto="+foto,false, function() {
		      $("#content").load("getrandomcontent.php?foto="+foto+"&action="+action+"&lang="+lang,false, function() {
		      $("#content").fadeIn("fast");
		      $(".referencje .text_box").hide();
		      $(".menu_bottom_left").fadeIn(1);
		      
		      $(document).pngFix(); 
		      $(".referencje h3").click(function(){
				$(this).next(".text_box").slideToggle("slow")
				.siblings(".text_box:visible").slideUp("slow");
				$(this).toggleClass("active");
				$(this).siblings("h3").removeClass("active");
				
			});
		      
		    });
		  })
		 
		 	
		  return false;
		}
		
		function refreshFotoMain(action, lang, foto) {
		  $("#change_foto_main").fadeOut("normal", function(){
//		    $("#change_foto_main").load("getanotherfoto.php?action="+action+"&lang="+lang+"&foto="+foto,false, function() {
			    $("#change_foto_main").load("getanotherfoto.php?foto="+foto+"&lang="+lang+"&action="+action,false, function() {
		      $("#change_foto_main").fadeIn("normal");
		    });
		  })
		 
		 
		  return false;
		}
		
		
		function refreshGaleriaByArrows(action, lang, foto, direction) {
		  $("#change_foto_small").fadeIn("1000", function(){
		    $("#change_foto_small").load("getanotherfotosmall.php?foto="+foto+"&lang="+lang+"&action="+action+"&direction="+direction,false, function() {
		      $("#change_foto_small").fadeIn("1000");
		    });
		  })
		 
		 
		  return false;
		}
		
		
			
		
		
	$(document).ready(function(){  
		
	$(document).pngFix(); 
	$("#jquery_jplayer").jPlayer({
		ready: function () {
			$(this).setFile("music/music.mp3", "music/music_better.ogg").play();
		},
		
		volume: 50,
		oggSupport: true
	})
	.jPlayerId("play", "player_play")
	.jPlayerId("pause", "player_pause")
	
    
      $("#jquery_jplayer").onSoundComplete( function() { // Executed when the mp3 ends  
          $(this).play(); // Auto-repeat  
      });  
  }); 
		