/*! jQuery Waiting - v0.1.1 - 2013-06-08 * https://github.com/Novascreen/jquery.waiting * Copyright (c) 2013 Thomas Hermann; Licensed MIT */ (function(i){"use strict";function t(t,e){this.element=t,this.$el=i(t),this.options=i.extend({},n,e),this._defaults=n,this._name=s,this._addPositionRelative=!1,this.init()}var s="waiting",n={waitingClass:s,position:"center",overlay:!0,fixed:!1};t.prototype={init:function(){this.$container=i('
'),this.$indicator=i('').appendTo(this.$container),this.options.overlay&&(this.$container.addClass("overlay"),this.$overlay=i('').appendTo(this.$container)),this.options.overlay&&"custom"!==this.options.position&&this.$indicator.addClass(this.options.position),this.options.fixed&&this.$container.addClass("fixed"),""===this.element.style.position&&(this._addPositionRelative=!0),this.show()},show:function(){this._addPositionRelative&&(this.element.style.position="relative"),this.$el.addClass(this.options.waitingClass),this.$container.appendTo(this.$el).removeClass("hidden")},hide:function(){this.$container.addClass("hidden"),this.$container.detach(),this.$el.removeClass(this.options.waitingClass),this._addPositionRelative&&(this.element.style.position="")},again:function(){this.show()},done:function(){this.hide()}},i.fn[s]=function(n){return this.each(function(){var e,o,a;if(i.data(this,"plugin_"+s)){if(e=i.data(this,"plugin_"+s),o="again",a={again:!0,done:!0},"string"==typeof n){if(!a[n])return!1;o=n,n=null}e[o].call(e,n)}else i.data(this,"plugin_"+s,new t(this,n))})}})(jQuery,window,document);