var keywords="No Watches or Warning in effect";var chk=0;var found=new Array();(function($){var current=null;$.fn.rssfeed=function(url,options,idno){var defaults={limit:4,header:false,titletag:'p',date:false,content:false,snippet:false,showerror:false,errormsg:'',key:null};var options=$.extend(defaults,options);return this.each(function(i,e){var $e=$(e);if(url==null)return false;var api="http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+url; if(options.limit!=null)api+="&num="+options.limit;if(options.key!=null)api+="&key="+options.key;$.getJSON(api,function(data){if(data.responseStatus==200){_callback(e,data.responseData.feed,options,idno)}else{if(options.showerror)if(options.errormsg!=''){var msg=options.errormsg}else{var msg=data.responseDetails};$(e).html('<p class="rssError">'+msg+'</p>')}})})};var _callback=function(e,feeds,options,idnumber){if(!feeds){return false}var html='';for(var i=0;i<feeds.entries.length;i++){var idno=idnumber;var entry=feeds.entries[i];var str=entry.title;for(var h=0;h<1;h++){var str2find=keywords;var arr=str.indexOf(str2find);if(arr>=0){found[h]=1}else{found[h]=0}if(found[h]==1){chk++}else{html+='<'+options.titletag+' style="color: #fff; background-color: #c00000; font-weight: bold; width: 295px; margin-left: auto; margin-right: auto; padding: 3px;"><a href="http://winnipeg.ctv.ca/weather" style="color: #fff;">'+entry.title+'</a></'+options.titletag+'>'}}if(chk>=33){document.getElementById("weather-alerts").innerHTML="";document.getElementById("weather-alerts").style.color="#000";document.getElementById("weather-alerts").style.textAlign="center";document.getElementById("weather-alerts").style.margin="0px";document.getElementById("weather-alerts").style.padding="0px";}else{}}$(e).html(html)}})(jQuery);$(function pullup(){for(var id=1;id<=37;id++){var entifier="#weatheralerts-"+id;$(entifier).rssfeed("http://text.www.weatheroffice.gc.ca/rss/battleboard/mb"+id+"_e.xml",{limit:4},id)}});
