// JavaScript Document
$(document).ready(function(){
	twitter();
 });
function twitterSearch(obj) {	
    //this is the div I'm writing the content to	
    var tDiv = document.getElementById("twitter");	
    var user, tweet, postedAt, userURL;	
    for (i=0;i<obj.results.length;i++) {	
        user = obj.results[i].from_user;
        userURL = "http://twitter.com/"+user;
        tweet = obj.results[i].text;
        postedAt = obj.results[i].created_at;
        tDiv.innerHTML +="<a href='"+userURL+"'>"+user+"</a><p>:"+tweet+"</p><div class='clear'></div><em>("+postedAt+" GMT)</em>";
	}
}
//this is basically the same function I was using before
//with the changed search URL
function twitter() { 
    var twitterJSON = document.createElement("script"); 
    twitterJSON.type="text/javascript" 
    //here's the search URL
	twitterJSON.src="http://search.twitter.com/search.json?callback=twitterSearch&q='kclmoneycoach'&rpp=1"
    document.getElementsByTagName("head")[0].appendChild(twitterJSON);
    return false;
}