$(document).ready(function(){
	$('.boxgrid.captionfull').hover(
	  function(){ activeCat( this.id ); },
	  function(){ deactiveCat( this.id ); }
	);
	
	$('.cat_menu_link').hover(
	  function(){ activeCat( this.id.replace( /_link$/, "" ) ); },
	  function(){ deactiveCat( this.id.replace( /_link$/, "" ) ); }
	);
});

function activeCat( id ){
  // $("#" + id + " .cover").hide();
  // $("#" + id + " .cover").css({top:'0px', border: '10px solid red'});
  // $("#" + id).stop().animate({top:'-100px'},{queue:false,duration:0});
  $("#" + id + ">.boxcaption").show();
  $("#" + id + "_link" ).addClass('current');
  $("#" + id + "_text" ).show();
}

function deactiveCat( id ){
  $("#" + id + ">.boxcaption").hide();
  // $("#" + id + " .cover").stop().animate({top:'133px'},{queue:false,duration:0});
  $("#" + id + "_link" ).removeClass('current');
  $("#" + id + "_text" ).hide();
}