i am working on jquery and javascript. and is there any way to make the page refresh and to restore the same link which is clicked. for example. in gmail.com when we open sent items which is in the lefthand side of the window and refresh the page. it get reloaded with the same sent items tab's contents, same things work for inbox and drafts when refreshed. is there anyother method or example to acheive this. if yes. please help. it would be appreciated.

here is my code to make the page refresh on refresh:

```
<script>
   $(window).load(function(){
  $(function()
   {
    $('#submit').click(function()
      { 
          $('.container').show();
          $('#login').hide();
            $.cookie('shown', true);
            });
          if ($.cookie('shown')) {
              $('#submit').click()
          }
        });
     });  

   </script>

```