
/*
	##### Funzioni x Colorbox
*/
function doColorBox()
{
	if($('a.cb').colorbox)
	{
		$('a.cb').each(function(){
			var params = {
				/*width:"90%",
				height:"90%",*/
				maxHeight:"90%", 
				maxWidth:"90%",
				iframe: $(this).attr("iframe")=="true"
			};
			/*
			if($(this).attr("ajaxFunction") && $(this).attr("ajaxFunction")!="")
				params["href"] = abs_url + "ajax_controller.php?func=" + $(this).attr("ajaxFunction") + "&p1=" + $(this).attr("href");
			*/
			$(this).colorbox(params);	
		});
	}
}



function getCbParam(params, name, fallbackValue)
{
	if(!params)
	  return eval(fallbackValue) + 20;

	var arr = params.split(",");
	for(var i = 0; i<arr.length; i++)
	{
  	  var s = arr[i];
	  if(s.indexOf(name+"=") == 0)
		  return eval(s.replace(name+"=", "")) + 20;
	}
	
	return "";
}
// ##########################################################
