function changeLang(v){
	var lang2=(v=='en')?'es':'en';
	showLang(v);
	hideLang(lang2);
}

function showLang(v){
	jQuery('#cn_idioma a.'+v+' span').addClass('marcar_rojo');
	jQuery('#cn_idioma a.'+v).removeAttr('href'); 
	jQuery('#cn_txt_'+v).css({display:'block'});
	jQuery('#nav_'+v).css({display:'block'});
	jQuery('#cn_ft_'+v).css({display:'block'});
	jQuery('.pag_'+v).css({display:'block'});
}

function hideLang(v){
	jQuery('#cn_idioma a.'+v+' span').removeClass('marcar_rojo');
	jQuery('#cn_idioma a.'+v).attr("href", "javascript:changeLang('"+v+"')");
	jQuery('#cn_txt_'+v).css({display:'none'});
	jQuery('#nav_'+v).css({display:'none'});
	jQuery('#cn_ft_'+v).css({display:'none'});
	jQuery('.pag_'+v).css({display:'none'});
}

function resizePanel() {
 
    //get the browser width and height
    width = $(window).width();
    height = $(window).height();
 
    //get the mask width: width * total of items
    mask_width = width * $('.item').length;
         
    //set the dimension
    $('#wrapper, .item').css({width: width, height: height});
    $('#mask').css({width: mask_width, height: height});
     
    //if the item is displayed incorrectly, set it to the corrent pos
    $('#wrapper').scrollTo($('a.selected').attr('href'), 0);
         
}
function myCallback() {
	$('.slideshow').removeClass('loading').animate({'opacity': 1}, 800).cycle({
		fx: 'fade',
		timeout: 3500,
		speed: 1000, 
		random: true
	});
};
