(function(b){b.fn.rssDisplay=function(f,c){var h={FeedUrl:"",FeedName:"",MaxFeedItems:5,OpenNewWindow:false,Arrangement:"separate",AppBaseUrl:"",ShowTitle:true,TitleSeq:1,TitleFontName:"Arial",TitleFontSize:12,TitleColor:"000000",ShowDate:true,DateSeq:2,DateFontName:"Arial",DateFontSize:12,DateColor:"000000",DateIntro:"",DateFormat:"std",DateDateFmtDayOfWeek:"",ShowTime:true,TimeSeq:3,TimeFontName:"Arial",TimeFontSize:12,TimeColor:"000000",TimeIntro:"at",TimeFormat:"std",ShowAuthor:false,AuthorSeq:4,AuthorFontName:"Arial",AuthorFontSize:12,AuthorColor:"000000",AuthorIntro:"at",AuthorFormat:"std",ShowDescription:true,DescriptionSeq:5,DescriptionFontName:"Arial",DescriptionFontSize:12,DescriptionColor:"000000",DescriptionPortion:"all",DescriptionPresentation:"normal"};var e=this;var d=e.attr("id");if(typeof(d)=="undefined"||d==null||d.length==0){d="rssDisplay"+Math.round(Math.random()*65535);e.attr("id",d)}var g=b.fn.rssDisplay.instances[d];if(g==null){g=b.fn.rssDisplay.instances[d]={me_this:this,me:this,fn:function(k,l,q){k.me.empty();k.me=k.me_this;k.myId=k.me.attr("id");var m=b.extend(true,{},h,q);switch(l.toLowerCase()){case"displaylive":case"displaysample":j(m);return k.me;case"displaycached":n(m);return k.me}function n(s){s.isSample=false;var r=s.FeedUrl;b.ajax({url:r,cache:false,dataType:("xml"),success:function(t){p(s,t)}})}function j(s){s.isSample=true;k.me.append(b(document.createElement("div")).html("&nbsp;<br />[ RSS Feed: "+s.FeedName+" - "+s.FeedUrl+" ]<br />&nbsp;<br />"));for(var r=0;r<s.MaxFeedItems;++r){i(s)}}function i(u){if(u.ShowTitle){var x=b(document.createElement("span")).css({"font-family":u.TitleFontName,"font-size":u.TitleFontSize,color:"#"+u.TitleColor}).html("Sample RSS Entry Headline");k.me.append(b(document.createElement("div")).append(x))}if(u.ShowDate||u.ShowTime||u.ShowAuthor){var r=b(document.createElement("div"));if(u.ShowDate){var s="Sat Dec 25 2010";if(u.DateIntro){s=u.DateIntro+" "+s}if(u.ShowTime||u.ShowAuthor){s+=" "}r.append(b(document.createElement("span")).css({"font-family":u.DateFontName,"font-size":u.DateFontSize,color:"#"+u.DateColor}).html(s))}if(u.ShowTime){var w="10:04 pm";if(u.TimeIntro){w=u.TimeIntro+" "+w}if(u.ShowAuthor){w+=" "}r.append(b(document.createElement("span")).css({"font-family":u.TimeFontName,"font-size":u.TimeFontSize,color:"#"+u.TimeColor}).html(w))}if(u.ShowAuthor){var t="John Smith";if(u.AuthorIntro){t=u.AuthorIntro+" "+t}r.append(b(document.createElement("span")).css({"font-family":u.AuthorFontName,"font-size":u.AuthorFontSize,color:"#"+u.AuthorColor}).html(t))}k.me.append(b(document.createElement("div")).append(r))}if(u.ShowDescription){var v="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";k.me.append(b(document.createElement("div")).css({"font-family":u.DescriptionFontName,"font-size":u.DescriptionFontSize,color:"#"+u.DescriptionColor}).html(v))}k.me.append(b(document.createElement("div")).html("&nbsp;"))}function p(u,t){var v=0,r=b(t).find("item");if(r.length==0){r=b(t).find("entry")}v=r.length;if((u.MaxFeedItems>0)&&(u.MaxFeedItems<v)){v=u.MaxFeedItems}for(var s=0;s<v;++s){o(u,r[s])}}function o(t,F){if(t.ShowTitle){var D=a(F,"title");if(!D){D="[No Title]"}var B=a(F,"link");var x="_blank";if(!t.OpenNewWindow){x="_self"}var E;if(B){E=b(document.createElement("a")).attr("href",B).attr("target",x).css({"font-family":t.TitleFontName,"font-size":t.TitleFontSize,color:"#"+t.TitleColor}).html(D)}else{E=b(document.createElement("span")).css({"font-family":t.TitleFontName,"font-size":t.TitleFontSize,color:"#"+t.TitleColor}).html(D)}k.me.append(b(document.createElement("div")).append(E))}if(t.ShowDate||t.ShowTime||t.ShowAuthor){var C=b(document.createElement("div"));var v=null;if(t.ShowAuthor){v=a(F,"author");if(!v){v=a(F,"dc:creator")}if(!v){v=a(F,"author_name")}}if(t.ShowDate||t.ShowTime){var y=a(F,"updated");if(!y){y=a(F,"date_timestamp")}if(!y){y=a(F,"dc:date")}if(!y){y=a(F,"pubdate")}if(!y){y=a(F,"pubDate")}if(!y){y=a(F,"issued")}if(!y){y=a(F,"modified")}if(!y){y=a(F,"created")}if(y){datetime_re=/^\s*(([a-zA-Z]{3})\s*,?\s*)?(\d\d?)\s*([a-zA-Z]{3})\s+(\d+)\s+(\d\d?):(\d\d)(:(\d\d))?\s*(([A-Z]+)|([-+]?\d+))?\s*$/;matches=datetime_re.exec(y);if(matches){if(t.ShowDate){var A=matches[5]*1;if(A<100){if(A<70){A+=2000}else{A+=1900}}var s=matches[4]+" "+matches[3]+" "+A;if(matches[2]){s=matches[2]+" "+s}if(t.DateIntro){s=t.DateIntro+" "+s}if(t.ShowTime||v){s+=" "}C.append(b(document.createElement("span")).css({"font-family":t.DateFontName,"font-size":t.DateFontSize,color:"#"+t.DateColor}).html(s))}if(t.ShowTime){var u=matches[6]*1;var z="am";if(u==12){z="pm"}else{if(u>12){u-=12;z="pm"}}var r=u+":"+matches[7]+" "+z;if(matches[10]){r+=" "+matches[10]}if(t.TimeIntro){r=t.TimeIntro+" "+r}if(v){r+=" "}C.append(b(document.createElement("span")).css({"font-family":t.TimeFontName,"font-size":t.TimeFontSize,color:"#"+t.TimeColor}).html(r))}}else{if(v){y+=" "}if(t.ShowDate){C.append(b(document.createElement("span")).css({"font-family":t.DateFontName,"font-size":t.DateFontSize,color:"#"+t.DateColor}).html(y))}else{C.append(b(document.createElement("span")).css({"font-family":t.TimeFontName,"font-size":t.TimeFontSize,color:"#"+t.TimeColor}).html(y))}}}if(v){C.append(b(document.createElement("span")).css({"font-family":t.AuthorFontName,"font-size":t.AuthorFontSize,color:"#"+t.AuthorColor}).html(v))}k.me.append(b(document.createElement("div")).append(C))}}if(t.ShowDescription){var w=a(F,"description");if(!w){w=a(F,"content")}if(!w){w=a(F,"atom_content")}if(w){k.me.append(b(document.createElement("div")).css({"font-family":t.DescriptionFontName,"font-size":t.DescriptionFontSize,color:"#"+t.DescriptionColor}).html(w))}}k.me.append(b(document.createElement("div")).html("&nbsp;"))}}}}g.me_this=this;return g.fn(g,f,c)};b.fn.rssDisplay.instances={};function a(c,d){var e=c.getElementsByTagName(d);if(e.length==0){return""}if(e[0].firstChild){return e[0].firstChild.nodeValue}else{if(e[0].getAttribute("href")){return e[0].getAttribute("href")}}return""}})(jQuery);
