
	// http://apiwiki.twitter.com/Twitter-REST-API-Method%253A-statuses-user_timeline    
	// http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback
	var regexp = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;  
	var twitter = function() {
		$.getJSON("http://twitter.com/statuses/user_timeline/frankvilhelmsen.json?count=6&callback=?",
		function(data) {
			$.each(data, function(i) {
				var twitter_time = prettyDate(this['created_at'])
				var twitter_uri_encoded_text = this['text'].replace(regexp,'<a href="$1">$1</a>')	
				$("#twitter-channel #content").append("<p alt='"+twitter_time+"'>"+twitter_uri_encoded_text+"</p>");
			});
    	});
		setTimeout(function() {
			$('#twitter-channel #content').slideDown('slow');
			$("#twitter-channel").effect("highlight", {}, 1500);
		}, 800)
	}

    var blog = function() {
        $.getJSON("http://blog.frankvilhelmsen.com/posts/title/all.jsonp?callback=?", function(data) {
            $.each(data, function(i, item) {
                $("#blog-channel #content").append("<p><a href='/posts/"+item.post.id+"'>"+item.post.title+"</a></p>");
            });
            $("#blog-channel #content p").fadeIn('slow');
            $("#blog-channel").effect("highlight", {}, 1500);
		} )
    };

	var flickr = function() {
    	$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=7185299@N07&format=json&jsoncallback=?",
        	function(data){
          		$.each(data.items, function(i,item){        

                $("#flickr #content").append("<a href='"+item.link+"'><img  border='0' alt='"+item.title+"'src='"+item.media.m.replace('_m','_s')+"' </img></a>");    
	
	
/*            		$("<img/>")
						.attr("src", item.media.m.replace('_m','_s')
						.attr("alt", item.title)
						.appendTo("#flickr-channel #content"); */
            		if ( i == 6 ) return false;
          		});
          		$("#flickr #content img").fadeIn('slow');
	            $("#flickr").effect("highlight", {}, 1500);
        	});
	}

