" }; k = "Contacting Twitter..."; l = "Invalid username or you have exceeded Twitter request limit. Please note, Twitter only allows 150 requests per hour."; j = function () { }; if (a("#t-follow-script").length <= 0) { var m = document.createElement("script"); m.type = "text/javascript"; m.src = "//platform.twitter.com/widgets.js"; m.id = "t-follow-script"; a("body").append(m) } e.append('Follow') } break; case "facebook": { i = "https://graph.facebook.com/" + d, h = function (a) { return '
" }; k = "Loading..."; l = "Sorry, no data found."; j = function () { } } break; default: { } break } if (a.isEmptyObject(g)) { a.ajax({ url: i, type: "GET", dataType: "jsonp", timeout: 4e3, beforeSend: function () { e.find(".s-message").remove(); e.append('
' + k + "
") }, success: function (a) { if (a.length <= 0) { e.find(".s-message").html(l) } else { e.find(".s-message").remove(); e.prepend(h(a)); f(e.closest(".hc-preview")); e.stop(true, true).delay(b.delay).fadeIn(); j(a) } }, error: function (a, b, c) { e.find(".s-message").html(l) } }) } else { e.prepend(h(g)) } } function f(a) { var c = a.find(".hc-details").eq(0); var d = a[0].getBoundingClientRect(); var e = d.top - 20; var f = d.left + 35 + c.width(); var g = d.top + 35 + c.height(); var h = d.top - 10; if (b.openOnLeft || b.autoAdjust && f > window.innerWidth) { c.addClass("hc-details-open-left") } else { c.removeClass("hc-details-open-left") } if (b.openOnTop || b.autoAdjust && g > window.innerHeight) { c.addClass("hc-details-open-top") } else { c.removeClass("hc-details-open-top") } } var c = a(this); c.wrap(''); c.addClass("hc-name"); var d = ""; if (b.cardImgSrc.length > 0) { d = '' } var e = '
' + d + b.detailsHTML + "
"; c.after(e); c.siblings(".hc-details").eq(0).css({ width: b.width, background: b.background }); c.closest(".hc-preview").hover(function () { var d = a(this); f(d); d.css("zIndex", "200"); c.css("zIndex", "100").find(".hc-details").css("zIndex", "50"); var e = d.find(".hc-details").eq(0); e.stop(true, true).delay(b.delay).fadeIn(); if (typeof b.onHoverIn == "function") { if (b.showCustomCard && e.find(".s-card").length <= 0) { var h = b.customDataUrl; if (typeof c.attr("data-hovercard") == "undefined") { } else if (c.attr("data-hovercard").length > 0) { h = c.attr("data-hovercard") } g("custom", h, e, b.customCardJSON) } if (b.showTwitterCard && e.find(".s-card").length <= 0) { var i = b.twitterScreenName.length > 0 ? b.twitterScreenName : c.text(); if (typeof c.attr("data-hovercard") == "undefined") { } else if (c.attr("data-hovercard").length > 0) { i = c.attr("data-hovercard") } g("twitter", i, e) } if (b.showFacebookCard && e.find(".s-card").length <= 0) { var j = b.facebookUserName.length > 0 ? b.facebookUserName : c.text(); if (typeof c.attr("data-hovercard") == "undefined") { } else if (c.attr("data-hovercard").length > 0) { j = c.attr("data-hovercard") } g("facebook", j, e) } b.onHoverIn.call(this) } }, function () { $this = a(this); $this.find(".hc-details").eq(0).stop(true, true).fadeOut(300, function () { $this.css("zIndex", "0"); c.css("zIndex", "0").find(".hc-details").css("zIndex", "0"); if (typeof b.onHoverOut == "function") { b.onHoverOut.call(this) } }) }); }) } })(jQuery)