$(function() {
   $(".navi_link").click(function(){
     $("#page_navi").load($(this).attr("href")+" #menu ");
     $("#page_content").load($(this).attr("href")+" #content ");
     return false;
  });
  $("#next_flat").click(function(){
    $("#wohnungsangebote").load("/wohnungsangebot.php5");
    return false;
  })

});

/*
var $j = jQuery.noConflict();
	var $ = {};
	// 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
      $j("#page_navi").load(hash +" #menu ");
			$j("#page_content").load(hash +" #content ");
		} 
	}
	
	$j(document).ready(function(){
		// Initialize history plugin.
		// The callback is called at once by present location.hash. 
		$j.history.init(pageload);
		
		// set onlick event for buttons
		$j(".navi_link").livequery('click', function(){
			// 
			var hash = this.href;
			// hash = hash.replace(/^.*#/, '');
			// moves to a new page. 
			// pageload is called at once. 
			$j.history.load(hash);
			return false;
		});
	});
*/