
$('document').ready(function(){

	
	var child_len = $('.popularHealth .popular_health_section li').length;
	
	var pophealth_ul = '<ul class="pophealth_ul"></ul>';
	var pophealth_ul2 = '<ul class="pophealth_ul2"></ul>';
	var pophealth_ul3 = '<ul class="pophealth_ul3"></ul>';
	
	$('.popularHealth .popular_health_section li:first-child').before(pophealth_ul);
	$('.pophealth_ul').after(pophealth_ul2);
	$('.pophealth_ul2').after(pophealth_ul3);

	o = child_len / 3;
	

	i = 5;
	
	
	
	while(i <= (child_len + 4)){
	
		
		if(i <= (o + 4)){
		
			//alert(i);
			
			$('.pophealth_ul').append($('.popularHealth .popular_health_section li:nth-child('+i+')'));
			
			
			
			
		
		}else if(i <= (o+o+4)){
		
			//alert(i);
		
			$('.pophealth_ul2').append($('.popularHealth .popular_health_section li:nth-child('+i+')'));
		
		}
		else{
		
			//alert(i);
			
			$('.pophealth_ul3').append($('.popularHealth .popular_health_section li:nth-child('+i+')'));
		
		}

			
			


			
		
		

		i++;
		
	}

	$('ul.popposts').prev().addClass('popposts_title');
	$('h3.popposts_title').parent().addClass('popposts_widget');

	


/*	$('ul.popposts li').each(function(i) {
    	alert(index + ': ' + $(this).html());
	}); */
  
	
	


});
