

//lightbox
var k_fileLoadingImage = "./_my/img/lightbox/loading.gif";		
var k_fileBottomNavCloseImage = "./_my/img/lightbox/closelabel.gif";
var k_resizeSpeed = 7;	//1..10
var k_borderSize = 10;	

/*
http://20bits.com/2007/05/23/dynamic-ajax-tabs-in-20-lines/
Usage
The above was created with the following HTML

   1.
      <div class="tabbed-pane">
   2.
      <ol class="tabs">
   3.
          <li><a href="#" class="active" id="pane1">Pane 1</a></li>
   4.
          <li><a href="#" id="pane2">Pane 2</a></li>
   5.
      </ol>
   6.
   7.
      </p>
   8.
      <div id="MyPane_container" class="tabbed-container">
   9.
          <div id="MyPane_overlay" class="overlay" style="display: none"><h3>Loading...</h3></div>
  10.
          <div id="MyPane" class="pane">
  11.
          ...DEFAULT CONTENT...
  12.
          </div>
  13.
      </div>

and the following Javascript:

   1.
      new TabbedPane('MyPane',
   2.
          {
   3.
              'pane1': '/downloads/pane1.html',
   4.
              'pane2': '/downloads/pane2.html'
   5.
          },
   6.
          {
   7.
              onClick: function(e) {
   8.
                  $('MyPane_overlay').show();
   9.
              },
  10.
              onSuccess: function(e) {
  11.
                  $('MyPane_overlay').hide();
  12.
              }
  13.
          });
*/
//ladowanie taba ajaxem
function TabbedPane(pane, tabs, args) {
	for (id in tabs) {
		Event.observe(id, 'click', function(e) {
			if (typeof(args.onClick) == 'function')
				args.onClick(e);
			
			for (id in tabs) $(id).removeClassName('active');
			Event.element(e).addClassName('active');
			
			new Ajax.Updater(pane, tabs[Event.element(e).id], $H({
					asynchronous: true, 
					method: 'get'
				}).merge(args));
			Event.stop(e);
		});
	}
}
