$('#wrapper div').mouseover(function(){
	
	
	$(this).children('span').addClass('active');
	$(this).prevAll().children('span').addClass('active')
	
});

$('#wrapper div').mouseout(function(){
	
	
$(this).prevAll().children('span').removeClass('active')
		$(this).children('span').removeClass('active');
	
});