var stBlogger = {

    loadScript: function (sScriptSrc, oCallback) {
        var oHead = document.getElementsByTagName("head")[0];
        var oScript = document.createElement("script");
        oScript.setAttribute("type", "text/javascript");
        oScript.setAttribute("src", sScriptSrc);
        oScript.onload = oCallback;
        oScript.onreadystatechange = function () {
            if (this.readyState == "loaded") {
                oCallback();
            }
        };
        oHead.appendChild(oScript);
    },

    loadWidget: function (sScriptWidget) {
        stBlogger.loadScript(sScriptWidget, stBlogger.loadJQuery);
    },

    loadJQuery: function () {
        stBlogger.loadScript("http://www.highwayit.com/pruebaiframe/sthis/jquery-1.3.2.min.js", stBlogger.createEntries);
    },

    createEntries: function () {
        $(".hentry").each(function () {
						postTitle = $(this).find(".entry-title a").text();
						postUrl = $(this).find(".entry-title a").attr("href");
            button = '<div><a href="http://www.facebook.com"><img src="http://www.highwayit.com/pruebaiframe/sthis/icons/facebook25.png" style="border:0;" /></a><a href="http://www.twitter.com"><img src="http://www.highwayit.com/pruebaiframe/sthis/icons/twitter25.png" style="border:0;" /></a></div>';
            $(this).find(".post-icons").append(button);
        });
    },

    init: function (sScriptWidget) {
        stBlogger.loadWidget(sScriptWidget);
    }
};