$(document).ready(function() {
  $('#kctabs ul').superfish({
    animation: {opacity: 'show', height: 'show'},
    autoArrows: false,
    delay: 100,
    dropShadows: false,
    disableHI: true,
    speed: 'fast'
  });
  $('a.tab').click(function() {
    return false;
  });

	// start with #kctab14 showing
  $('#kctab14').show();
  div_showing = "#kctab14";
  $('.trigger').click(function() {
    thisid = $(this).attr('id');
    tab_selected = "#"+thisid.substring(0,6);
    div_to_show = "#"+thisid.substring(0,7);
    $('.trigger').removeClass("on");
    $('a.tab').removeClass("selected");
    $(this).addClass("on");
    $(tab_selected).addClass("selected");
    $(div_showing).fadeOut("normal", function() {
      $(div_to_show).fadeIn("fast");
    });
    div_showing = div_to_show;
    return false;
  });
  $('a.close').click(function() {
    $(div_showing).slideUp("fast", function() {
      $('a.tab').removeClass("selected");
      $('a.trigger').removeClass("on");
    });
    return false;
  });
  $('.more_content').hide();
  $('a.more').click(function() {
    $(this).toggleClass('expanded');
    $(this).next().slideToggle();
    return false;
  });
  $('#bottom ul').kwicks({
    max: 600,
    duration: 500,
    spacing: 20
  });
  $('.prod_text').hoverIntent(
    function() {
      $(this).find("div:last").fadeOut();
    },
    function() {
      $(this).find("div:last").fadeIn();
    }
  );
});