(function() {
! function(e, o) {
return "undefined" == typeof jQuery ? (o = document.createElement("script"), o.src = "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js", o.onload = function() {
return e(jQuery.noConflict(!0))
}, document.body.appendChild(o)) : e(jQuery)
}(function(e) {
var o, t;
return o = "development" === e("body").data("env") ? document.location.protocol + "//" + document.location.host : ((document.location.host === 'indiesquare.local')? "http": "https") + "://widget.indiesquare.me", e(".indiesquare-tip-button").each(function() {
var t, n, c, r, width, height;
t = e(this);
c = t.data("vid");
width = 300;
height = 100;
if (c === "cc678996313dc6ff") { // Hopecoin
width = 148;
height = 50;
}
return c || (c = t.attr("data-vid")), n = "", t.replaceWith(n), r = "", e("body").append(r)
}), t = {}, window.addEventListener("message", function(n) {
var c, r;
if (n.origin === o) switch (c = JSON.parse(n.data), c.message) {
case "show modal iframe":
return navigator.userAgent.match(/iPhone|iPad|Android/) ? location.href = "" + o + "/tip/" + c.code : (t[c.code] = !0, e("#indiesquare_button_widget_frame_" + c.code).show().css("width", "100%").css("height", "100%"), e("body").addClass("noscroll"));
case "close modal iframe":
return t[c.code] = !1, e(".indiesquare_button_widget").hide(), e("body").removeClass("noscroll");
}
})
})
}).call(this);