object is undefined, don't know why
<p>I'm getting an an error "TypeError: Cannot read property 'style' of undefined"
I'd be glad if you could help me debug it:</p>

<pre><code>var TWITTER = '"twitter"';
var FECEBOOK = '"facebook"';
var FACEBOOKicon = "https://s-static.ak.facebook.com/rsrc.php/yi/r/q9U99v3_saj.ico";
var TWITTERicon = "https://twitter.com/phoenix/favicon.ico";

var tweetlinks;
tweetlinks = document.querySelectorAll('[href*=' + TWITTER + ']');
var facelinks;
facelinks = document.querySelectorAll('[href*=' + FECEBOOK + ']');

function getLinks() {
    for (var i = 0; i &lt;= tweetlinks.length; i++) {
        setBackground(tweetlinks[i], TWITTERicon);
    }

    for (var g = 0; i &lt;= facelinks.length; g++) {
        setBackground(facelinks[g], FACEBOOKicon);
    }    

    function setBackground(elment, backimage) {
        elment.style.backgroundImage = backimage;
    }
}

getLinks();
</code></pre>
