$(function() {
  // Fix pngs and shit in IE 6
  if( is_ie6 ) {
    $('img.translucent').each( function() {
      var t = $(this);
      src = t.attr('src');
      t.css({
        filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='"+src+"')",
        width: t.width(),
        height: t.height()
      });
      t.attr('src', themepath + '/images/pixel.gif');
    });
    // Can't have 100% width iframes or tables in IE because IE sucks ass.
    $('table').each( function() {
      var t = $(this);
      if( t.attr('width') == '100%' || t.css('width') == '100%' )
        t.css('width', '99%');
    });
  }
  // Set default APO Region to "any" in Members' List filter form.
  // Only set it if on the correct page and the form hasn't already been submitted.
  if( $(".view-id-userlist form #edit-region").size() > 0 && location.href.indexOf('?') == -1 )
    $(".view-id-userlist form #edit-region").get(0).selectedIndex = 0;
  // If job listings summary block is displayed, move total count to 
  // appropriate <strong> element.
  if( !( typeof job_listings_count === 'undefined' ) ) {
    $('#job-count').append( job_listings_count );
  }
  // Set default value of "Show e-mail address" field in user create form to 
  // checked.
  if( $('form#user-register #edit-profile-showemail').size() > 0 )
    $('form#user-register #edit-profile-showemail').get(0).checked = true;
  // Add link to shopping cart block
  $('.block-uc_cart .content').append('<ul class="menu"><li class="leaf"><a href="/drupal/node/551">Store Help</a></li></ul>');
  // Hide prices of $0
  $(".product-info :contains('$0.00')").hide();
});
