
(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\">21/01/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/4786e134fc6f435982b96e63b2938ad6/workouts/42c391190a9348bdb2df38e68535fb6c\">2.73 mi</a></td></tr><tr><td colspan=\"2\">08/01/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/4786e134fc6f435982b96e63b2938ad6/workouts/2d5274bc86b94182bb8ba70e45f8b078\">6.01 mi</a></td></tr><tr><td colspan=\"2\">07/01/2012</td></tr><tr><th>MTB</th><td><a href=\"http://www.runningahead.com/logs/4786e134fc6f435982b96e63b2938ad6/workouts/c6e7f56e18234e87a13705fd85c8c739\">10.46 mi</a></td></tr><tr><td colspan=\"2\">01/01/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/4786e134fc6f435982b96e63b2938ad6/workouts/c6157a69191641ed8a5486e38b8a7648\">2.4 mi</a></td></tr><tr><td colspan=\"2\">10/12/2011</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/4786e134fc6f435982b96e63b2938ad6/workouts/069869b623b0404caef9bcfb74072331\">4.68 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>";
}());
