/**
 *  @requires   jQuery HoverIntent plugin
 *              http://cherne.net/brian/resources/jquery.hoverIntent.html
 */
var animspeed = 500;
$(function(){
  $('#tabs a').hoverIntent(
    function(){
      if($(this).hasClass('active')){
        return false;
      }else{
        $('#tabs a.active').removeClass('active');
        $(this).addClass('active');
        var showThis = '#img-'+$(this).parents('li[id]').attr('id');
        $('#tabimages div.active:visible').fadeOut(animspeed);
        $(showThis).fadeIn(
          animspeed,
          function(){
            $(this).addClass('active');
          }
        )
      }
    },
    function(){ return false; }
  );
});
