$(document).ready(function(){
//Shadowbox.init();
$("li:first-child").addClass('no1'); $("li:last-child").addClass('no0');

$('#prestige').children().each(function(){
 $(this).hover(function(){ 
  if(!$(this).children('a').hasClass("hover") && $(this).children('a').attr("href").indexOf("#")!=-1 ){
   //$(this).parent().children('li.on').children('ul').each(function(){$(this).queue("fx", [])});
   $(this).addClass("on");
   $(this).children('a').addClass("hover").children('span').addClass("hover");
   var $toto=(-150+$(this).width())+'px 0px';
   $(this).children("ul").attr("style","").css({backgroundPosition:$toto}).slideDown("slow",function(){
   $(this).parent().children('a').addClass("hover").children('span').addClass("hover");
   })
   }
  else
   {
   $(this).removeClass("on");
   } 
 
 },function() {
  if($(this).children('a').hasClass("hover") && $(this).children('a').attr("href").indexOf("#")!=-1 ){
  //alert($(this).children("ul").queue("fx").length);
  $(this).removeClass("on");
  $(this).children("ul").each(function(){$(this).stop();$(this).slideUp("fast",function(){$(this).parent().children('a').removeClass("hover").children('span').removeClass("hover");});});
   //$(this).addClass("off");
   //$(this).removeClass("on");
 };
 });
 });
 
 
});
