sliding the divs accroding to url
<p>I am having a page here.</p>

<p><a href="http://www.kharota.com/cantsay/index.html" rel="nofollow">http://www.kharota.com/cantsay/index.html</a></p>

<p>What I wanted was to div slide up and down as url changes for example index.html#thisweek will slide the div which contains data of this week. Sometimes it works sometimes its not. I am big confused there is no error but still not working. The code is following</p>

<pre><code>var loc = window.location.href;
if(loc.indexOf( '#' ) &gt;= 0 ) {
   var  hash = loc.substr( loc.indexOf('#') + 1 );
}else{

    var hash = "";
}

if(!hash){
$("#ca").slideDown("fast");     


  }else{




 switch(hash){

     case "iwantagig":
         $("#cd").slideDown("fast");
         $("#ca").slideUp("fast");
         $("#cb").slideUp("fast");
         $("#cc").slideUp("fast");


         break;


     case "jointhecrew":

         $("#cc").slideDown("fast");
         $("#ca").slideUp("fast");
         $("#cb").slideUp("fast");
         $("#cd").slideUp("fast");

         break;


     case "birthdayGuestlist":

         $("#cb").slideDown("fast");
         $("#ca").slideUp("fast");
         $("#cc").slideUp("fast");
         $("#cd").slideUp("fast");

         break;

     case "thisweek":

         $("#ca").slideDown("fast");
         $("#cb").slideUp("fast");
         $("#cc").slideUp("fast");
         $("#cd").slideUp("fast");

         break;



 }
 }
</code></pre>

<p>The page is here. I would be thankful if someone help.</p>

<p><a href="http://www.kharota.com/cantsay/index.html" rel="nofollow">http://www.kharota.com/cantsay/index.html</a></p>
