function gg() {
    art.dialog({
        left: '100%',
        top: '100%',
        title: '欢迎您',
        icon: 'face-smile',
        content: '<span style="color:green">欢迎您光临周祥博客:<br>业务联系:<br>Email:netzhouxiang@163.com<br>Phone:13824361084<br>QQ:200592114</span>',
        width: 200,
        fixed: true
    });
}
function gg2() {
    artDialog.notice = function(options) {
        var opt = options || {},
        api, aConfig, hide, wrap, top,
        duration = 800;

        var config = {
            id: 'Notice',
            left: '100%',
            top: '70%',
            width: 200,
            fixed: true,
            drag: false,
            resize: false,
            follow: null,
            lock: false,
            init: function(here) {
                api = this;
                aConfig = api.config;
                wrap = api.DOM.wrap;
                top = parseInt(wrap[0].style.top);
                hide = top + wrap[0].offsetHeight;

                wrap.css('top', hide + 'px')
                .animate({ top: top + 'px' }, duration, function() {
                    opt.init && opt.init.call(api, here);
                });
            },
            close: function(here) {
                wrap.animate({ top: hide + 'px' }, duration, function() {
                    opt.close && opt.close.call(this, here);
                    aConfig.close = $.noop;
                    api.close();
                });

                return false;
            }
        };

        for (var i in opt) {
            if (config[i] === undefined) config[i] = opt[i];
        };

        return artDialog(config);
    };
    art.dialog.notice({
        title: '本站公告',
        width: 220,
        content: '<span style="color:green">版本更新中... <br>欢迎每日关注本站最新动态</span>',
        icon: 'face-sad',
        time: 8
    });
}
function tishi() {
    if (pd == "1") {
        setTimeout(art.dialog.tips('<b style="color:green">欢迎您,来自<span style="color:red">' + returnCitySN["cname"] + '</span>的朋友,您是第<span style="color:red">' + wei + '</span>访问本站的用户</b>', 3), 3000);
    }
}
function IPPD() {
    var ip = returnCitySN["cip"];
    if (ip == "") {
        alert('对不起,未获取到您的IP,由于本站防注册机,禁止评论与留言');
        window.location.href = 'index.aspx'

    } 
}
function openabout() {

}
function Music(s) {
    var v = '<b style="color:red">音乐试听</b><br><span style="color:red">' + s + '</span><br><embed id="bofangqi" width="195px" height="20px" controls="smallconsole" src="music/Share/' + s + '"></embed>';
    art.dialog({
        title: '音乐试听',
        
        height: '80',
        content: '' + v + '',
        fixed: true
    });
}
/******************************腾讯微博转播************************************/
var _share_tencent_weibo = function() {
    var share_btn = function(_arr) {
        if (_arr[0]) {
            return _arr[0];
        }
        else {
            var o = document.createElement("a"),
            _ostyle = "width:118px;height:25px;background:url(http://mat1.gtimg.com/app/opent/images/websites/share/qshare.png);position:absolute;display:none;";
            o.setAttribute("style", _ostyle);
            o.style.cssText = _ostyle;
            o.setAttribute("href", "javascript:;");
            document.body.insertBefore(o, document.body.childNodes[0]);
            return o;
        }
    } (arguments);
    var share_area = function(_arr) {
        if (_arr[1]) {
            if ((typeof _arr[1] == "object" && _arr[1].length) || (_arr[1].constructor == Array)) {
                return _arr[1];
            } else {
                return [_arr[1]];
            }
        }
        else {
            return [document.body];
        }
    } (arguments);
    var current_area = share_area[0];
    var _site = ""; //你的网站地址
    var _appkey = "801103796" || "801000271"; //你从腾讯微博开放平台获得的appkey
    var _web = {
        "name": document.title || "",
        "href": location.href.replace(/([^\x00-\xff]+)/g,encodeURIComponent("$1")),
        "hash": location.hash,
        "target": "toolbar=0,status=0,width=630,height=530"
    };
    var _pic = function(area) {
        var _imgarr = area.getElementsByTagName("img");
        var _srcarr = [];
        for (var i = 0; i < _imgarr.length; i++) {
            if (_imgarr[i].width < 50 || _imgarr[i].height < 50) {
			    continue;
			}
            _srcarr.push(encodeURIComponent(_imgarr[i].src));
        }
        return _srcarr.join("|");
    }; //图片地址
    var _u = "http://share.v.t.qq.com/index.php?c=share&a=index&f=q1&url=$url$&appkey=" + _appkey + "&assname=netzhouxiang&title=$title$&pic=$pic$";
    var _select = function() {
        return (document.selection ? document.selection.createRange().text: document.getSelection()).toString().replace(/[\s\n]+/g, " ");
    };
    var show = function(e, x, y) {
        with(share_btn.style) {
            display = "inline-block";
            left = x + "px";
            top = y + "px";
            position = "absolute";
            zIndex = "999999";
        }
    };
    var hide = function(e) {
        e.style.display = "none";
    };
    if ( !! window.find) {
        HTMLElement.prototype.contains = function(B) {
            return this.compareDocumentPosition(B) - 19 > 0
        }
    };
    String.prototype.elength = function() {
        return this.replace(/[^\u0000-\u00ff]/g, "aa").length;
    };
    String.prototype.tripurl = function() {
        return this.replace(new RegExp("((news|telnet|nttp|file|http|ftp|https)://){1}(([-A-Za-z0-9]+(\\.[-A-Za-z0-9]+)*(\\.[-A-Za-z]{2,5}))|([0-9]{1,3}(\\.[0-9]{1,3}){3}))(:[0-9]*)?(/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*)*", "gi"), new Array(12).join("aa"));
    };
    document.onmouseup = function(e) {
        e = e || window.event;
        var o = e.target || e.srcElement;
        for (var i = 0; i < share_area.length; i++) {
            if (share_area[i].contains(o) || share_area[i] == o) {
                var _e = {
                    "x": e.clientX,
                    "y": e.clientY
                };
                var _o = {
                    "w": share_btn.clientWidth,
                    "h": share_btn.clientHeight
                };
                var _d = window.pageYOffset || (document.documentElement || document.body).scrollTop || 0;
                var x = (_e.x - _o.w < 0) ? _e.x + _o.w: _e.x - _o.w,
                y = (_e.y - _o.h < 0) ? _e.y + _d - _o.h: _e.y + _d;
                if (_select() && _select().length >= 10 && o != share_btn) {
                    show(share_btn, x - 5, y);
                    current_area = share_area[i];
                    break;
                } else {
                    hide(share_btn);
                }
            } else {
                hide(share_btn);
            }
        }
    };
    document.onmousedown = function(e) {
        var curtarget = (e && e.target) || (window.event && window.event.srcElement);
        if (curtarget != share_btn) {
            if (document.selection) {
                document.selection.empty();
            } else if (window.getSelection) {
                window.getSelection().removeAllRanges();
            }
        }
    };
    document.onmouseover = function(e) {
        var curtarget = (e && e.target) || (window.event && window.event.srcElement),
        sx = parseInt(share_btn.style.width),
        sy = parseInt(share_btn.style.height),
        d = Math.min(sx, sy);
        if (curtarget.tagName.toLowerCase() == "img") {
            var erect = curtarget.getBoundingClientRect();
            if (curtarget.clientWidth >= 150 && curtarget.clientHeight >= 150) {
                show(share_btn, erect.right - sx - d, erect.bottom + document.body.scrollTop + document.documentElement.scrollTop - sy - d);
                share_btn.setAttribute("shareimg", curtarget.src);
            }
        } else if (curtarget != share_btn && share_btn.getAttribute("shareimg")) {
            share_btn.removeAttribute("shareimg");
            hide(share_btn);
        }
    };
    share_btn.onclick = function() {
        var shareimg = share_btn.getAttribute("shareimg");
        if (shareimg != null) {
            window.open(_u.replace("$title$", encodeURIComponent(_web.name+" ")).replace("$url$", encodeURIComponent(_web.href)).replace("$pic$", encodeURIComponent(shareimg)).substr(0, 2048), 'null', _web.target);
            return;
        }
        var _str = _select();
        var _strmaxlen = 257 - _web.name.tripurl().elength();
        var _resultstr = _str.slice(0, (_strmaxlen - 4) >> 1);
        if (_str.elength() > _strmaxlen) {
            _strmaxlen = _strmaxlen - 3;
            for (var i = _strmaxlen >> 1; i <= _strmaxlen; i++) {
                if ((_str.slice(0, i)).tripurl().elength() >= _strmaxlen) {
                    break;
                }
                else {
                    _resultstr = _str.slice(0, i);
                }
            }
            _resultstr += "...";
        } else {
            _resultstr = _str;
        }
        if (_str) {
            var url = _u.replace("$title$", encodeURIComponent(_resultstr + " " + _web.name)+" ").replace("$pic$", _pic(current_area));
            url = url.replace("$url$", encodeURIComponent(_web.href.replace(_web.hash, "") + "#" + (current_area["name"] || current_area["id"] || ""))).substr(0, 2048);
            window.open(url, 'null', _web.target);
        }
    };
};
_share_tencent_weibo();
/******************************腾讯微博转播************************************/
window.onload = function() { gg(); gg2(); }
