Uncaught TypeError: Cannot call method 'extend' of undefined I'm trying to use a jquery ticker in my website and this is the code: http://cektkp.com/twittermarquee/twitmarquee.js and I'm getting these errors:

1) Uncaught TypeError: Cannot call method 'extend' of undefined: 

window.twttr.bounds = window.twttr.bounds || {};
   $.extend(twttr.bounds, {
      Bounds: function (b, d, c, a) {
        this.x = b;
        this.y = d;
        this.width = c;
        this.height = a
      }
});


2) Uncaught TypeError: Property '$' of object [object Object] is not a function (line 37) 

 function loadTrendDescriptions() {
    $("#trends a").each(function () {
        var A = $(this);
        var C = A.parent().find("em");
        if (C.length) {
            var B = A.text();
            var D = C.text().replace(new RegExp(B.replace(/([^\w])/gi, "\\$1"), "gi"), "&lt;strong&gt;" + B + "&lt;/strong&gt;");
            var E = A.attr("title").length ? A.attr("title") : A.attr("name");page.trendDescriptions[E] = [B, D]
        }
    })
}


I've fixed many other problems I was getting but these are the ones I just can't understand how to fix. Please help me out!
You are attempting to use jQuery before it's loaded.

You should place that code inside your ready function:

$(document).ready(function () {
    // place code here
});


Although to be really Drupal-friendly, you should use Drupal's behaviors.