function urlencode(str) {
str = escape(str);
str = str.replace('+', '%2B');
str = str.replace('%20', '+');
str = str.replace('*', '%2A');
str = str.replace('/', '%2F');
str = str.replace('@', '%40');
return str;
}
function urldecode(str) {
str = str.replace('+', ' ');
str = unescape(str);
return str;
}
function validarEmail(valor) {
		if (/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/.test(valor))
                return true;
        else
                return false;
                
}
function limiteCaracteres(elemento,maximo){
var limitet;
    if(elemento.value.length > maximo){
		limitet = elemento.value.substr(0,maximo);
		alert("El texto no puede superar los "+ maximo +" caracteres.");
		elemento.value = limitet;
	}
}
function abreshadowbox(url,titulo,player,ancho,alto){
	Shadowbox.open({ 
        content:    url, 
        player:     player, 
        title:      titulo, 
		width:      ancho,
        height:     alto
	});
}

$(document).ready(function(){
	$("#topsocial img").hover(function(){
		$(this).stop().fadeTo(500,0.6);
	},function(){
		$(this).stop().fadeTo(500,1);
	});
});
