$(document).ready(function() {
  $('body#markets ul.market_nav li').hover(function() {
    active = $(this);
    activeID = active.attr("id");
    active.toggleClass("active");
    active.append(" <span class='activearrow'> > </span>");
    $('div#' + activeID).toggle();
    
    // maybe useful if iteration is required
    // $.each(active.parent().children(), function(){
    //       alert(this);
    //       if( this.attr("id") == activeID ){
    //         alert("green");
    //       }
    //     });
    
  }, function() {
    active.toggleClass("active");
    $('div#' + activeID).toggle();
    $(".activearrow").remove();
  });
  
  $("#new_contact").validate();
});
