$(function(){

		var color = new Array("F15A22", "B2D235", "AB4A9C", "602D91", "00AEEF", "0083CA", "00AAAD", "ED1164");
		var colorLength = color.length - 1;
		
		$.each($('div.hentry'), function(i) {
			
			$(this).hover(function(e) {

				var c		= $(this).children('h2');
				var cp		= $(this).children('p.post-meta');
				var w		= ($(this).width() - c.width())/2;
				var wp		= ($(this).width() - cp.width())/2;
				var myCol 	= "#" + color[Math.floor(Math.random()*colorLength)];

				$(c).css({
					"opacity" : "0",
					"visibility" : "visible",
					"background-color" : myCol
				}).hoverFlow(
					e.type, {
					marginRight : w,
					opacity : 1
				}, 800, function(_e) {
					
					cpCheck = $(cp).css("visibility");
					
					// if(cpCheck == "hidden") {
						
						$(cp).css({
							"opacity" : 0,
							"visibility" : "visible"
						}).animate({
							marginLeft : wp,
							opacity : 1
						}, 800);
					// }
				});

			}, function(e) {
				
				var cOut = $(this).children('h2');
				var cpOut = $(this).children('p.post-meta');
				
				$(cOut).hoverFlow(
					e.type, {
					marginRight : 0,
					opacity : 0
				}, 800, function(_e) {
					$(this).css({
						"opacity" : "0",
						"visibility" : "hidden"
					});
					$(cpOut).animate({
						marginLeft : 0,
						opacity : 0
					}, 800, function() {
						$(this).css({
							"opacity" : "0",
							"visibility" : "hidden"
						})
					});
				});
			});
		});

});
