<script src="jquery.js" type="text/javascript" ></script>
    <script src=".js" type="text/javascript" ></script>
$(document).ready(function() {

/* THE RETURNED JSON ARRAY DEBUGGED OUT

Array
(
    [tumblelog] => Array
        (
            [title] => Noisy Ninjas
            [description] => Quiet in the dark, <b>noisy</b> on the <a href="http://www.markupninjas.com">web</a>
            [name] => noisyninjas
            [timezone] => US/Eastern
            [cname] => 
            [feeds] => Array()

        )

    [posts-start] => 0
    [posts-total] => 1
    [posts-type] => 
    
    [posts] => Array
        (
            [0] => Array
                (
                    [id] => 70758253
                    [url] => http://noisyninjas.tumblr.com/post/70758253
                    [type] => quote
                    [date-gmt] => 2009-01-15 22:04:00 GMT
                    [date] => Thu, 15 Jan 2009 17:04:00
                    [bookmarklet] => 0
                    [mobile] => 0
                    [feed-item] => 
                    [from-feed-id] => 0
                    [unix-timestamp] => 1232057040
                    [quote-text] => Ok, Qa song to be sung to the tune of the Police&#8217;s &#8220;I
&#8217;ll be watching you&#8221;<br/><br/>
Every page you break<br/><br/>
And every fix you fake<br/><br/>
Every &#8216;stake you make<br/><br/>
&#8216;Cause you&#8217;re playing Quake<br/><br/>
I&#8217;ll be watching you<br/><br/>
Can I get another verse?
                    [quote-source] => <a href="http://blog.grumet.net/">Andrew Grumet</a> - My Head of
 Engineering at <a href="http://www.mevio.com">Mevio.com</a>
                    [tags] => Array
                        (
                            [0] => more
                        )

                )

        )

)

*/
	
	// hit the json api, make a 'callback' function that evals the data, because its returned as var tumblr_api_read = 'JSON', then toss that variable into a function I can work with. 
	
	var tumblrJSON;
	var offset = 0;
	
	function apiAjaxCall(passedOffset){
		$.get(
			'http://noisyninjas.tumblr.com/api/read/json/', 
			'debug=0&num=50&start='+passedOffset,
			function(data){ 
				eval(data); 
				tumblrJSONHandler(tumblr_api_read); 
			}
		);
	} 
	
	function tumblrJSONHandler(JSON){
		console.log(JSON['posts'][0]['type']);
		tumblrJSON = JSON;
		check();
	}
	
	function check() { console.log(tumblrJSON) }
	
	apiAjaxCall('0');
	
});