function em_delete_blog($blog_id)
{
    global $wpdb;
    $prefix = $wpdb->get_blog_prefix($blog_id);
    $wpdb->query('DROP TABLE ' . $prefix . 'em_events');
    $wpdb->query('DROP TABLE ' . $prefix . 'em_bookings');
    $wpdb->query('DROP TABLE ' . $prefix . 'em_locations');
    $wpdb->query('DROP TABLE ' . $prefix . 'em_tickets');
    $wpdb->query('DROP TABLE ' . $prefix . 'em_tickets_bookings');
    $wpdb->query('DROP TABLE ' . $prefix . 'em_meta');
    //delete events if MS Global
    if (EM_MS_GLOBAL) {
        EM_Events::delete(array('limit' => 0, 'blog' => $blog_id));
        EM_Locations::delete(array('limit' => 0, 'blog' => $blog_id));
    }
}