/*
# ------------------------------------------------------------------------
# JA Catpopup module for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license - PHP files are GNU/GPL V2. CSS / JS are Copyrighted Commercial,
# bound by Proprietary License of JoomlArt. For details on licensing, 
# Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
# Author: JoomlArt.com
# Websites:  http://www.joomlart.com -  http://www.joomlancers.com
# Redistribution, Modification or Re-licensing of this file in part of full, 
# is bound by the License applied. 
# ------------------------------------------------------------------------
*/

var curr = 0;
showitem = function(i){
  var item = $('jacp-item'+i);
  if((curr != i) && item) {
    var curritem = $('jacp-item'+curr);
    if(curritem){
      $('jacp-li'+curr).removeClass('active');
    }
    $('jacp-li'+i).addClass('active');
    var fx = new Fx.Elements([item, curritem]);
    var objs = {};
    objs[0] = {'opacity':[0,1]};
    objs[1] = {'opacity':[1,0]};
    fx.start(objs);
    curr = i;
  }
}
showfirst = function() {
  $$('.jacp-mainitem').each (function(item){
    item.setStyles({'opacity':0,'display':'block'});
  });
  var item = $('jacp-item'+curr);
  if(item) {
    item.setStyle('opacity',1);
    $('jacp-li'+curr).addClass('active');
  }
}


