var selected=''; var first_value=selected; var basepath='https://www.lupign.it/'; function loadcontent(content) { $("#"+content).html(content); $("#"+selected).html(""+selected+""); $("#about-content").toggle("fast", function() { //faeOut //hide $("
").appendTo("#main"); $("#about-content").load(""+basepath+"about_content.php",{'content': content}, function(){ $(".loading").remove(); $("#about-content").toggle("slow");} //fadeIn //show ); }); urchinTracker('/about/'+content); selected=content; } /// history var first=true; // PageLoad function // This function is called when: // 1. after calling $.historyInit(); // 2. after calling $.historyLoad(); // 3. after pushing "Go Back" button of a browser function pageload(hash) { // hash doesn't contain the first # character. if(hash) { // restore ajax loaded state loadcontent(hash); first=false; } else { // start page if(!first) loadcontent(''+first_value+''); } } $(document).ready(function(){ // Initialize history plugin. // The callback is called at once by present location.hash. $.history.init(pageload); }); function changehistory(rel) { // set onlick event for buttons //$("#main h3 span a").click(function(){ // var hash = rel; //this.rel; hash = hash.replace(/^.*#/, ''); // moves to a new page. // pageload is called at once. $.history.load(hash); //loadcontent(hash); return false; //}); }