$(document).ready(function(){
	$.historyInit(pageload);
});  

function pageload(hash) {
//	alert("asasasas");
	pageTracker._trackPageview("motor/?"+hash+"&blog_id="+$id_blog+"&no-cache="+cache_not);
//	alert('pageload - '+hash);
	if(!check_mayor(hash)) return;
	var cache_not=Math.random();  

	if(hash) {
		$("#box_load").show();
		$("#box_cont").hide();
		$.ajax({
			type: "POST",
			url: "../motor/?"+hash+"&blog_id="+$id_blog+"&no-cache="+cache_not,
			success: function(html){
				$("#box_load").hide();
				$("#box_cont").html(html);
				$("#box_cont").fadeIn(1100);
			}
		});
	}  
	else  
	{  

		var_accion(hash);
		$("#box_cont").hide();
		$("#box_load").show();
		$.ajax({
			type: "POST",
			url: "../motor/?pill=3&blog_id="+$id_blog+"&no-cache="+cache_not,
			success: function(html){
				$("#box_load").hide();
				$("#box_cont").html(html);
				$("#box_cont").fadeIn(1100);
			}
		});
	}  
} 
