$(document).ready(function(){
	var pallette = ['salmon', 'turquoise', 'dark-turquoise' ,'pink', 'yellow' ,'green' ,'orange' ,'red'];  			  	
	var tempArray = [];
	var i = 1;
	
	tempArray = tempArray.concat(pallette);

	$('.widget a').each(function(){
		
 		var colour = getRandomColour();
 		
 		$(this).hover(function(){
 			$(this).addClass(colour);
 		}, function(){		
 			$(this).removeClass(colour)
 		})
 });
 
 $('.post').each(function(){
 
 
 	$(this).fadeIn(i * 500);	
 		i++;
 	})
 
 $('.post-entry a').each(function(){
		var colour = getRandomColour()

 		$(this).addClass(colour);
 }); 
 
 
 function getRandomColour(){
	
	var num = Math.floor((tempArray.length-1) * Math.random());
 	var colour = tempArray[num];
	tempArray.splice($.inArray(colour, tempArray), 1)
	
	if(tempArray.length == 1){
		tempArray = tempArray.concat(pallette);
	}
	
	return colour;
}
   	   	
});



		
