//IGUALAR COLUMNAS (MENU Y CONTENIDO)
function equalHeight(group) {
tallest = 0;
group.each(function() {
thisHeight = $(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}

function campoInt() {

   //Consigue valores de la ventana del navegador  
   var ancho_web = $(".contenedorGeneralWeb").width();  
   var ancho_banners = $(".contenedorGeneralBanners, .contenedorGeneralBanners2").width();  
     
   //Centra el popup     
   ancho_web_variable = (ancho_web) + (ancho_banners);  
   $(".contenedorGeneral").css("width", ancho_web_variable + "px");  
}
function altoCelda() {
	
/**************************/

   var altofila = $(".bodyTabla .fila").height();  
/*****************************/

   $(".bodyTabla .fila .celda").css("height", altofila, + "px");  
}

$(document).ready(function() {
altoCelda($(".celda"));
campoInt($(".anchowebVariable"));
})

$('document').ready(function(){
	$(".fila .celda").vAlign();
});

(function ($) {
	$.fn.vAlign = function(container) {
		return this.each(function(i){
			if(container == null) {
				container = 'div';
			}
			$(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
			var el = $(this).children(container + ":first");
			var elh = $(el).height(); //new element height
			var ph = $(this).height(); //parent height
			var nh = (ph - elh) / 2; //new height to apply
			$(el).css('margin-top', nh);
		});
	};
})(jQuery);

