!function(a){"use strict";a.peekABar=function(b){var c=this,d=parseInt(1e8*Math.random(),0);this.bar={},this.settings={};var e={html:"Your Message Here",delay:3e3,autohide:!1,padding:"1em",backgroundColor:"rgb(195, 195, 195)",animation:{type:"slide",duration:"slow"},cssClass:null,opacity:"1",position:"top",onShow:function(){},onHide:function(){},closeOnClick:!1},f=function(){c.settings=a.extend({},e,b),g(),h()};this.show=function(a){switch(void 0!==a&&a.html&&this.bar.html(a.html),this.settings.animation.type){case"slide":this.bar.slideDown(c.settings.animation.duration);break;case"fade":this.bar.fadeIn(c.settings.animation.duration)}this.settings.autohide&&setTimeout(function(){c.hide()},this.settings.delay),this.settings.onShow.call(this,a)},this.hide=function(){switch(this.settings.animation.type){case"slide":this.bar.slideUp(c.settings.animation.duration);break;case"fade":this.bar.fadeOut(c.settings.animation.duration)}this.settings.onHide.call(this)};var g=function(){c.bar=a("<div></div>").addClass("peek-a-bar").attr("id","__peek_a_bar_"+d),a("html").append(c.bar),c.bar.hide()},h=function(){i(),j(),k(),l(),n(),m(),o(),p()},i=function(){c.bar.html(c.settings.html)},j=function(){c.settings.autohide&&setTimeout(function(){c.hide()},c.settings.delay)},k=function(){c.bar.css("padding",c.settings.padding)},l=function(){c.bar.css("background-color",c.settings.backgroundColor)},m=function(){null!==c.settings.cssClass&&c.bar.addClass(c.settings.cssClass)},n=function(){c.bar.css("opacity",c.settings.opacity)},o=function(){switch(c.settings.position){case"top":c.bar.css("top",0);break;case"bottom":c.bar.css("bottom",0);break;default:c.bar.css("top",0)}},p=function(){c.settings.closeOnClick&&c.bar.click(function(){c.hide()})};return f(),this}}(jQuery);
