Limb.Class('ajaxLoader',
{
  __construct: function(container)
  {
    if (container && jQuery(container)[0])
      this.container = jQuery(container);
    else
      this.container = jQuery('body');
    this.title = "Подождите ...";
    this.build();
  },
  build: function()
  {
    var html = '<div class="ajax_loader" style="display:none;">'
    html += '<strong>' + this.title + '</strong>';
    html += '</div>'
    this.container.append(html);
    this.ajaxLoader = jQuery('.ajax_loader');
  },
  show: function (title)
  {
    var title = title || this.title;
    this.ajaxLoader.find('strong').html(title);
    this.ajaxLoader.show();
  },
  hide: function ()
  {
    this.ajaxLoader.hide();
  }
})



/*============================== WINDOW READY ==============================*/
jQuery(window).ready(function(){
  //-- adminAjaxLoader
  ajaxLoader = new ajaxLoader('#wrapper');
});
