(function(d){d.fn.rssfeed=function(a,b,i){b=d.extend({limit:10,header:!0,titletag:"h4",date:!0,content:!1,snippet:!1,media:!1,showerror:!0,errormsg:"",key:"ABQIAAAAYFHJicMGW4c6kNTz9KpujxSplZPRBBsJQAw-f4uTvL5vdD9NbBR04meujsOSK0mkJvBKbGkPHgp6dw",ssl:!1,linktarget:"_blank"},b);return this.each(function(f,p){var q=d(p),g="";b.ssl&&(g="s");q.hasClass("rssFeed")||q.addClass("rssFeed");if(null==a)return!1;g="http"+g+"://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+encodeURIComponent(a); null!=b.limit&&(g+="&num="+b.limit);null!=b.key&&(g+="&key="+b.key);d.getJSON(g+"&output=json_xml",function(a){if(200==a.responseStatus){var h=a.responseData,a=b,j=h.feed;if(j){var c="",g="odd";if(a.media){var f=h.xmlString;"Microsoft Internet Explorer"==navigator.appName?(h=new ActiveXObject("Microsoft.XMLDOM"),h.async="false",h.loadXML(f)):h=(new DOMParser).parseFromString(f,"text/xml");f=h.getElementsByTagName("item")}a.header&&(c+='<div class="rssHeader"><a href="'+j.link+'" title="'+j.description+ '">'+j.title+"</a></div>");c+='<div class="rssBody"><ul>';for(h=0;h<j.entries.length;h++){var e=j.entries[h],k;e.publishedDate&&(k=new Date(e.publishedDate),k=k.toLocaleDateString()+" "+k.toLocaleTimeString());c+='<li class="rssRow '+g+'"><'+a.titletag+'><a href="'+e.link+'" title="View this feed at '+j.title+'" target="'+a.linktarget+'">'+e.title+"</a></"+a.titletag+">";a.date&&k&&(c+="<div>"+k+"</div>");a.content&&(c+="<p>"+(a.snippet&&""!=e.contentSnippet?e.contentSnippet:e.content)+"</p>");if(a.media&& 0<f.length){e=f[h].getElementsByTagName("enclosure");if(0<e.length){for(var c=c+'<div class="rssMedia"><div>Media files</div><ul>',l=0;l<e.length;l++)var m=e[l].getAttribute("url"),n=e[l].getAttribute("type"),o=e[l].getAttribute("length"),m='<li><a href="'+m+'" title="Download this media">'+m.split("/").pop()+"</a> ("+n+", ",n=Math.floor(Math.log(o)/Math.log(1024)),o=(o/Math.pow(1024,Math.floor(n))).toFixed(2)+" "+"bytes,kb,MB,GB,TB,PB".split(",")[n],c=c+(m+o+")</li>");c+="</ul></div>"}c+="</li>"}g= "odd"==g?"even":"odd"}d(p).html(c+"</ul></div>")}d.isFunction(i)&&i.call(this,q)}else b.showerror&&(j=""!=b.errormsg?b.errormsg:a.responseDetails),d(p).html('<div class="rssError"><p>'+j+"</p></div>")})})}})(jQuery); (function(d){d.fn.vTicker=function(a){a=d.extend({speed:700,pause:4E3,showItems:3,animation:"",mousePause:!0,isPaused:!1},a);moveUp=function(b,i,f){f||(b=b.children("ul"),first=b.children("li:first").clone(!0),b.animate({top:"-="+i+"px"},a.speed,function(){d(this).children("li:first").remove();d(this).css("top","0px")}),"fade"==a.animation&&(b.children("li:first").fadeOut(a.speed),b.children("li:last").hide().fadeIn(a.speed)),first.appendTo(b))};return this.each(function(){var b=d(this),i=0,f=a.isPaused; b.css({overflow:"hidden",position:"relative"}).children("ul").css({position:"absolute",margin:0,padding:0}).children("li").css({margin:0,padding:0});b.children("ul").children("li").each(function(){d(this).height()>i&&(i=d(this).height())});b.children("ul").children("li").each(function(){d(this).height(i)});b.height(i*a.showItems);setInterval(function(){moveUp(b,i,f)},a.pause);a.mousePause&&b.bind("mouseenter",function(){f=!0}).bind("mouseleave",function(){f=!1})})}})(jQuery);
