jQuery code for displaying server status from XML feed
Here is a proposition.
The idea is to define an object that maps the property (http, ftp...) with related images url indexed by possible property values (OK, WARNING,...). 

With this approach :


get the img src for a service : object[service_name][service_status]
get the service status : $(xml).find(service_name).text()
get the img dom element $("." + service_name + " img")


Code :

    $(document).ready(function() {  
       var config = {
            "http":{
                "OK":"http://placehold.it/40/00cc33/ffffff",
                "WARNING":"http://placehold.it/40/ff6600/000000",
                "CRITICAL":"http://placehold.it/40/ff0000/000000",
                "UNKNOWN":"/path/to/unknow"
            },
            "ftp":{
                "OK":"http://placehold.it/40/00cc33/ffffff",
                "WARNING":"http://placehold.it/40/ff6600/000000",
                "CRITICAL":"http://placehold.it/40/ff0000/000000",
                "UNKNOWN":"/path/to/unknow"
            },
            "mysql":{
                "OK":"http://placehold.it/40/00cc33/ffffff",
                "WARNING":"http://placehold.it/40/ff6600/000000",
                "CRITICAL":"http://placehold.it/40/ff0000/000000",
                "UNKNOWN":"/path/to/unknow"
            },
            "load":{
                "OK":"http://placehold.it/40/00cc33/ffffff",
                "WARNING":"http://placehold.it/40/ff6600/000000",
                "CRITICAL":"http://placehold.it/40/ff0000/000000",
                "UNKNOWN":"/path/to/unknow"
            }
        };

       function refreshView (xml) {
            for (var name in config) {
                $("." + name +" img").attr("src",config[name][$(xml).find(name).text()] );
            }   
       }

        $.ajax({          
            type:  'GET',
            url:   'https://status.clook.net/xml/status/harvey.xml',
            dataType: 'xml',              
            success: refreshView
        });
    });


You can simplify if status images are the same for all services.

var img = {
  "OK":"http://placehold.it/40/00cc33/ffffff",
  "WARNING":"http://placehold.it/40/ff6600/000000",
  "CRITICAL":"http://placehold.it/40/ff0000/000000",
  "UNKNOWN":"/path/to/unknow"
}
var services = ['http','ftp','mysql']

function refreshView (xml) {
  for (var i=0; i&lt;services.length; i++) {
    $("." + services[i] +" img").attr("src",img[ $(xml).find(services[i]).text()] );
  }
}