Script only works with Firebug console enabled

Script only works with Firebug console enabled

Hello,

I am having a strange problem with a script that loads an external .html into a DIV, it simply doesn't work under firefox and internet explorer, but on Safari (win/mac) it works flawlessly.

While trying to debug the script, I enabled the firebug console, and magically everything started working, but ONLY with the console enabled....

here's the script


$(document).ready(function(){

$('img.loader').hide();

$("ul.clases li a").each( function(){

$(this).attr({"rel":$(this).attr("href")});
$(this).attr({"href":"javascript:void(0)"});



$(this).click( function() {

var destino = $(this).attr("rel");
console.log(destino);

// hide the recipient for loading;
$('#recipiente').hide();
$('img.loader').show();

//load the element

if ( $('#recipiente').load(destino) ) {
$('img.loader').hide();
Shadowbox.init();

};

// locate the element and show

$('#recipiente').fadeIn();

});




});






});


Anyone knows why this might be happening?

tnx in advance