// ---------------------------------------------------------------------------- // Stikr, jQuery plugin // v 1.0 // ---------------------------------------------------------------------------- // Copyright (C) 2010 recens // http://recens.ru/jquery/plugin_stickr.html // ---------------------------------------------------------------------------- (function($){$.stickr=function(o){var o=$.extend({time:5000,speed:'slow',note:null,className:null,sticked:false,position:{top:0,right:0}},o);var a=$('#jquery-stickers');if(!a.length){$('body').append('
');var a=$('#jquery-stickers')}a.css('position','fixed').css({right:'auto',left:'auto',top:'auto',bottom:'auto'}).css(o.position);var b=$('');a.append(b);if(o.className)b.addClass(o.className);b.html(o.note);if(o.sticked){var c=$('');b.prepend(c);c.click(function(){b.fadeOut(o.speed,function(){$(this).remove()})})}else{setTimeout(function(){b.fadeOut(o.speed,function(){$(this).remove()})},o.time)}}})(jQuery);