/*
** about.js - Library Javascript Library
** jgriffith
**
*/

//Core.log.email = true;

Core.settings({site:'about'});

(function($){

var About = {
  
    ondomready: function() {
        About.tabnav();
        About.expandables();
        About.statistics();
        Core.add_link_class("#centercol");
        $("hr").replaceWith('<div class="hr"></div>');
        if (window.analytics) {analytics.save()}
        $(".sharethis").each(function(){  Core.sharethis(this);}  );
        $("#javascript").removeClass('rendering').addClass('domready');
    },

    expandables: function() {
        $("#content dl.expandable dd").addClass("closed");
        $("#content dl.expandable dt").click(function() {
          $(this).toggleClass("open");
          $(this).next().toggleClass("closed");
        });
    },
   
    statistics: function() {
        $("a.footnote").hover(function(){$("span",this).show()},
                              function(){$("span",this).hide()})
    },

   
    links: function() {
       $("#content a").each(function() {
          // comment add .ext class
          $a = $(this);
          if (this.href && !/mailto/.test(this.href)) {
             if (! /hbs.edu/.test(this.href)) {$a.addClass("ext");}
             if ( /.pdf$/.test(this.href)) {$a.addClass('pdf')}
          }
          if ($a.hasClass("new_window")){
              $(this).click(function(){
                 Core.new_window(this);
                 return false;
              }); 
           }  
       });
    },
   
   
    /*
     * Add an 'on' class to the tabnav
     */
    tabnav: function() {
      $("div.tabnav a:thisurl").parent().addClass('on');
    },
   
    last:''
}


window.About = About;

$(document).ready(function(){About.ondomready();});

})(jQuery);


