function update_div(div_id, controller, extra_data) {
    if(div_id != '' || controller != '')
    {
	var is_an_array = div_id.search(/\|/);
	if(is_an_array != -1)
	{
	    // more than 1 div
	    var div_array = div_id.split("\|");
	    for(var i in div_array)
	    {
		var this_div = div_array[i];
		$("#"+this_div+"_info").show();
		$("#"+this_div).hide();
		$.ajax({
		    async: false,
		    type: 'GET',
		    url: '/'+controller+'/update_'+this_div+'/'+extra_data,
		    timeout: 10000,
		    success: function(data) {
			$("#"+this_div+"_info").hide();
			$("#"+this_div).html(data);
			$("#"+this_div).show();
		    },
		    error: function (XMLHttpRequest, textStatus, errorThrown) {
			$("#"+this_div+"_info").html('Timeout contacting server - click refresh icon to try again.');
		    }
		});
	    }
	}
	else
	{
	    // one div only
	    $("#"+div_id+"_info").show();
	    $("#"+div_id).hide();
	    $.ajax({
		type: 'GET',
		url: '/'+controller+'/update_'+div_id+'/'+extra_data,
		timeout: 10000,
		success: function(data) {
		    $("#"+div_id+"_info").hide();
		    $("#"+div_id).html(data);
		    $("#"+div_id).show();
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
		    $("#"+div_id+"_info").html('Timeout contacting server - click refresh icon to try again.');
		}
	    });
	}
    }
}

function image_lightbox(entry_id)
{
    console.info(entry_id);
    
    $.colorbox({rel: "boo_"+entry_id});
    
//    $.fn.colorbox({
//	rel: "boo_"+entry_id,
//	photo: true
//    });
}
