// Pinwheel JS by Skittyblock var pin = new Pinwheel(); function Pinwheel() { var app = this; app.addPinwheel = function(icon, title, bold, text, color) { title = title || 'Pinwheel'; title = title.toUpperCase(); color = color || 'light'; var pad = 'pad'; if (bold) { bold = '
'+bold+'
'; pad = ''; } if($('.pin-notification').hasClass('active')) { $('.pin-notification').toggleClass('active'); } else { $$('.pinwheel-overlay').html('
'+title+'
Close
'+bold+'
'+text+'
'); setTimeout(function() { $$('.pin-notification').toggleClass('active'); },10); } } app.removePinwheel = function() { $$('.pin-notification').removeClass('active'); setTimeout(function() { $$('.pinwheel-overlay').html(''); },1000); } }