
(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>Swim</th><td><a href=\"http://www.runningahead.com/logs/17827c0034054a08800d2befeaeac418/workouts/a9e9d66b9fca42c3a172af735ab75772\">900 yd</a></td></tr><tr><td colspan=\"2\">2/4/2012</td></tr><tr><th>Run</th><td><a href=\"http://www.runningahead.com/logs/17827c0034054a08800d2befeaeac418/workouts/28dc84a80ae94a8385740278399e4389\">3.13 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/17827c0034054a08800d2befeaeac418/workouts/e7cb3209757b45f28f5f63a5997cfcf8\">1.11 mi</a></td></tr><tr><th>Bike</th><td><a href=\"http://www.runningahead.com/logs/17827c0034054a08800d2befeaeac418/workouts/98653e3cf84c4398b005f4579fa97574\">8.37 mi</a></td></tr><tr><td colspan=\"2\">1/27/2012</td></tr><tr><th>Swim</th><td><a href=\"http://www.runningahead.com/logs/17827c0034054a08800d2befeaeac418/workouts/84c9fd9e7bcb4e1093c117e1143e9844\">1500 yd</a></td></tr><tr><td colspan=\"2\">1/25/2012</td></tr><tr><th>Bike</th><td><a href=\"http://www.runningahead.com/logs/17827c0034054a08800d2befeaeac418/workouts/641b2c828093441aa50079c801557d9c\">6.2 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>";
}());
