(function () {
    if (window.$addthis && window.$$addthis) {
        return false
    }
    var $ = {
        byId: function (a) {
            return document.getElementById(a)
        },
        byName: function (a) {
            return $.toArray(document.getElementsByName(a))
        },
        byTag: function (a, b) {
            b = b || document;
            return $.toArray(b.getElementsByTagName(a))
        },
        byClass: function (a, b) {
            b = b || document;
            var c = new RegExp("(^|\\s+)" + $.addSlashRegExp(a) + "(\\s+|$)");
            var d = [],
                arr = b.getElementsByTagName('*');
            for (var i = 0; i < arr.length; i++) {
                if (c.test(arr[i].className)) {
                    d[d.length] = arr[i]
                }
            }
            return d
        },
        toArray: function (a) {
            var b = [];
            for (var i = 0; i < a.length; i++) {
                b[i] = a[i]
            }
            return b
        },
        attr: function (a, b) {
            var c = a[b] ? a[b] : a.getAttribute(b);
            return !c ? "" : c
        },
        create: function (a) {
            return document.createElement(a)
        },
        next: function (a, b) {
            var c = a;
            while (c = c.nextSibling) {
                if (b || c.nodeType == 1) {
                    break
                }
            }
            return c
        },
        prev: function (a, b) {
            var c = a;
            while (c = c.previousSibling) {
                if (b || c.nodeType == 1) {
                    break
                }
            }
            return c
        },
        parent: function (a) {
            return a.parentNode || a.parentElement
        },
        before: function (a, b) {
            return a.parentNode.insertBefore(b, a)
        },
        after: function (a, b) {
            var c, next = $.next(a);
            if (next) {
                c = $.before(next, b)
            } else {
                c = $.append(a.parentNode, b)
            }
            next = null;
            return c
        },
        prepend: function (a, b) {
            var c;
            if (a.hasChildNodes()) {
                c = $.before(a.childNodes[0], b)
            } else {
                c = $.append(a, b)
            }
            return c
        },
        append: function (a, b) {
            return a.appendChild(b)
        },
        bind: function (a, b, c) {
            var d = [];
            if (a.constructor == Array) {
                d = a
            } else {
                d[d.length] = a
            }
            for (var i = 0; i < d.length; i++) {
                if (d[i].addEventListener) {
                    d[i].addEventListener(b, c, 0)
                } else if (a.attachEvent) {
                    d[i].attachEvent("on" + b, c)
                } else {
                    d[i]["on" + b] = c
                }
            }
        },
        unbind: function (a, b, c) {
            var d = [];
            if (a.constructor == Array) {
                d = a
            } else {
                d[d.length] = a
            }
            for (var i = 0; i < d.length; i++) {
                if (d[i].addEventListener) {
                    d[i].removeEventListener(b, c, true)
                } else if (a.attachEvent) {
                    d[i].detachEvent("on" + b, c)
                } else {
                    d[i]["on" + b] = function () {}
                }
            }
        },
        addClass: function (a, b) {
            a.className = $.trim(a.className + " " + b)
        },
        removeClass: function (a, b) {
            var c = new RegExp("(^|\\s+)" + $.addSlashRegExp(b) + "(\\s+|$)", "g");
            a.className = $.trim(a.className.replace(c, " "))
        },
        addSlashRegExp: function (a) {
            return a.replace(/([\^\$\*\+\?\(\)\[\]\{\}\,\.\:\=\!\|\-\\])/g, "\\$1")
        },
        trim: function (a) {
            return a.replace(/(^[\r\n\s]+|[\r\n\s]+$)/g, "")
        },
        curCss: function (c, d) {
            var e, style = c.style;
            if (d.match(/float/i)) d = "styleFloat";
            if (document.defaultView && document.defaultView.getComputedStyle) {
                if (d.match(/float/i)) d = "float";
                d = d.replace(/([A-Z])/g, "-$1").toLowerCase();
                var f = document.defaultView.getComputedStyle(c, null);
                if (f) e = f.getPropertyValue(d)
            } else if (c.currentStyle) {
                var g = d.replace(/\-(\w)/g, function (a, b) {
                    return b.toUpperCase()
                });
                e = c.currentStyle[d] || c.currentStyle[g];
                if (!/^\d+(px)?$/i.test(e) && /^\d/.test(e)) {
                    var h = style.left,
                        rsLeft = c.runtimeStyle.left;
                    c.runtimeStyle.left = c.currentStyle.left;
                    style.left = e || 0;
                    e = style.pixelLeft + "px";
                    style.left = h;
                    c.runtimeStyle.left = rsLeft
                }
            } else if (style && style[d]) e = style[d];
            return e
        },
        getOffset: function (a) {
            var b = {
                width: 0,
                height: 0,
                left: 0,
                top: 0,
                right: 0,
                bottom: 0
            };
            if (a == "visible") {
                if (window.innerWidth && window.innerWidth.constructor == Number) {
                    b.width = window.innerWidth;
                    b.height = window.innerHeight;
                    b.left = window.pageXOffset;
                    b.top = window.pageYOffset
                } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                    b.width = document.documentElement.clientWidth;
                    b.height = document.documentElement.clientHeight;
                    b.left = document.documentElement.scrollLeft;
                    b.top = document.documentElement.scrollTop
                } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                    b.width = document.body.clientWidth;
                    b.height = document.body.clientHeight;
                    b.left = document.body.scrollLeft;
                    b.top = document.body.scrollTop
                }
            } else {
                b.width = a.offsetWidth + (!$.boxModel ? a.clientLeft : 0);
                b.height = a.offsetHeight + (!$.boxModel ? a.clientTop : 0);
                while (a) {
                    b.left += a.offsetLeft;
                    b.top += a.offsetTop;
                    if ($.browser.msie && $.boxModel && a.offsetParent && !/^t(able|d|h)$/i.test(a.tagName)) {
                        b.left += a.clientLeft;
                        b.top += a.clientTop
                    }
                    if ($.browser.mozilla) {
                        b.left += (parseInt($.curCss(a, "borderLeftWidth")) || 0);
                        b.top += (parseInt($.curCss(a, "borderTopWidth")) || 0);
                        c = null
                    }
                    a = a.offsetParent
                }
                if ($.browser.mozilla) {
                    var c = document.body;
                    b.left += c.clientLeft;
                    b.top += c.clientTop;
                    var d = document.documentElement;
                    b.left -= parseInt($.curCss(d, "borderLeftWidth"));
                    b.top -= parseInt($.curCss(d, "borderTopWidth"));
                    c = d = null
                }
            }
            b.right = b.left + b.width;
            b.bottom = b.top + b.height;
            return b
        },
        cancelEvent: function (a) {
            if (a.preventDefault) {
                a.preventDefault()
            }
            a.returnValue = false
        },
        boxModel: false,
        boxModelTest: function () {
            var a = document.createElement("div");
            a.style.width = a.style.paddingLeft = "1px";
            document.body.appendChild(a);
            $.boxModel = a.offsetWidth === 2;
            document.body.removeChild(a).style.display = 'none';
            a = null
        },
        ready: function (a) {
            $.domReadyBind();
            if ($.domReady) {
                a.call(document, $)
            } else {
                $.domReadyList.push(a)
            }
        },
        domReady: false,
        domReadyList: [],
        domReadyBound: false,
        domReadyBind: function () {
            if ($.domReadyBound) return;
            $.domReadyBound = true;
            if (document.addEventListener) {
                document.addEventListener("DOMContentLoaded", function () {
                    document.removeEventListener("DOMContentLoaded", arguments.callee, false);
                    $.domReadyDone()
                }, false)
            } else if (document.attachEvent) {
                document.attachEvent("onreadystatechange", function () {
                    if (document.readyState === "complete") {
                        document.detachEvent("onreadystatechange", arguments.callee);
                        $.domReadyDone()
                    }
                });
                if (document.documentElement.doScroll && window == window.top)(function () {
                    if ($.domReady) return;
                    try {
                        document.documentElement.doScroll("left")
                    } catch (error) {
                        setTimeout(arguments.callee, 0);
                        return
                    }
                    $.domReadyDone()
                })()
            }
            $.bind(window, "load", $.domReadyDone)
        },
        domReadyDone: function () {
            if (!$.domReady) {
                $.domReady = true;
                if ($.domReadyList) {
                    for (var i = 0; i < $.domReadyList.length; i++) {
                        $.domReadyList[i].call(document, $)
                    }
                    $.domReadyList = null
                }
            }
        },
        fixIeBgBug: function () {
            try {
                document.execCommand("BackgroundImageCache", false, true)
            } catch (e) {}
        },
        loadCssFile: function (a) {
            try {
                var b = $.create("link");
                b.rel = b.rev = "stylesheet";
                b.type = "text/css";
                b.href = a;
                b.media = "all";
                $.append($.byTag("head")[0], b);
                b = null
            } catch (e) {}
        },
        browser: {
            version: (navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/:]([\d.]+)/) || [0, '0'])[1],
            safari: /webkit/.test(navigator.userAgent.toLowerCase()),
            opera: /opera/.test(navigator.userAgent.toLowerCase()),
            msie: /msie/.test(navigator.userAgent.toLowerCase()) && !/opera/.test(navigator.userAgent.toLowerCase()),
            mozilla: /mozilla/.test(navigator.userAgent.toLowerCase()) && !/(compatible|webkit)/.test(navigator.userAgent.toLowerCase())
        },
        isMouseLeaveOrEnter: function (e, a) {
            if (e.type != 'mouseout' && e.type != 'mouseover') return false;
            var b = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement;
            while (b && b != a) b = b.parentNode;
            return (b != a)
        }
    };
    var s = {
        css: "http://china-addthis.googlecode.com/svn/trunk/addthis.css",
        gourl: "http://addthis.org.cn/go/?act=share",
        timeDelayout: 420,
        favsN: 32,
        favs: {
            "fav": {
                id: 0,
                name: "本地收藏"
            },
            "google": {
                id: 1,
                name: "谷歌书签"
            },
            "gmail": {
                id: 31,
                name: "Gmail"
            },
            "baidu": {
                id: 2,
                name: "百度搜藏"
            },
            "yahoo": {
                id: 3,
                name: "雅虎收藏"
            },
            "qq": {
                id: 4,
                name: "QQ书签"
            },
            "vivi": {
                id: 5,
                name: "新浪ViVi"
            },
            "sinav": {
                id: 28,
                name: "新浪微博"
            },
            "douban": {
                id: 21,
                name: "豆瓣/九点"
            },
            "xiaonei": {
                id: 22,
                name: "人人网"
            },
            "kaixin": {
                id: 23,
                name: "开心网"
            },
            "sohubai": {
                id: 24,
                name: "搜狐&middot;白"
            },
            "live": {
                id: 11,
                name: "微软Live"
            },
            "googlereader": {
                id: 30,
                name: "GReader"
            },
            "xianguo": {
                id: 27,
                name: "鲜果"
            },
            "fanfou": {
                id: 6,
                name: "饭否"
            },
            "jiwai": {
                id: 7,
                name: "叽歪"
            },
            "zuosa": {
                id: 29,
                name: "做啥"
            },
            "tongxue": {
                id: 32,
                name: "同学微博"
            },
            "365key": {
                id: 8,
                name: "365key"
            },
            "wowa": {
                id: 9,
                name: "我挖"
            },
            "wake": {
                id: 10,
                name: "挖客"
            },
            "hexun": {
                id: 12,
                name: "和讯网摘"
            },
            "yesky": {
                id: 13,
                name: "天极网摘"
            },
            "misterwong": {
                id: 14,
                name: "Mister-Wong"
            },
            "shouke": {
                id: 15,
                name: "收客"
            },
            "diglog": {
                id: 16,
                name: "Diglog"
            },
            "yangku": {
                id: 17,
                name: "央库"
            },
            "9fav": {
                id: 18,
                name: "就喜欢"
            },
            "leshou": {
                id: 19,
                name: "乐收"
            },
            "follow5": {
                id: 33,
                name: "5享网"
            },
            "poco": {
                id: 20,
                name: "POCO"
            },
            "f115": {
                id: 25,
                name: "115收藏"
            },
            "pdf": {
                id: 34,
                name: "生成pdf"
            },
            "print": {
                id: 888,
                name: "打印"
            },
            "delicious": {
                id: 71,
                name: "Delicious"
            },
            "digg": {
                id: 72,
                name: "Digg"
            },
            "facebook": {
                id: 73,
                name: "Facebook"
            },
            "twitter": {
                id: 74,
                name: "Twitter"
            },
            "reddit": {
                id: 75,
                name: "Reddit"
            },
            "myspace": {
                id: 76,
                name: "Myspace"
            }
        },
        e: encodeURIComponent,
        gotourl: function (a) {
            open(s.gourl + a, 'addthis', 'width=750,height=500,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');
            return false
        },
        showposition: function (a, b, c, d) {
            if (!$.boxModel) {
                b.style.width = (b.clientWidth + parseInt($.curCss(b, "paddingLeft")) + parseInt($.curCss(b, "paddingRight")) + (parseInt($.curCss(b, "borderLeftWidth")) ? parseInt($.curCss(b, "borderLeftWidth")) : 0) + (parseInt($.curCss(b, "borderRightWidth")) ? parseInt($.curCss(b, "borderRightWidth")) : 0)) + "px"
            }
            a.style.width = c.style.width = (b.offsetWidth) + "px";
            a.style.height = c.style.height = b.offsetHeight + "px";
            var e = $.getOffset(d);
            var f = $.getOffset("visible");
            var g = $.getOffset(a);
            var h = 0,
                top = 0;
            if (d.bar == "left" && d.barShow == "hidden") {
                d.barShow = "loop";
                $.parent(a).style.height = g.height + "px";
                a.style.visibility = "visible";
                s.showMoveTo($.byClass("addthis_sideBar")[0], d, "show", e.top, 0, e.width + g.width, 25)
            } else if (d.bar == "right" && d.barShow == "hidden") {
                d.barShow = "loop";
                $.parent(a).style.height = g.height + "px";
                a.style.visibility = "visible";
                s.showMoveTo($.byClass("addthis_sideBar")[0], d, "show", e.top, e.left - g.width, e.width + g.width, 25)
            } else if (d.bar != "left" && d.bar != "right") {
                if (f.right >= e.left + g.width || f.right - (e.left + g.width) >= (e.right - g.width) - f.left) {
                    h = e.left
                } else {
                    h = e.right - g.width
                }
                if (f.bottom >= e.bottom + g.height || f.bottom - (e.bottom + g.height) >= (e.top - g.height) - f.top) {
                    top = e.bottom
                } else {
                    top = e.top - g.height
                }
                a.style.left = h + "px";
                a.style.top = top + "px";
                a.style.visibility = "visible";
                d.barShow = "show"
            }
            e = f = g = h = top = null
        },
        showMoveTo: function (a, b, c, d, e, f, g) {
            var h = $.getOffset(a);
            var i = h.top;
            var j = h.left;
            var k = h.width;
            if (i <= d) {
                i = (i + g <= d) ? i + g : d
            } else {
                i = (i - g >= d) ? i - g : d
            }
            if (j <= e) {
                j = (j + g <= e) ? j + g : e
            } else {
                j = (j - g >= e) ? j - g : e
            }
            if (k <= f) {
                k = (k + g <= f) ? k + g : f
            } else {
                k = (k - g >= f) ? k - g : f
            }
            a.style.left = j + "px";
            a.style.top = i + "px";
            a.style.width = k + "px";
            if (i != d || j != e || k != f) {
                setTimeout(function () {
                    s.showMoveTo(a, b, c, d, e, f, g)
                }, 5)
            } else if (c) {
                b.barShow = c;
                if (c == "hidden") $.parent(b).style.height = $.getOffset(b).height + "px"
            }
            h = i = j = k = null
        },
        reMoveTo: function (a, b, c) {
            var d = $.byClass("addthis_sideBar")[0];
            var e = 99;
            var f = $.getOffset("visible").top;
            if (a.barShow != "loop") {
                f = f - $.getOffset(d).top + b;
                f = $.getOffset(d).top + f / 5;
                if (f < b) f = b;
                if (f != c) {
                    d.style.top = f + "px";
                    e = 99
                }
                c = f
            }
            if ($.byClass("addthis_box", d).length <= 0) {
                d.style.height = $.getOffset(a).height + "px"
            }
            if ($.byClass("addthis_box", d).length <= 0) {
                d.style.width = $.getOffset(a).width + "px"
            }
            setTimeout(function () {
                s.reMoveTo(a, b, c)
            }, e);
            d = e = f = null
        },
        initBtn: function (r) {
            r.mouse_over = function (f, e) {
                if (f.locked) {
                    if ((f.bar != "left" && f.bar != "right") || f.barShow == "hidden") {
                        f.addbox.style.display = "block";
                        s.showposition(f.addbox, $.byClass("addshow", f.addbox)[0], $.byClass("bgfrm", f.addbox)[0], f)
                    }
                    clearTimeout(f.timeOut);
                    return false
                }
                f.locked = true;
                f.bar = $.attr(f, "side");
                f.barShow = "hidden";
                var g = $.attr(f, "i") ? "|" + $.attr(f, "i") + "|" : "";
                f.u = $.attr(f, "u") ? $.attr(f, "u") : document.location.href;
                f.t = $.attr(f, "t") ? $.attr(f, "t") : document.title;
                f.e = $.attr(f, "e") ? $.attr(f, "e") : "mouseover";
                f.argStr = "&u=" + s.e(f.u);
                f.argStr += "&t=" + s.e(f.t);
                var h = $.attr(f, "d") ? $.attr(f, "d") : (window.getSelection ? window.getSelection().toString() : document.getSelection ? document.getSelection() : document.selection.createRange().text);
                f.argStr += "&d=" + s.e(h);
                f.argStr += "&tag=" + s.e($.attr(f, "tag") ? $.attr(f, "tag") : "");
                f.addthis = $.parent(f);
                var i = $.byClass("addthis_box");
                for (var j = 0; j < i.length; j++) {
                    i[j].style.display = "none"
                }
                var k = $.create("div");
                f.addbox = k;
                $.addClass(k, "addthis_box");
                if (f.bar == "left" || f.bar == "right") {
                    $.append($.byClass("addthis_sideBar")[0], k);
                    if (f.bar == "left") {
                        k.style.right = $.getOffset(f).width + "px"
                    } else if (f.bar == "right") {
                        k.style.left = $.getOffset(f).width + "px"
                    }
                } else {
                    $.append($.byTag("body")[0], k)
                }
                var l = "";
                l += '<iframe class="bgfrm" frameborder="0" tabindex="-1" src="javascript:;"></iframe>';
                l += '<div class="addshow"><div class="addh"><div class="addt">收藏&amp;分享到:</div></div><div class="addbody"><div class="addlist">';
                var m = 0;
                for (var n in s.favs) {
                    if ((!g && m < 17) || (g && g.indexOf("|" + s.favs[n].id + "|") >= 0)) {
                        l += '<div class="li"><a class="add_' + s.favs[n].id + '" item="' + s.favs[n].id + '" href="#">' + s.favs[n].name + '</a></div>';
                        m++
                    }
                }
                if (m < s.favsN) {
                    //l += '<div class="li"><a class="add_999" href="#">更多分享(' + s.favsN + ')</a></div>'
                }
                m = null;
                l += '</div><div style="clear:both;line-height:0"></div></div>';
                //l += '<div class="addbottom">by:<a href="http://addthis.org.cn" target="_blank">分享家{Addthis中国}</a></div>';
                l += '</div>';
                k.innerHTML = l;
                if ($.attr(f, "abordercolor")) k.style.borderColor = $.attr(f, "abordercolor");
                if ($.attr(f, "aheadbgcolor")) {
                    $.byClass("addh", k)[0].style.backgroundColor = $.attr(f, "aheadbgcolor");
                    $.byClass("addbottom", k)[0].style.backgroundColor = $.attr(f, "aheadbgcolor")
                }
                s.showposition(k, $.byClass("addshow", k)[0], $.byClass("bgfrm", k)[0], f);
                var o = $.byClass("addlist", k)[0];
                $.bind($.byClass("li", o), "mouseover", function (a) {
                    if (f.barShow != "loop") $.addClass(this, "on")
                });
                $.bind($.byClass("li", o), "mouseout", function (a) {
                    if (f.barShow != "loop") $.removeClass(this, "on")
                });
                var p = $.byTag("a", o);
                $.bind(p, "click", f.listclick);
                var q = $.byClass("add_999", o);
                $.bind(q, "click", function (a) {
                    $.unbind($.byTag("a", o), "click", f.listclick);
                    var b = "";
                    for (var c in s.favs) {
                        b += '<div class="li"><a class="add_' + s.favs[c].id + '" item="' + s.favs[c].id + '" href="#">' + s.favs[c].name + '</a></div>'
                    }
                    var d = $.byClass("addlist", f.addbox)[0];
                    d.innerHTML = b;
                    d.style.height = "192px";
                    d.style.overflow = "auto";
                    d.style.overflowX = "hidden";
                    f.addbox.style.height = "auto";
                    f.addthis.style.height = $.getOffset(f.addbox).height + "px";
                    $.bind($.byTag("a", o), "click", f.listclick);
                    $.cancelEvent(a || event)
                });
                $.bind(f, "mouseout", function (a) {
                    if ($.isMouseLeaveOrEnter(a || window.event || event, f) && f.barShow != "loop") {
                        f.timeOut = setTimeout(f.boxmouseout, s.timeDelayout)
                    }
                });
                $.bind(f.addbox, "mouseover", function (a) {
                    if ($.isMouseLeaveOrEnter(a || window.event || event, f.addbox) && f.barShow != "loop") {
                        if (f.e == "click") {
                            clearTimeout(f.timeOut)
                        } else if (f.e == "mouseover") {
                            f.boxmouseover(a);
                            clearTimeout(f.timeOut)
                        }
                    }
                });
                $.bind(f.addbox, "mouseout", function (a) {
                    if ($.isMouseLeaveOrEnter(a || window.event || event, f.addbox) && f.barShow != "loop") {
                        f.timeOut = setTimeout(f.boxmouseout, s.timeDelayout)
                    }
                });
                g = btn_t = btn_u = h = i = k = l = o = p = null
            };
            r.listclick = function (a) {
                if ($.attr(this, "item")) {
                    if (Number($.attr(this, "item")) == 0) {
                        s.localFav(r.t, r.u)
                    } else if (Number($.attr(this, "item")) == 30) {
                        location.href = "javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}";
                        return false
                    } else if (Number($.attr(this, "item")) == 888) {
                        window.print()
                    } else {
                        s.gotourl('&id=' + $.attr(this, "item") + r.argStr)
                    }
                    $.cancelEvent(a || event);
                    return false
                }
            };
            r.boxmouseover = function (a) {
                s.showposition(r.addbox, $.byClass("addshow", r.addbox)[0], $.byClass("bgfrm", r.addbox)[0], r);
                r.addbox.style.display = "block"
            };
            r.boxmouseout = function (a) {
                if (r.bar == "left") {
                    s.showMoveTo($.byClass("addthis_sideBar")[0], r, "hidden", $.getOffset(r).top, 0, $.getOffset(r).width, 38)
                } else if (r.bar == "right") {
                    s.showMoveTo($.byClass("addthis_sideBar")[0], r, "hidden", $.getOffset(r).top, $.getOffset(r).left + $.getOffset(r.addbox).width, $.getOffset(r).width, 38);
                    r.addbox.style.display = "none"
                } else {
                    r.addbox.style.display = "none";
                    r.barShow = "hidden"
                }
            };
            if ($.attr(r, "e") == "click") {
                $.bind(r, "click", function (a) {
                    r.mouse_over(r, a);
                    $.cancelEvent(a || event)
                })
            } else {
                $.bind(r, "click", function (a) {
                    $.cancelEvent(a || event)
                });
                $.bind(r, "mouseover", function (a) {
                    r.mouse_over(r, a)
                })
            }
        },
        localFav: function (t, u) {
            try {
                window.external.AddFavorite(u, t)
            } catch (e) {
                try {
                    window.sidebar.addPanel(t, u, "")
                } catch (e) {
                    alert("使用快捷键 Ctrl+D 或 Cmd+D 来收藏此页！")
                }
            }
        },
        init: function () {
            $.fixIeBgBug();
            $.loadCssFile(s.css);
            $.ready(function () {
                s.rebind()
            })
        },
        rebind: function () {
            var a = $.byClass("shareTo");
            var b = "";
            for (var i = 0; i < a.length; i++) {
                if ($.byTag("a", a[i])[0]) {
                    var c = $.attr($.byTag("a", a[i])[0], "side");
                    var d = $.attr($.byTag("a", a[i])[0], "top");
                    var e;
                    if (c == "left" || c == "right") {
                        e = $.byTag("a", a[i])[0];
                        $.addClass(a[i], "addthis_sideBar");
                        e.style.position = "absolute";
                        a[i].style.display = "block";
                        a[i].style.width = $.getOffset(e).width + "px";
                        var f = Math.floor($.getOffset("visible").height * 2 / 5);
                        var g = $.getOffset("visible").height - 260;
                        if (!d) d = f < g ? f : (g >= 0 ? g : 0);
                        a[i].style.top = d + "px";
                        a[i].style.height = $.getOffset(e).height + "px";
                        if (c == "left") {
                            a[i].style.left = "0px";
                            e.style.right = "0px"
                        } else if (c == "right") {
                            a[i].style.right = "0px";
                            e.style.left = "0px"
                        }
                        var h = Number(d);
                        var j = h;
                        s.reMoveTo(e, h, j)
                    }
                    e = d = c = null;
                    s.initBtn($.byTag("a", a[i])[0]);
                    if ($.attr($.byTag("a", a[i])[0], "css") && !b) b = $.attr($.byTag("a", a[i])[0], "css")
                }
            }
            if (b) $.loadCssFile(b);
            a = b = null
        }
    };
    $.ready($.boxModelTest);
    window.$addthis = $;
    window.$$addthis = s
})();
$$addthis.init();
