// JavaScript Document
$(document).ready(function() {  
  
    // Check for hash value in URL  
    var hash = window.location.hash.substr(1);  
    var href = $('.plotmap').each(function(){  
        var href = $(this).attr('id');  
        if(hash==href.substr(0,href.length-4)){  
            var toLoad = hash+'.php';  
            $('#dyninfo').load(toLoad)  
        }  
    });  
  
    $('.plotmap').click(function(){  
  
    var toLoad = $(this).attr('id')+'.php';  
    $('#dyninfo').hide('fast',loadContent);  
    $('#load').remove();  
    $('#loader').append('<span id="load">LOADING...</span>');  
    $('#load').fadeIn('normal');  
    window.location.hash = $(this).attr('id').substr(0,$(this).attr('id'));  
    function loadContent() {  
        $('#dyninfo').load(toLoad,'',showNewContent())  
    }  
    function showNewContent() {  
        $('#dyninfo').show('normal',hideLoader());  
    }  
    function hideLoader() {  
        $('#load').fadeOut('normal');  
    }  
    return false;  
  
    });  
});  

