text: $(function(){var e=".purplecoat { display: none; position: absolute; padding: 5px; box-sizing: border-box; background-color: rgba(142, 68, 173, 0.8); color: #FFF; text-align: center; font-weight: bold; overflow: hidden; z-index: 9999; } .purplecoat-inner { display: table; width: 100%; height: 100%; } .purplecoat-inner-text { display: table-cell; vertical-align: middle;",a=$("<style/>");a.html(e),$("head").prepend(a),$("[data-purplecoat-toggle]").on("click",function(){var e=$(this).data("purplecoat-toggle"),a=$("[data-purplecoat-for="+e+"]:visible"),t=$("[data-purplecoat-for="+e+"]:hidden");if(a.size())a.fadeOut();else if(t.size())t.fadeIn();else{var o=$(this).data("purplecoat-color");$("[data-purplecoat="+e+"]").each(function(){var a=$(this),t=$('<div class="purplecoat"></div>');$("body").append(t);var l=$('<div class="purplecoat-inner"></div>');t.append(l);var i=$('<div class="purplecoat-inner-text"></div>');i.html(a.data("purplecoat-label")),l.append(i),o&&t.css("background-color",o),t.attr("data-purplecoat-for",e).css({top:a.offset().top,left:a.offset().left,width:a.width(),height:a.height()}).fadeIn()})}})});