
$(document).ready(function() {
	$('.pictoNav a').click(function() {
		$('.pictoNav a').removeClass('currentPicto');
		$(this).addClass('currentPicto');
		var href = $(this).attr('href');		
		
		$('#tempPic').html('<img src="'+href+'" />');
		//$('#tempPic').attr('src', href);
		//var newHeight = $('#tempPic').height();			
		var newHeight = $(this).attr('rel');			
		var oImg = $('#mainPic');		
								
		oImg.animate({opacity: 0}, 500, '',function(){
			oImg.animate({height: newHeight}, 500, '', function(){
				oImg.attr('src', href);			
				oImg.animate({opacity: 1}, 500);
			});			
		});

		
		return false;
	});
	
	
	$('.docs h2 a').hover(function() {
		//$(this).parents('.item').find('.item_content').show();
		$(this).addClass('highlight');	
		$('#right .item').hide();			
		$('#content_'+$(this).attr('id')).show();	
	}, function() {
		$(this).removeClass('highlight');
		$('#right .item').hide();
		$('.current').show();
	});
	
	var max=0;
	$('#right .item').each(function() {
		var l = $(this).height();
		if(l>max) max = l;
	});
	
	$('#right').css({'height' : (max+100)+'px'});
	
	$('.itemCol').scrollFollow();
});
