var ThumbnailCard =
{
	init:function(targetDivId)
	{
		jQuery('#' + targetDivId + ' > .title-display').show();
		jQuery('#' + targetDivId + ' > .title-display').stop().animate( { 'opacity' : 0 }, 0 );
		jQuery('#' + targetDivId).addClass('pointer');
		jQuery('#' + targetDivId).mouseover(function(){
			ThumbnailCard.onMouseOver(targetDivId);
		});
		jQuery('#' + targetDivId).mouseout(function(){
			ThumbnailCard.onMouseOut(targetDivId);
		});
	},
	
	initShow:function(targetDivId)
	{
		jQuery('#' + targetDivId).fadeIn();
	},
	
	onMouseOver:function(targetDivId)
	{
		//alert(jQuery('#' + targetDivId+ ' > a > img').attr('src'));
		
		jQuery('#' + targetDivId + ' > .title-display').stop().animate( { 'opacity' : 1 }, 250 );
		jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : .1 }, 250 );
	},
	
	onMouseOut:function(targetDivId)
	{
		jQuery('#' + targetDivId + ' > .title-display').stop().animate( { 'opacity' : 0 }, 250 );
		jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : 1 }, 250 );
	},
	
	disabledInRolloverState:function(targetDivId, skipFade)
	{
		if(skipFade == true)	//	No initial animation, go straight to dark
		{
			jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : .1 }, 0 );
		}
		else
		{
			jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : .1 }, 250 );
		}
		jQuery('#' + targetDivId).removeClass('pointer').addClass('noPointer');
		jQuery('#' + targetDivId + ' > .title-display').addClass('noPointer');
		jQuery('#' + targetDivId).unbind('mouseover');
		jQuery('#' + targetDivId).unbind('mouseout');
	},
	
	enableInNormalState:function(targetDivId)
	{
		jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : 1 }, 250 );
		jQuery('#' + targetDivId).removeClass('noPointer').addClass('pointer');
		jQuery('#' + targetDivId + ' > .title-display').removeClass('noPointer');
		jQuery('#' + targetDivId).mouseover(function(){
			ThumbnailCard.onMouseOver(targetDivId);
		});
		jQuery('#' + targetDivId).mouseout(function(){
			ThumbnailCard.onMouseOut(targetDivId);
		});
		
		jQuery('#' + targetDivId + ' > .title-display').stop().animate( { 'opacity' : 0 }, 250 );
		jQuery('#' + targetDivId + ' > .thumbnailimage').stop().animate( { 'opacity' : 1 }, 250 );
	}
}


