function ajaxUrl(href){
$.post(
href,
{'ajaxes_loaders' : null},
function (data){
var data = $(data);
var elem = data.find('#content').html();
$("#content").html(elem);
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
);
}
if (history.pushState){
$(window).on('popstate', function(event){
var loc = event.location || ( event.originalEvent && event.originalEvent.location ) || document.location;
ajaxUrl(loc.href);
});
$(document).on('click', 'a[load != "none"]', function(e){
var href = $(this).attr('href');
if (href != null){
ajaxUrl(href);
var titl = $('div[title]').text();
document.title = titl;
history.pushState(href, titl, href);
e.preventDefault();
}
});
}