 /*-- THROBBER CLASS---------------------------------------------------*/var Throbber = new Class({ initialize : function (target) { this.target = $(target); this.status = 0; this.img = new Element('img'); this.img.src = arguments[1] || '/images/throbber.gif'; this.img.id = arguments[2] || 'throbber'; }, on : function() {
 if (this.status == 0) { this.target.appendChild(this.img);
 this.status = 1; } }, off : function() {
 if (this.status == 1) { try { this.img.remove(); } catch(x) { /* already removed */ } this.status = 0; } }, toggle : function() { if (this.status) this.off(); else this.on(); }});

var YA = new Object();

YA.init = function() { window.addEvent('domready',function() {  if (!$('ya')) return;  YA.build();  $$('#ya a').each(function(el) {   el.addEvent('click', YA.get);  }); });}

YA.build = function() { // create result div this.container    = new Element('div'); this.container.id = 'blog'; //this.container.injectAfter($('ya')); this.container.inject($('about_site'), 'after');
  // create throbber //this.throbber = new Throbber('throb-target');
}

YA.get = function(ev) { var ev = new Event(ev);
 if (ev.shift || ev.control || ev.alt || ev.meta) return;
 //YA.throbber.on();
  YA.load(ev.target.href); ev.preventDefault();
}

YA.load = function(url) {

   var url = url.replace('archive','archive_ajax');
  var req = new Request.HTML({               method: 'get',               url: url,  
             update: $('blog'),             onComplete: function(response) {}           }).send(); 
  	
}

YA.init();
