jQuery.fn.updateMenu1=
function()
{

 return this.each
 (
  function()
  {

    var hash=window.location.hash.substr(1);

    jQuery(this).find("ul li").removeClass("selected");
    jQuery(this).find("ul li").removeClass("lastselected");

    jQuery.each
    (
     index,
     function(i, val)
     {
      if(val.toString().indexOf(hash)!=-1)
      //if(jQuery.inArray(hash,item)!=-1)
      {
       if(i==6)
       {
        jQuery(this).find("ul li:eq("+i+")").addClass("lastselected");
       }
       else
       {
        jQuery(this).find("ul li:eq("+i+")").addClass("selected");
       }
      }
     }
    );


  }
 );
 
};

