
(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/5/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f0147fe1e8d64a7eb40dcb46f983d6ea/workouts/deffc27efefd4df692be787faab06d1b\">6 mi</a></td></tr><tr><td colspan=\"2\">2/4/2012</td></tr><tr><th>Bike</th><td><a href=\"http://www.runningahead.com/logs/f0147fe1e8d64a7eb40dcb46f983d6ea/workouts/f329e7a93f90455c95103d8b3105d81e\">16.1 mi</a></td></tr><tr><td colspan=\"2\">2/2/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f0147fe1e8d64a7eb40dcb46f983d6ea/workouts/f7a7fff4cf9647879c9d973e9da79495\">3 mi</a></td></tr><tr><td colspan=\"2\">1/31/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f0147fe1e8d64a7eb40dcb46f983d6ea/workouts/3149d617f3934d1d949a20a6b0cce3bd\">2.4 mi</a></td></tr><tr><td colspan=\"2\">1/29/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/f0147fe1e8d64a7eb40dcb46f983d6ea/workouts/2c0e65cfa43f45ab834353e8834eaa08\">15 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>";
}());
