$(document).ready(function() 
{
	$('.portfolioItem a').hover(
		function() 
		{
			var tekst = $(this).find('img').attr('alt');
			var img = $(this).find('img');
			var eHover = $(this).find('.hoverTekst');
			var imgOffset = img.offset();
			var imgTop = imgOffset.top;
			var imgLeft = imgOffset.left;
			
			img.filter(':not(:animated)').animate({
				opacity: 0.1
			}, 500);
			
			eHover.filter(':not(:animated)').css({
				top: imgTop + 'px',
				left: imgLeft + 'px'
			}).fadeIn(500);
		},
		function() 
		{
			var img = $(this).find('img');
			var eHover = $(this).find('.hoverTekst');
			
			img.animate({
				opacity: 1
			}, 500);
			
			eHover.fadeOut(500);
		}
	);
	
	/*var CurrentProduct;
	
	$('.product').hover(
		function() 
		{
			var product = $(this);
			
			product.css({
				background : '#000',
				color : '#fff' 
			}).find('a').css({
				color : '#fff'
			});
		},
		function() 
		{
			var product = $(this);
			
			product.css({
				background : '#fff',
				color : '#000' 
			}).find('a').css({
				color : '#000'
			});
		}
	).click(function() 
	{
		$('.product .longDesc').hide();
		
		var ProductIndex = $('.product').index($(this));
		
		$(this).prependTo('#producten');
		
		var NewProductIndex = $('.product').index($(this));
		
		var LongDesc = $(this).find('.longDesc');
		
		if (CurrentProduct != ProductIndex) 
		{
			LongDesc.show();
			CurrentProduct = NewProductIndex;
		}
		else
		{ 
			LongDesc.hide();
			CurrentProduct = null;
		}
		
		return false;
	});*/
});
