

/* custom js */


$().ready(function() {
  
	

	$('.scrollPane').jScrollPane();
  
  
});

var switchP = 1;

function moveBlock(page, target) {

	
	if(switchP) {
		$("#"+target).hide("slide" , {direction : 'left' } , 800 , function() {
			
			$(".page").fadeOut().animate( { left:"417px"}, 200);
		    $("#nav").fadeOut().animate( { left:"417px"}, 200);
		        	
			$("#block").animate( { left:"0px"}, 1000  , function() { 
	         	url = domain+"index.php?page=AJAXresto&f="+page;
		        $.get(url, "", function(data) {
		        	
		        	$(".page").fadeIn().animate( { left:"417px"}, 400);
		        	$("#nav").fadeIn().animate( { left:"417px"}, 400);
		        	$("#"+target).css( { left:"417px"});
		    		$("#"+target).html(data).fadeIn();
		  		});
	         });
	         
	         switchP = 0;
			
		});
	}
	else  {
		
		$("#"+target).hide("slide" , {direction : 'left' } , 800 , function() {
			$(".page").fadeOut().animate( { left:"417px"}, 400);
		    $("#nav").fadeOut().animate( { left:"417px"}, 400);
		    
			$("#block").animate( { left:"650px"}, 1000  , function() { 
	         	url = domain+"index.php?page=AJAXresto&f="+page;
		        $.get(url, "", function(data) {
		        	$("#"+target).css( { left:"30px"});
		        	$(".page").animate( { left:"30px"}, 400).fadeIn();
		        	$("#nav").animate( { left:"30px"}, 400).fadeIn(); 
		    		$("#"+target).html(data).fadeIn();
		  		});
	         });
	         
	         switchP = 1;
			
		});
	}
	
		
			    
		
		/*url = domain+"index.php?page=AJAXresto&f="+page;
	       
		$("#content_").jScrollPane();
		$("#"+target).fadeOut(2000, function () {
	       	$.get(url, "", function(data) {
		   		$("#"+target).html(data);
		   		
		   		$("#"+target).fadeIn("slow");
		   		$("#content_").jScrollPane();
			});
	    });*/
	  
		
		
	}
