Need assistance with altering JQuery JBAR script

Need assistance with altering JQuery JBAR script

I need some help in altering this JQuery script if possible. I script as it currently stands creates a bar at the bottom of the page with a message that fades away after 5 secs. To trigger the bar you have to click a button. I would like to alter that so you don't need to click the button. The bar fades in after 5 seconds. Everything else I like. The script is from a CodeDrops tutorial called JBar.  http://tympanus.net/codrops/2009/10/29/jbar-a-jquery-notification-plugin/

  1. (function ($) {
  2. $.fn.bar = function (options) {
  3. var opts = $.extend({}, $.fn.bar.defaults, options);
  4. return this.each(function () {
  5. $this = $(this);
  6. var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
  7. $this.click(function (e) {
  8. if(!$('.jbar').length) {
  9. timeout = setTimeout('$.fn.bar.removebar()', o.time);
  10. var _message_span = $(document.createElement('span')).addClass('jbar-content').html(o.message);
  11. _message_span.css({
  12. "color": o.color
  13. });
  14. var _wrap_bar;
  15. (o.position == 'bottom') ? _wrap_bar = $(document.createElement('div')).addClass('jbar jbar-bottom') : _wrap_bar = $(document.createElement('div')).addClass('jbar jbar-top');
  16. _wrap_bar.css({
  17. "background-color": o.background_color
  18. });
  19. if(o.removebutton) {
  20. var _remove_cross = $(document.createElement('a')).addClass('jbar-cross');
  21. _remove_cross.click(function (e) {
  22. $.fn.bar.removebar();
  23. })
  24. } else {
  25. _wrap_bar.css({
  26. "cursor": "pointer"
  27. });
  28. _wrap_bar.click(function (e) {
  29. $.fn.bar.removebar();
  30. })
  31. }
  32. _wrap_bar.append(_message_span).append(_remove_cross).hide().insertBefore($('.content')).fadeIn('fast');
  33. }
  34. })
  35. });
  36. };
  37. var timeout;
  38. $.fn.bar.removebar = function (txt) {
  39. if($('.jbar').length) {
  40. clearTimeout(timeout);
  41. $('.jbar').fadeOut('slow', function () {
  42. $(this).remove();
  43. });
  44. }
  45. };
  46. $.fn.bar.defaults = {
  47. background_color: '#fff',
  48. color: '#000',
  49. position: 'top',
  50. removebutton: true,
  51. time: 5000
  52. };
  53. })(jQuery);
[moderator reformatted]