//drop down menu

jQuery(document).ready(function(){
	//jQuery("ul#nav ul.children").parent().append("<span></span>");
	//jQuery("ul#nav ul.children span").addClass("child");
	
	/* for pages and categories menu by default */
	jQuery("ul#nav li ul").parent().append("<span></span>");
	jQuery("ul#nav ul span").addClass("child");

    jQuery("ul#nav li").hover(function(){    	
        jQuery('ul:first',this).css('display', 'block');    
    }, function(){    
        jQuery('ul:first',this).css('display', 'none');    
    });    
    
    
    
     // equalize the children container heights
	  jQuery(".equalize").each(function() {
	    // initializes a max height
	    var heightfixmax = 0;
	    // iterates through all the children and finds the tallest height
	    jQuery(this).children().each(function() {
	      if (jQuery(this).height() > heightfixmax) {
	        heightfixmax = jQuery(this).height();
	      }
	    });
	    // makes all children the same (max) height
	    jQuery(this).children().each(function() {
	      jQuery(this).height(heightfixmax);
	    });
	  });


});