$(document).ready(function(){
    var a = {};
    $(".followpreview").mouseover(function(){
        var h = $(this);
        var b = h.attr("id"), f = h.attr("ext"), i = h.attr("src").replace("/qt", "/q"), d = h.offset().left, j = h.offset().top + h.height(), g = "";
        var e = $("body").width();
        if (e - d < 210) {
            d = d - 186;
            g = "followerPreviewBoxArrRight"
        }
        else {
            g = "followerPreviewBoxArrLeft"
        }
        a[b] = window.setTimeout(function(){
            var l = "Box" + b;
            var k = b.replace("fu", "");
            if (document.getElementById(l) == null) {
                $("body").append('<div class="followerPreviewBox" id="' + l + '"></div>');
                $("#" + l).css({
                    left: d,
                    top: j
                }).fadeIn(500);
                $.getJSON("/k/ajax/getUserInfoData.php?userId=" + k, function(m){
                    var o = "";
                    var n = "";
                    if (m.userGender !== "") {
                        o += m.userGender
                    }
                    if (m.city !== "") {
                        o += "-" + m.city
                    }
                    if (m.lastUpdateTime !== "") {
                    	if(o !== ""){
                    		o += "-" + m.lastUpdateTime
                    	}else {
                    		o += m.lastUpdateTime
                    	}
                    }
                    if (m.lastUpdate !== "") {
                        n = m.lastUpdate
                    }
                    var p = '<div class="' + g + '"></div>';
                    p += '<table width="205" border="0" cellpadding="0" cellspacing="0">									<tr>										<td width="53" rowspan="2" align="left" valign="top"><img src="' + i + '" /></td>										<td><strong>' + f + "</strong> " + n + '</td>									</tr>									<tr>										<td class="conTinge">' + o + "</td>									</tr>								</table>";
                    $("#" + l).html(p).css("backgroundImage", "none")
                })
            }
            else {
                $("#" + l).fadeIn(500)
            }
        }, 500);
        function c(){
            var l = $(this).attr("id");
            window.clearTimeout(a[l]);
            var k = "Box" + l;
            $("#" + k).fadeOut(500)
        }
    }).mouseout(function(){
        var c = $(this).attr("id");
        window.clearTimeout(a[c]);
        var b = "Box" + c;
        $("#" + b).hide()
    })
});
