$(document).ready(function(){
$("#contentPosts").show();
$("span.pages").remove();
function getPaginatorWidth(){
	var widthpages = document.getElementById("paginator").getElementsByTagName("a");
	var widthlabels = document.getElementById("paginator").getElementsByTagName("span");
	var widthlabel = 0;
	var widthlinks = 0;
	
	for(i=0; i<widthpages.length; i++){
		widthlinks = widthpages[i].offsetWidth + widthlinks;
	}
	for(i=0; i<widthlabels.length; i++){
		widthlabel = widthlabels[i].offsetWidth + widthlabel;
	}
	
	totalWidth = widthlinks+widthlabel;
	return totalWidth;
//	alert (totalWidth);
}

	if($(".wp-pagenavi").html()!= null){
		$(".wp-pagenavi").width(getPaginatorWidth());
	}
	
	var sidebarHeight = $("#sidebar").height()+$("#banner_wrapper").height();
	var contentHeight = $("#contentPosts").height();
	
	
	if(sidebarHeight>contentHeight){
		$("#contentPosts").height(sidebarHeight+100)
	}
	
	
	
/*	
	function equalizeSidebar(){
		var heightSidebar = document.getElementById("sidebar_wrapper").clientHeight;
		var heightcontent = document.getElementById("contentPosts").clientHeight;
		
		
		if(heightSidebar > heightcontent){
			$("#contentPosts").height(heightSidebar);
		}else if(heightSidebar < heightcontent){
			$("#sidebar").height(heightcontent);
		}
	}
	
	var contentHeight = $("#contentPosts").height();
	$("#contentPosts").height(contentHeight - 10);
	
//	equalizeSidebar();*/
		
})
