subtract the full url after the hash
===

i want to load my pages on my website with AJAX and jQuery. It works fine but the url's looks

[***http://mywebsite.com/#mywebsite.com/thepage***][1]

i want to subtract the url so it looks like 

[***http://mywebsite.com/#thepage***][2]

i hope someone know how to do that. This is the code:

    if(window.location.hash) {
      
    } else {
      window.location="#THE_FULL_URL";
    }

    var newHash      = "",
        $mainContent = $("#wrapper"),
        $pageWrap    = $("#wrapper"),
        $el;
    
    $("a").live("click", function(event){
        window.location.hash = $(this).attr('href');
        return false;
    });
    
    $(window).bind('hashchange', function(){

        var hash = location.hash;
        document.title = ( hash.replace(/^.*#/, '') || 'blank' ) + '.';
    
        newHash = window.location.hash.substring(1);
        
        if (newHash) {
            $mainContent
                .find(".content")
                .fadeOut(200, function() {
                    $mainContent.hide().load(newHash + " .content", function() {
                        $mainContent.fadeIn();
                        fix();
                    });
                });
        };
        
    });
    
    $(window).trigger('hashchange');


  [1]: http://
  [2]: http://