/* custom JS for AlternativeLaw.com, tied to default theme */

(function($){
  
  Drupal.behaviors.alThemeLoad = {
    'attach': function(context, settings) {
      try{

        // on homepage, enable quicktabs switch with HOVER (rollover) not just CLICK.
        // doesn't seem to be built into quicktabs module anymore (?)
        if ($('body.front #block-quicktabs-front-page-rollover-wide').size()) {   // in the right place
          $('#block-quicktabs-front-page-rollover-wide ul.quicktabs-tabs li').bind('mouseover', function(event){
            // do the same as a click would do, i.e. toggle that tab
            $(this).find('a').click();
          });
        }

      }catch(e){} //suppress errors
    }
  };
  
})(jQuery);;

