hiding all other object in array

hiding all other object in array

hi,

i'm an actionscript3 developer who is somewhat new to js/jquery and am struggling through creating a site using jquery.

I would like to be able to use the show/hide/toggle methods to switch between content using a standard navigation list. basically, what I want to do is this:

1. store list of 10 <divs> in array with the id set to w1_blog, w2_blog, etc
2. list of 10 links with ids = w1_blog_a, w2_blog_a, etc.
3. store references to divs and links in array/s
4. add event listener to each link
5. .click event calls function that loops through each blog entry and shows the one matching the link (w1, w2, etc) and hides all others.

I could do this in 2 mins in as3 but I'm struggling with the js syntax, despite it being very close to as3. It should (I think) look something like this:

$(document).ready(function(){
   
   var blogArr = new Array();
   var blogLinkArr = new Array();
   
   for(i = 1; i <= 10; i++)
   {
      blogArr[i] = (new String("#w".concat(i).concat("_blog")))
      blogLinkArr[i] = (new String("#w".concat(i).concat("_blog_a")))
      $(blogLinkArr[i]).click(function(event)
      {
         hideOthers($(event.currentTarget), blogArr, blogLinkArr)
      });
   }
});

function hideOthers(e_target, blogArr, blogLinkArr)
{
   
   for (i = 1; i <= 10; i++)
   {
      if (e_target == blogLinkArr[i] )
      {
            $(blogArr[i].show('slow'));
      }
      else
      {
            $(blogArr[i].hide('slow'));
      }
     
   }
}


Can anyone suggest a sensible way of doing this? Any help would be gratefully received.