Because if (href.indexOf(this.href.toLowerCase())> -1)
will not be true.
href
will be equal to "http://residencia-geriatrica-ergos.com/"
and this.href
will be equal to "index.html", thus it will not be found in href.
My suggestion:
$(window).load(function() {
var href = location.href.toLowerCase();
switch(href):
case 'http://residencia-geriatrica-ergos.com/':
$('a[href="index.html"]').prepend('<span><i class="icon-home"></i></span>'); //append active icon
$('li:not(.active) a').prepend('<i class="icon-double-angle-right"></i>'); //append standard icons
break;
case 'http://residencia-geriatrica-ergos.com/index.html':
$('a[href="index.html"]').prepend('<span><i class="icon-home"></i></span>');
$('li:not(.active) a').prepend('<i class="icon-double-angle-right"></i>'); //append standard icons
break;
case 'http://residencia-geriatrica-ergos.com/servi.html':
$('a[href="servi.html"]').prepend('<span><i class="icon-home"></i></span>');
$('li:not(.active) a').prepend('<i class="icon-double-angle-right"></i>'); //append standard icons
break;
//add other