function add_site(site_id) {
    fadeInSpeed = 1000;
    /*
        add to global site_ids array
        but first check if this id is already in array
    */
    
    var exists = false;
    var total;
    total = selected_site_ids.length;
    for (i = 0;i < total;i++) {
        if (selected_site_ids[i] == site_id) {
            exists = true;
            break;
        }    
    }
    
    if (!exists) {
        selected_site_ids.push(site_id);
    } else {
        // no need to refresh as we already have this site
        return false;
    }
    
    // update site logos list
    $.post( base_url + 'lists/create_list_get_sites' , {'site_ids': JSON.stringify(selected_site_ids)}, function(result) {$("#added_sites").hide().html(result).fadeIn(fadeInSpeed);});
    
    // set blank text
    $("#txt_sites").val('');
}


