/*
 * JavaScript Components Beta
 * http://www.axa.com/
 *
 * Date: Sat Feb 13 22:33:48 2010 -0500
 */
var selectorIdioma = {
	cssActivo: 'activo',
	cssVersion: '.version',
	cssDesplegado: 'desplegado',
	categorias: [],
	init: function(){
		this.version = $('#cabecera').find(this.cssVersion);
		if(this.version.size() <= 0) return;
		this.config();
		this.establecerIdioma();
		this.desplegar();
		return false;
	},
	config: function(){
		this.idiomas = this.version.find('li');
		return;
	},
	desplegar: function(){
		var that = this;
		var activo = this.version.find('.' + this.cssActivo);
		activo.bind('click',function(){
			that.version.hasClass(that.cssDesplegado) ? that.version.removeClass(that.cssDesplegado) : that.version.addClass(that.cssDesplegado); 
			return false;
		});
		return;
	},
	establecerIdioma: function(){
		var version = gVersion;
		if(version == null) version = 0;
		var idiomaSeleccionado = $(this.idiomas[version]);
		idiomaSeleccionado.addClass(this.cssActivo);
		return;
	},
	marcarOpcionesSegundoNivel: function(){
		var that = this;
		return;
	}
};
