function popup_open (url, width, height)
{
	var win_ref= window.open(url, "descrizione", "resizable=no,scrollbars=yes,status=no,width="+width+",height="+height+",location=no");
}


function home_height_navouter_set ()
{
	/* -------------------------------------------------------------------- */
	/* giovanni - se il #content č pių alto della .sidebar allora aumento
		la dimensione del .nav-outer cosė il bordino grigio viene mostrato
		alla stessa altezza dell'ultimo prodotto */
	var height_content=$('#content').height();
	var height_sidebar=$('.sidebar').height();
	var height_banner_sidebar=$('.banner_sidebar').height();

	if (height_content>height_sidebar)
	{
		var height_searchside=$('#searchSide').height();
		var height_navouter=height_content-height_searchside-height_banner_sidebar;
		$('.nav-outer').height(height_navouter);
	}

	/* -------------------------------------------------------------------- */
}


function catalog_border_prod_set ()
{
	/* -------------------------------------------------------------------- */
	/* giovanni - nel template dei prodotti della singola categoria imposto
		l'altezza dei div uguale all'altezza del div pių alto per ciascuna
		riga - l'altezza minima č quella del div che contiene l'immagine del
		prodotto */
	var record_row=2;
	var min_height=$('#prodotti .border-prod:first .pict-col').height();
	var max_height=0;
	var total_height=0;
	var delta_height=10;
	var record_row_current=0;
	var record_row_selectors= new Array();

	$.each
	(
		$('#prodotti .border-prod'), function (i, val)
		{
			record_row_current= record_row-((i+1)%record_row);

			total_height=0;
			total_height+=$(this).find('.product-title').height();
			//total_height+=$(this).find('.prezzo').height(); //disabilito il prezzo perchč non esiste pių
			total_height+=$(this).find('.description').height();
			total_height+=$(this).find('.buy-product').height();
			total_height+=delta_height;

			if (total_height<min_height)
				total_height=min_height;

			$(val).height(total_height);

			if (total_height>max_height)
				max_height=total_height;

			record_row_selectors[record_row_selectors.length]=this;

			if (record_row_current>=record_row)
			{
				$.each
				(
					record_row_selectors, function (i, val)
					{
						$(val).height(max_height);
					}
				)

				max_height=0;
				record_row_selectors= new Array();
			}
		}
	);
}


$(document).ready
(
	function()
	{
		$('#infoUtili a').click
		(
			function (event)
			{
				popup_open ($(this).attr('href'), screen.width-200, screen.height-200);

				return false;
			}
		);
	}
);