$(document).ready(function() {
  Splash.init();
});

var Splash = {

  current: '',

  init: function() {
    $(".product").hover(function(){

      var product = $(this);
      if( Splash.current == product.attr('id') ) {
        return false;
      }

      Splash.current = product.attr('id');

      $('.product').removeClass('hover');
      product.addClass('hover');
      Splash.swap( product.attr('id') );

    });

  },

  swap: function( id ) {
    $('.image').stop(true,true).fadeOut("slow");
    $('#' + id + 'Image').fadeIn("fast");
  }
}