/* Join us column - hiding Most Popular cards */
   $j('div.innerTube5px div.card_two').hide();

/* changes blog last post date format */
   var this_text = $j('span.blog_pubDate').text();
   this_text = this_text.substring(0,this_text.length - 15);
   $j('span.blog_pubDate').text(this_text);

/* changes blog last post date format */
   var this_text = $j('span.blog_pubDate2').text();
   this_text = this_text.substring(0,this_text.length - 15);
   $j('span.blog_pubDate2').text(this_text);


/* Join us column cards switcher */
/* cards functionality */
   $j('ul.subTabs li').click(function(){
      if ($j(this).attr('class') != 'crumbTrail'){
          $j(this).addClass('crumbTrail');
          $j(this).siblings().removeClass('crumbTrail');

          var card_name = $j(this).children('a').attr('class');       
          var open_card = $j(this).parent('ul').parent('div').siblings('div.subTabsBody').children('div');
          open_card.children('div').hide();
          open_card.children('div.'+card_name+'').show();
      }
   });


 /* Hides arrow in bottom sub-nav if sub-nav is empty */
   if ($j('ul.subnav_with_arrow li').length == 1) {$j('ul.subnav_with_arrow').hide();}

   $j('ul.subnav_with_arrow li:last span').remove();
   $j('ul.footerNav li:last span').remove();



/* removes | in top subnav */
$j('span.subnav_divider:last').remove();

/* External links opens in new window */
   $j('a.external_link').each(function(){
      $j(this).attr('target','blank');
   });


/* Add Bookmark functionality */

   $j('a.add_bookmark').click(function(){

      var b_title = $j('#col100percent h2').text();
      var b_href = window.location.href;

      if (window.sidebar) { window.sidebar.addPanel(b_title, b_href,""); }
      else if ( window.external ) { window.external.AddFavorite( b_href, b_title); }
      else {alert('Unfortunately, this browser does not support the requested action, Press "Ctrl + D" or "CMD + D" for MAC, to add this page to your bookmarks.');}

   });


