[jQuery] inArray inst working in my script

[jQuery] inArray inst working in my script


jQuery.getCSS = function(url, media, rel, title) {
estilos_href = new Array();
$.each( document.styleSheets, function(i, n){
estilos_href[i] = n.href;
});
nuevo_estilo = jQuery(document.createElement('link')).attr({
href: url,
media: media || 'screen',
type: 'text/css',
title: title || '',
rel: rel || 'stylesheet'
});
if ( ! $.inArray(nuevo_estilo[0].href, estilos_href) ) {
nuevo_estilo.appendTo('head');
}
};
what im doing wrong?