jQuery(document).ready(function($) {

  // superfish menus
  $('ul#nav').superfish(
    { 
      delay:       1000,                           
      animation:   {opacity:'show'}, 
      speed:       'fast',                         
      autoArrows:  false,                          
      hoverClass	: 'sfHover',
      dropShadows: true                           
    }
  );

  // cycle
  $("#large_promo-slides").cycle({
    fx: 'fade',
    speed: 'fast',
    timeout: 0, // prevents auto cycling
    pager: '#large_promo-nav',
    pagerAnchorBuilder: function(idx, slide) {
      // return selector string for existing anchor
      return '#large_promo-nav li:eq(' + idx + ')  a';
    }
  });

  // colorbox (http://colorpowered.com/colorbox/)
  $("div.pic a").colorbox({rel:'member_service_photos', photo:true});

  // equalize columns.
  $.fn.v_justify = function() {
    var min_height = 100;
    $(this).find("div.column").each(function() {
      var element = $(this);
      if (element.height() > min_height) {
        min_height = element.height();
      }
    });
    $(this).find("div.column").css({height: min_height+"px"});
  }
  $("div.small_promo div.border_block").v_justify();

});
