
(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/6/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/6d7507508e444925a56f589859e5fce5/workouts/038f62e8422a45f8a9b0980fa0e9f98e\">8.3 mi</a></td></tr><tr><td colspan=\"2\">2/5/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/6d7507508e444925a56f589859e5fce5/workouts/d17c095b128b464390e86732ccc7f3e5\">9 mi</a></td></tr><tr><td colspan=\"2\">2/3/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/6d7507508e444925a56f589859e5fce5/workouts/547ccfb7c44b48738547cebbb32fc9af\">5.65 mi</a></td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/6d7507508e444925a56f589859e5fce5/workouts/2a8811087e6b42e7b6c4ae138d57b5f6\">2.6 mi</a></td></tr><tr><td colspan=\"2\">2/1/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/6d7507508e444925a56f589859e5fce5/workouts/45f514a5b8c54a50aaa36c5805e2cd57\">16.35 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>";
}());
