fxw_url = 'http://fwix.com'; var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; }, searchString: function (data) { for (var i=0;i' : ''); document.write((fxw_supported() == true && (typeof jQuery == 'undefined' || parseFloat(jQuery.fn.jquery) < 1.3 || !$)) ? '' : ''); document.write(fxw_supported() == true ? '' : ''); document.write('
'); document.write('
Top Stories in Your City
'); document.write('
'+((fxw_supported() == false) ? 'Fwix local news is not supported in your browser. Please upgrade.' : 'Loading stories...')+'
'); document.write('
'); function fxw_save() { if($('#'+fxw_id+' .fxw_footer select').val() != '') { fxw_setCookie('fxw_city',$('#'+fxw_id+' .fxw_footer select').val(),365); location.reload(); } } function fxw_int(obj) { if (!$) setTimeout(function() { fxw_int(obj); }, 200); $('#'+fxw_id+' .fxw_body').html(''); var tpl_geos = function() { return ['option', {'value':this.id,'selected':(fxw_getCookie('fxw_city') == this.id ? 'selected':'')}, this.pretty]; }; var tpl = function() { c = []; c_attr = 'fxw_story'; if(this.image && fxw_showImage == true) { c = c.concat(['img', { 'src': this.image }, '']); c_attr += ' fxw_image'; } if(this.id == 'ads') c = c.concat(['div', {'class':'fxw_title'}, ['a', { 'href': this.url, 'target': '_blank', 'style': 'color: '+fxw_link_color }, this.title]]); else c = c.concat(['div', {'class':'fxw_title'}, ['a', { 'href': this.url, 'target': '_parent', 'style': 'color: '+fxw_link_color }, this.title]]); c = c.concat((fxw_showDescription == true) ? ['div', {'style': 'color: '+fxw_color, 'class':'fxw_desc'}, this.description] : []); c = c.concat(['div', {'class':'clear'}, '']); c_attr += (parseFloat(this.count)+1 == obj.stories.length) ? ' fxw_last' : ''; return ['div', {'class': c_attr, 'style': 'border-color: '+fxw_line+' '}, c]; }; if(!obj) $('#'+fxw_id+' .fxw_body').html('We were unable to retrieve matching news from Fwix. Please refresh the page to try again.'); else { $('#'+fxw_id+' .fxw_header').html(obj.title); if(!obj.stories || obj.stories.length == 0) $('#'+fxw_id+' .fxw_body').html('Sorry, there are no available news of this type on Fwix.'); else { for (var i = 0 ; i < obj.stories.length ; i++) { obj.stories[i].count = i; $('#'+fxw_id+' .fxw_body').tplAppend(obj.stories[i], tpl); } } if(obj.geos) { for (var i = 0 ; i < obj.geos.length ; i++) { $('#'+fxw_id+' .fxw_footer select').tplAppend(obj.geos[i], tpl_geos); } } } } function fxw_getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; } function fxw_setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function fxw_supported() { if((BrowserDetect.browser == 'Safari' && (typeof BrowserDetect.version == 'string' || BrowserDetect.version < 3)) || (BrowserDetect.browser == 'Explorer' && (typeof BrowserDetect.version == 'string' || BrowserDetect.version < 5))) return false; else return true; } document.write(fxw_supported() == true ? '' : ''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write('');