
(function()
{
    if (window.RAStyles !== true)
    {
        var link = document.createElement("link");
        link.setAttribute("href", "http://www.runningahead.com/themes/default/remote.css");
        link.setAttribute("rel", "stylesheet");
        link.setAttribute("type", "text/css");
        link.setAttribute("media", "all");
        document.getElementsByTagName("head")[0].appendChild(link);
        window.RAStyles = true;
    }
 
    var id = "ra_" + (new Date()).getTime();
    document.write("<span id=\"" + id + "\"></span>");
    var ctrl = document.getElementById(id);
    var div = ctrl.parentNode;
    if (div.tagName != "DIV" || div.className != "RAWidget")
    {
        var tmp = document.createElement("div");
        div.appendChild(tmp, ctrl);
        div.removeChild(ctrl);
        div = tmp;
        div.className = "RAWidget";
    }

    div.innerHTML = "<h3>Latest workouts</h3><table class=\"RARecords\"><tr><td colspan=\"2\">1/22/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f5013e3407254c11966c21fffe65080e/workouts/33b932951135429e87fb28032b81885f\">20.2 mi</a></td></tr><tr><td colspan=\"2\">1/21/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f5013e3407254c11966c21fffe65080e/workouts/92069448de694eef98b6eafd82499e79\">5 mi</a></td></tr><tr><td colspan=\"2\">1/18/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f5013e3407254c11966c21fffe65080e/workouts/399f6142b9b2455780d516a1e2964ff1\">10.6 mi</a></td></tr><tr><td colspan=\"2\">1/17/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f5013e3407254c11966c21fffe65080e/workouts/a7ac065d4af64dc19814d277d0f6720f\">8.2 mi</a></td></tr><tr><td colspan=\"2\">1/16/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f5013e3407254c11966c21fffe65080e/workouts/512dbd5f488f480d9acad7ef5f81cae1\">4.3 mi</a></td></tr></table><div class=\"RAFooter\">  <a href=\"http://www.runningahead.com\">RunningAHEAD</a>  <a href=\"http://www.runningahead.com\">Running Log</a></div>";
}());
