(function($){var maxItems=0;$.fn.b3AtomSmasher=function(j){var k=$.extend({targeturl:"http://www.b3studios.com/derek/?feed=atom",loadingImg:'http://www.b3studios.com/rssreader/progress.gif',maxItems:1},j);if(!j.targeturl)return false;var l=$.extend(k,j);var n="xml";var divid=guid();this.append('<div id="'+divid+'newsfeed"><div class="atomloader" style="position:absolute;text-align:center;z-index:99;"><img src="'+l.loadingImg+'"/></div></div>');$('#'+divid+'newsfeed .atomloader').width(this.width());$('#'+divid+'newsfeed .atomloader').height(this.height());$('#'+divid+'newsfeed .atomloader img').height(this.height()/4);var toplocal=(this.height()/2)-($('#'+divid+'newsfeed .atomloader img').height()/2)
$('#'+divid+'newsfeed .atomloader img').css('margin-top',toplocal+'px');var path=l.targeturl;maxItems=l.maxItems;requestCrossDomain(path,function(results){$('#'+divid+'newsfeed').append(results);$('#'+divid+'newsfeed .atomloader').remove();});};function S4(){return(((1+Math.random())*0x10000)|0).toString(16).substring(1);}
function guid(){return(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());}
function requestCrossDomain(site,callback){if(!site){alert('No site was passed.');return false;}
var yql='http://query.yahooapis.com/v1/public/yql?q='+encodeURIComponent('select * from feed where url="'+site+'"')+'&format=xml&callback=?';$.getJSON(yql,cbFunc);function cbFunc(data){if(data.results[0]){var datalength=data.results.length;if(datalength>maxItems){datalength=maxItems};var i;var feedHTML="";for(i=0;i<datalength;i++)
{if(window.DOMParser)
{parser=new DOMParser();xmlDoc=parser.parseFromString(data.results[i],"text/xml");}
else
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(data.results[i]);}
feedHTML=feedHTML+"<li><table><tr><td valign='middle'><p class='rsstitle'><a href='"+xmlDoc.getElementsByTagName("guid")[0].childNodes[0].nodeValue+"' target='_blank'>"
+xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue+"</a></p><p class='rssdate'>"
+xmlDoc.getElementsByTagName("pubDate")[0].childNodes[0].nodeValue+"</p><p class='rssdesc'>"
+xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue+"</p></td></tr></table></li>";}
if(typeof callback==='function'){callback(feedHTML);}}
else throw new Error('Nothing returned from getJSON.');}}})(jQuery);
