//popup
function popup(URL,NOME,WIDTH,HEIGHT,PROPRIETA) {
	
	//alert(PROPRIETA);
	if(PROPRIETA == ''){
		PROPRIETA = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0';
	}
	win = window.open(URL,NOME,PROPRIETA + ',width=' + WIDTH + ',height=' + HEIGHT + '');
	
	//qui ridimensiono il popup...così se lo stesso popup è già aperto gli cambio le dimensioni...
	H = parseInt(HEIGHT) + 59; 
	W = parseInt(WIDTH) + 10;
	win.resizeTo(W,H);
	win.focus();
}


function popup_img(ID,WIDTH,HEIGHT) {
	
	PROPRIETA = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0';
	
	win = window.open('http://www.socuci.it/gestionale/show_img.php?inserzioneID=' + ID ,'immagine',PROPRIETA + ',width=' + WIDTH + ',height=' + HEIGHT + '');
	
	//qui ridimensiono il popup...così se lo stesso popup è già aperto gli cambio le dimensioni...
	H = parseInt(HEIGHT) + 59; 
	W = parseInt(WIDTH) + 10;
	win.resizeTo(W,H);
	win.focus();
}


$(document).ready(function() {
   	
	
	
	var maxHeight = 0;
	$(".boxRisultatoIn").each(function(){
		if($(this).height() > maxHeight){
			maxHeight = $(this).height();
		}
	});
	$(".boxRisultatoIn").css('height', maxHeight);
	
	
	var maxHeightLi = 0;
	$(".box-evidente a").each(function(){
		if($(this).height() > maxHeightLi){
			maxHeightLi = $(this).height();
		}
	});
	$(".box-evidente a").css('height', maxHeightLi);
	$(".box-evidente a span.l-immagine").css('height', maxHeightLi);
	$(".box-evidente a span.l-immagine").css('line-height', maxHeightLi);
	$(".box-evidente a span.l-immagine2").css('height', maxHeightLi);
	$(".box-evidente a span.l-immagine2").css('line-height', maxHeightLi);
	
	$("img[rel=#overlay]").overlay();
	
	
});