jQuery(document).ready(function() {
/*
  // Resize the h1 tags so that they can float properly.
  var img_width = jQuery('#primary .primary img').width();
  var primary_width = jQuery('#primary .primary').width();
  var embed_width = (primary_width - img_width) - 20;
  jQuery('#primary .primary h1').width(embed_width);
*/

  // Deletes value of search box
  jQuery('#sidebar form input.input').click(function() {
    if(jQuery(this).attr('value') == 'SEARCH OUR SITE') {
      jQuery(this).attr('value','');
    }
    return false;
  });

  jQuery('#primary .search form input.input').click(function() {
    if(jQuery(this).attr('value') == 'SEARCH AGAIN') {
      jQuery(this).attr('value','');
    }
    return false;
  });

  // Resizes the nav menu
  var current_width = jQuery('#nav li.current').width();
  jQuery('#nav li.current').width(current_width-14);

  // Deletes the value of the search for IE6
  jQuery('#sidebar input.submit').attr('value','');

/*
  // Finds the height of the sidebar module to correctly
  // add the shadow behind it.
  var height = jQuery('#sidebar .module').height();
  var width = jQuery('#sidebar .module').width();
  var padding_width = jQuery('#sidebar .module').css('padding-left');
  var has_number_crunch = jQuery('#sidebar .module').hasClass('entry_number_crunching');
  if(!has_number_crunch) {
    if(padding_width) {
      padding_width = padding_width.replace('px','') * 2;
      width = width + padding_width;
      var padding_height = jQuery('#sidebar .module').css('padding-top');
      padding_height = padding_height.replace('px','') * 2;
      height = height + padding_height;
      jQuery('#sidebar .module_bg').css({
        height: height,
        width: width
      });

      if(jQuery.browser.msie() && jQuery.browser.version.number() == '7.0') {
        jQuery('#sidebar .module_bg').css({
          top: 4
        });      
      }
    }
  }
*/

  // Open/close share section
  jQuery('.article_links li.share > a').click(
    function() {
      jQuery(this).next().toggle();
      jQuery(this).parent().toggleClass('current');
     // jQuery('.article_links').css('margin-bottom','70px');
      return false;
    }
  );

 /* if(typeof sIFR == "function"){
    var archer = '/data/archer.swf';
    // This is the preferred "named argument" syntax
    //sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#ffffff", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));
    sIFR.replaceElement(named({sSelector:"#primary h1", sFlashSrc:archer, sColor:"#192752", sLinkColor:"#192752", sBgColor:"#ffffff", sWmode:"transparent", sFlashVars:"offsetTop=-9&size=45"}));
    sIFR.replaceElement(named({sSelector:"#primary h2", sFlashSrc:archer, sColor:"#192752", sLinkColor:"#192752", sBgColor:"#ffffff", sWmode:"transparent", sFlashVars:"offsetTop=-6&size=30"}));
    sIFR.replaceElement(named({sSelector:"#primary h3", sFlashSrc:archer, sColor:"#fc9933", sLinkColor:"#fc9933", sBgColor:"#ffffff", sWmode:"transparent", sFlashVars:"offsetTop=-3&size=20"}));
    sIFR.replaceElement(named({sSelector:"#sidebar .entry_module_other h2", sFlashSrc:archer, sColor:"#fc9933", sLinkColor:"#fc9933", sBgColor:"#f2efea", sWmode:"transparent", sFlashVars:"offsetTop=-3&size=20"}));
    sIFR.replaceElement(named({sSelector:"#sidebar .entry_number_crunching h2", sFlashSrc:archer, sColor:"#fc9933", sLinkColor:"#fc9933", sBgColor:"#ffffff", sWmode:"transparent", sFlashVars:"offsetTop=-3&size=20"}));
    sIFR.replaceElement(named({sSelector:"#sidebar h3", sFlashSrc:archer, sColor:"#192752", sLinkColor:"#192752", sBgColor:"#ffffff", sWmode:"transparent", sFlashVars:"offsetTop=-3&size=18"}));
  };*/
});