/*
 * jquery.purr.js
 * Copyright (c) 2008 Net Perspective (net-perspective.com)
 * Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
(function(a){a.purr=function(e,c){e=a(e);if(!c.isSticky){e.addClass("not-sticky")}var b=document.getElementById("purr-container");if(!b){b='<div id="purr-container"></div>'}b=a(b);a("body").append(b);d();function d(){var g=document.createElement("a");a(g).attr({className:"close",href:"#close",innerHTML:"Close"}).appendTo(e).click(function(){f();return false});e.appendTo(b).hide();if(jQuery.browser.msie&&c.usingTransparentPNG){e.show()}else{e.fadeIn(c.fadeInSpeed)}if(!c.isSticky){var h=setInterval(function(){if(e.prevAll(".not-sticky").length==0){clearInterval(h);setTimeout(function(){f()},c.removeTimer)}},200)}}function f(){if(jQuery.browser.msie&&c.usingTransparentPNG){e.css({opacity:0}).animate({height:"0px"},{duration:c.fadeOutSpeed,complete:function(){e.remove()}})}else{e.animate({opacity:"0"},{duration:c.fadeOutSpeed,complete:function(){e.animate({height:"0px"},{duration:c.fadeOutSpeed,complete:function(){e.remove()}})}})}}};a.fn.purr=function(b){b=b||{};b.fadeInSpeed=b.fadeInSpeed||500;b.fadeOutSpeed=b.fadeOutSpeed||500;b.removeTimer=b.removeTimer||4000;b.isSticky=b.isSticky||false;b.usingTransparentPNG=b.usingTransparentPNG||false;this.each(function(){new a.purr(this,b)});return this}})(jQuery);