
(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\">2/7/2012</td></tr><tr><th>Weights</th><td><a href=\"http://www.runningahead.com/logs/ed86cc84caaa4c5eb9085cd20ef3c6e4/workouts/77d3fd7b6a484008b5c0aa869ab233c5\"> </a></td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/ed86cc84caaa4c5eb9085cd20ef3c6e4/workouts/9f0d7073d56d4604bf9011f6c59e1000\">3.05 mi</a></td></tr><tr><td colspan=\"2\">2/6/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/ed86cc84caaa4c5eb9085cd20ef3c6e4/workouts/088c6037ab6f4fd98e716af28b8e883b\">5.05 mi</a></td></tr><tr><th>Weights</th><td><a href=\"http://www.runningahead.com/logs/ed86cc84caaa4c5eb9085cd20ef3c6e4/workouts/f561d1620e6042b0b5d6884f857edd3d\"> </a></td></tr><tr><td colspan=\"2\">2/4/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/ed86cc84caaa4c5eb9085cd20ef3c6e4/workouts/69c827eeda67421182660a3880aeab25\">4.18 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>";
}());
