var MENU = {
  // Menu feature for every page.
  hide_class: ".hide",
  expandable_class: ".expandable",

  init: function() {
    this.hide_hideables();
    this.add_togglers();
  },

  hide_hideables: function() {
      $("#nav ul li ul li ul li").hide();
  },

  add_togglers: function() {
    $(".expandable").each(function(){
      $(this).click(function(){
          $(this).next().children().toggle("fast")
          return false;
      });
    });
  }

  // toggle_set: function(id) {
  //   $("."+id).each(function(){
  //     $(this).toggle(MENU.hide_speed);
  //     // This *should* work, no?
  //     // if ($(this).is(":hidden")) {
  //     if ($(this).css("height") != "1px") { // hidden
  //       MENU.hide_set(this.id);
  //     }
  //   });
  // },

  // hide_set: function(id) {
  //   $("."+id).each(function(){
  //     $(this).hide(MENU.hide_speed);
  //   });
  // }
}

// $(document).ready(function(){
//   // Add init()s for various features here.
//   MENU.init();
// });


// functions below may be jquery based or straight javascript
$(document).ready(function() {
  
   // do stuff when DOM is ready
   //alert('jquery Active. DOM is ready!');
   
   // XHTML COMPLIANT fix for target=”_blank”
   $("a[@rel~='external']").click(function(){
     window.open($(this).attr("href"));
     return false;
   });
   
   // DROP SHADOW FILTER
   $(document).ready(function(){
     $("img.dropshadow").wrap("<div class='wrap1'><div class='wrap2'>" +
       "<div class='wrap3'></div></div></div>");
   });
   
});