var was_loaded = false;

$(window).load(function(){
	if(!was_loaded){
		was_loaded = true;
		go_to_it()
	}
});

function go_to_it(){
        var s = [
            "http://twitter.com/statuses/user_timeline/MyoPrecision.json?callback=twitterCallback2&nonsense="+(new Date().getTime())/*,
			   "script/tube-footer.js"*/
        ];

        var sc = "script", tp = "text/javascript", sa = "setAttribute", doc = document, ua = window.navigator.userAgent;
        for(var i=0, l=s.length; i<l; ++i) {
				var t=doc.createElement(sc);
				t[sa]("src", s[i]);
				t[sa]("type", tp);
				t[sa]("charset", 'utf-8');
				doc.getElementsByTagName("head")[0].appendChild(t);
        }
$('#fb_cell').html('<iframe src="http://www.facebook.com/plugins/like.php?href=www.myoprecision.com&amp;layout=button_count&amp;show_faces=false&amp;width=46&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="No" frameborder="0" style="border:none; overflow:hidden; width:46px; height:21px;" allowtransparency="true"></iframe>');

$('<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FMyoPrecisionHub&amp;width=295&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=true&amp;header=true&amp;height=595" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:295px; height:595px;" allowTransparency="true"></iframe>').appendTo('#likebox-cell');

//$('<iframe src="http://www.facebook.com/plugins/facepile.php?href=www.myoprecision.com&amp;size=large&amp;width=263&amp;height=85&amp;max_rows=1" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:263px;height:85px;" allowTransparency="true"></iframe>').appendTo('#likebox-cell');

	var a = [
	   "script/blog.excerpt.js.php",
	   "script/feature.excerpt.js.php"
	];

	for(var i=0, l=a.length; i<l; ++i) {
   	$.ajax({
   	   type: "get",
   	   url: a[i] + '?ms=' + (new Date().getTime()) ,
   	   dataType: "xml",
			cache: false,
   	   error: function(msg){
   		   /* fail quietly please */
   		   //alert("readyState: "+msg.readyState+'\n error:'+msg.status+' \n : '+msg.statusText+' \n : '+msg.responseText,'Communications Error');
   		},
   	   success: function(xmlDocument){
				eval($('thecode:first',xmlDocument).text());
   	   }
      }); /* $.ajax */
	}
}

