$(document).ready(function() {
	
	$().piroBox({
	      my_speed: 300, //animation speed
	      bg_alpha: 0.5, //background opacity
	      radius: 4, //caption rounded corner
	      scrollImage : true, // true == image follows the page _|_ false == image remains in the same open position
	                           // in some cases of very large images or long description could be useful.
	      slideShow : 'true', // true == slideshow on, false == slideshow off
	      slideSpeed : 3, //slideshow duration in seconds(3 to 6 Recommended)
	      pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
	      pirobox_prev : 'piro_prev', // Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
	      close_all : '.piro_close' // add class .piro_overlay(with comma)if you want overlay click close piroBox
	});
	
	area_usuarios();
	
	/*
	$('.scroll').jScrollPane({
		scrollbarWidth: 23, 
		showArrows: true,
		animateTo: true
	});
	
	$('.ordenacion').click(function(){
		key = $(this).attr('abbr');
		$('#campo_orden').val(key);
		
		$('#listado').submit();
	});*/
});

/**
 * Cargar, asíncronamente, el módulo de acceso de portada
 * 
 * @access	public
 * @author	Iván Argulo
 * @return	string	HTML de resultado
 */
function area_usuarios()
{
	post = base_url_lang + '/ajax/area_usuarios';
		
	$.ajax({
		url: post,
		type: 'post',
		cache: false,
		success: function(data) {
			$('#x-area-usuarios-superior').attr('innerHTML', data);
		},
		error: function(e, obj) {
			//alert(e);
		}
	});			
}

/**
 * Procesa XML
 *
 * Workaround para IE, toma una cadena y lo transforma en un objeto XML utilizable.
 *
 * @param	cadena XML
 * @return	objeto XML
 */	
function procesaXML(data)
{
	if(typeof(data) == 'string')
	{
		xml = new ActiveXObject('Microsoft.XMLDOM');
		xml.async = false;
		xml.loadXML(data);
	}
	else 
	{
		xml = data;
	}
		
	return xml;
}
