
FEEDINVADER.Config={addOnVersion:null,isAddOn:false,minLength:null,maxLength:null,regex:null,strings:{'connErrorTitle':'Error','connError':'FeedInvader is currently unavailable.  Please try again later.','loading':'Loading...','blankUsername':'Enter a username','invalidUsername':'Your username can only contain alpha-numeric characters','usernameTooLong':'Your username cannot exceed {0} characters','usernameTooShort':'Your username must be at least {0} characters','usernameExists':'That username is already in use','usernameBadWords':'Your username cannot contain profanity','blankEmail':'Enter your email address','invalidEmail':'That email address is invalid','emailTooLong':'Your email address cannot exceed {0} characters','emailTooShort':'Your email address must be at least {0} characters','emailExists':'That email address is already in use','blankPassword':'Enter a password','blankConfirmPassword':'Confirm your password','passwordTooLong':'Your password cannot exceed {0} characters','passwordTooShort':'Your password must be at least {0} characters long','invalidPassword':'Your password can only contain letters, numbers, and/or the special characters $#@&-_~!%^*(){}[]','passwordsNotEqual':'Your passwords do not match','invalidCaptcha':'The words you entered below did not match the image','redirecting':'Redirecting...','formatLoginNotVerified':'You have not activated your account.  <strong><a href="{0}{1}" target="_blank">Click here to resend the activation email</a></strong>.','loginNotActive':'Your account has been disabled','loginInvalid':'Your username/password is incorrect','passwordReset':'An email has been sent with instructions on how to reset your password','inactiveAccount':'The account with that email address has been disabled','resetInvalidEmail':'The email address you entered is invalid','invalidPasswordCheck':'That password is invalid','passwordChanged':'Your password has been changed successfully','emailSaved':'Your email settings have been saved successfully','invalidOldPassword':'Your old password is incorrect','newPasswordSame':'Your new password cannot be the same as your old password','blankName':'Enter your name','blankSubject':'Enter a subject','blankMsg':'Enter a message','contactMsgTooLong':'Your message cannot exceed {0} characters','author':'by {0}','warning':'Warning','firebugWarning':'Please disable Firebug to improve performance','myFeeds':'My Feeds','noFeeds':'You do not have any saved feeds.','defaultFeedTitle':'No Feed Selected','unknownAuthor':'Unknown','edit':'Edit','editFeed':'Edit Feed','editBundle':'Edit Bundle','addFeed':'Add Feed','addBundle':'Add Bundle','remove':'Remove','removeFeed':'Remove Feed','removeBundle':'Remove Bundle','refresh':'Refresh','bottomView':'Bottom','rightView':'Right','expandedView':'Expanded','title':'Title','date':'Date','newTab':'View In New Tab','newWin':'View In New Window','name':'Name','cancel':'Cancel','loadingFeed':'Loading feed...','error':'Error','errorLoading':'There was an error loading <b>{0}</b>','url':'URL','addFeed':'Add Feed','bundle':'Bundle','bundleEmptyText':'Select a bundle...','noneBundle':'None (Default)','confirmFeedRemoveTitle':'Confirm Feed Removal','confirmFeedRemove':'Are you sure you want to remove the feed <b>{0}</b>?','confirmBundleRemoveTitle':'Confirm Bundle Removal','confirmBundleRemove':'Are you sure you want to remove the bundle <b>{0}</b> and <b>all of its feeds</b>?','alertErrorsTitle':'Error','loadFeed':'Load Feed','rename':'Rename','blankBundleName':'Please enter a bundle name.','bundleNameRegex':'Bundle names can only contain letters, numbers, spaces and/or the characters: - _','bundleNameLength':'Bundle names must be less than {0} characters.','duplicateBundleName':'You already have a bundle with that name.','feedTitleExists':'You already have a feed with that name.','feedLinkExists':'You already have a feed with that url.','feedTitleLength':'Feed names must be less than {0} characters.','feedLinkLength':'Feed urls must be less than {0} characters.','blankFeedTitle':'Please enter a feed name.','blankFeedLink':'Please enter a feed url.','blankFeedBundle':'Please select a bundle.','invalidFeedLink':'That does not appear to be a valid feed.','noFeedExists':'You no longer have that feed.','noBundleExists':'You no longer have that bundle.','pagingMsg':'Showing {0} - {1} of {2}','markRead':'Mark As Read','openPodcast':'Play Podcast','sendEmail':'Email','addBookmark':'Bookmark','lastRefreshed':'Last refreshed {0}','unreadCount':'Unread {0}/{1}','sendEmail':'Email This'}};
(function(){var CONFIG=FEEDINVADER.Config;FEEDINVADER.Util={addEventListener:function(event,callback)
{if(!Ext.isIE){window.addEventListener(event,callback,false);}},fireAddOnEvent:function(eventId,args)
{var el=document.createElement('addOnData');if('createEvent'in document){for(var key in args){el.setAttribute(key,args[key]);}
document.documentElement.appendChild(el);var evt=document.createEvent('Events');evt.initEvent(eventId,true,false);el.dispatchEvent(evt);}
return el;},firstValue:function(obj)
{for(var key in obj){return obj[key];}},fieldErrors:function(form,fieldErrors)
{for(var field in fieldErrors){var error=this.firstValue(fieldErrors[field]);var formField=form.findField(field);if(formField){formField.markInvalid(CONFIG.strings[error]);}else{Ext.MessageBox.show({title:CONFIG.strings['error'],msg:CONFIG.strings[error],buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.ERROR});}}}};})();
FEEDINVADER.Ajax=(function(){var CONFIG=FEEDINVADER.Config;var reqs={};var self={inProgress:function(id)
{return(id in reqs);},abort:function(id)
{Ext.Ajax.abort(reqs[id]);delete reqs[id];},send:function(cfg)
{if(cfg.el){cfg.el.mask(CONFIG.strings['loading'],'x-mask-loading');}
if(!cfg.params){cfg.params={};}
if(FEEDINVADER.isLoggedIn){cfg.params.crumb=FEEDINVADER.crumb;}
var successFn=cfg.success;var failureFn=cfg.failure;var callbackFn=cfg.callback;cfg.success=function(response,options){try{var handled=false;var rs=Ext.util.JSON.decode(response.responseText);if(rs.success){successFn&&successFn.call(cfg.scope,rs,options,response);}else{if(rs.connError){self.handleConnError(rs.connError);}else if(rs.fieldErrors||rs.formError){failureFn&&failureFn.call(cfg.scope,rs,options,response);}else{self.showConnError();}}}catch(e){self.showConnError();}};cfg.callback=function(response,success,options){if(cfg.el){cfg.el.unmask();}
try{callbackFn&&callbackFn.call(cfg.scope,response,success,options);}catch(e){}
delete reqs[cfg.id];};cfg.failure=function(response,options){self.showConnError();};reqs[cfg.id]=Ext.Ajax.request(cfg);return reqs[cfg.id];},handleConnError:function(e)
{switch(e){case'invalidCrumb':location.reload();break;case'notLoggedIn':location.href=CONFIG.url.auth+'?redirect='+location.pathname;break;default:this.showConnError();break;}},showConnError:function()
{Ext.MessageBox.show({title:CONFIG.strings['connErrorTitle'],msg:CONFIG.strings['connError'],buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.ERROR});}};return self;})();
(function(){var CONFIG=FEEDINVADER.Config;var UTIL=FEEDINVADER.Util;var AJAX=FEEDINVADER.Ajax;FEEDINVADER.FormPanel=function(cfg){this.cfg=$.extend({cls:'fdinv-form',labelAlign:'top',border:false,defaultType:'textfield',buttonAlign:'left'},cfg);this.cfg.defaults=this.cfg.defaults||{};this.cfg.defaults=$.extend({validationEvent:false},this.cfg.defaults);FEEDINVADER.FormPanel.superclass.constructor.call(this,this.cfg);this.form=this.getForm();this.reqId=this.cfg.renderTo;if(this.cfg.formInfo){this.formInfoId='#'+this.cfg.formInfo;$(this.formInfoId).html(document.getElementById('fdinv-form-info-tpl').value);this.loadingEl=$(this.formInfoId+' div.fdinv-form-info div.loading');this.errorEl=$(this.formInfoId+' div.fdinv-form-info div.error');this.msgEl=$(this.formInfoId+' div.fdinv-form-info div.msg');this.ctrEl=$(this.formInfoId+' div.fdinv-form-info');this.errorText=$(this.formInfoId+' div.fdinv-form-info span.error-text');this.msgText=$(this.formInfoId+' div.fdinv-form-info span.msg-text');}};Ext.extend(FEEDINVADER.FormPanel,Ext.form.FormPanel,{abort:function()
{AJAX.abort(this.reqId);},validate:function()
{return this.form.isValid();},submit:function(options)
{var self=this;if(!AJAX.inProgress(this.reqId)&&this.validate()){if(this.formInfoId){this.loadingEl.show();this.errorEl.hide();this.msgEl.hide();this.ctrEl.show();}
options=options||{scope:null};this.form.clearInvalid();var values=this.form.getValues();options.params=(options.params?$.extend(values,options.params):values);options.id=this.reqId;var failureFn=options.failure;options.failure=function(o,options,response){if(self.formInfoId&&o){if(o.fieldErrors){self.handleFieldErrors(o.fieldErrors);}
if(o.formError){self.handleFormError(o.formError);}}
failureFn&&failureFn.call(options.scope,o,options,response);};var successFn=options.success;options.success=function(o,options,response){if(self.formInfoId){if(o&&o.formMsg){self.handleFormMsg(o.formMsg);}}
successFn&&successFn.call(options.scope,o,options,response);};var callbackFn=options.callback;options.callback=function(response,success,options){if(self.formInfoId){self.loadingEl.hide();if($(self.formInfoId+' div.fdinv-form-info div.error:hidden').length&&$(self.formInfoId+' div.fdinv-form-info div.msg:hidden').length){self.ctrEl.hide();}}
callbackFn&&callbackFn.call(options.scope,response,success,options);};AJAX.send(options);}},handleFormError:function(formError)
{this.showFormError(CONFIG.strings[formError]);},handleFormMsg:function(formMsg)
{this.showFormMsg(CONFIG.strings[formMsg]);},handleFieldErrors:function(fieldErrors)
{for(var field in fieldErrors){var errors=fieldErrors[field];var formField=this.form.findField(field);if(formField){for(var key in errors){formField.markInvalid(CONFIG.strings[errors[key]]);}}}},showFormError:function(error)
{this.errorText.html(error);this.errorEl.show();this.ctrEl.show();},showFormMsg:function(msg)
{this.msgText.html(msg);this.msgEl.show();this.ctrEl.show();}});})();
FEEDINVADER.Main=(function(){var CONFIG=FEEDINVADER.Config;var UTIL=FEEDINVADER.Util;var self={init:function()
{CONFIG.addOnVersion=UTIL.fireAddOnEvent('checkVersion').getAttribute('version');if(CONFIG.addOnVersion){CONFIG.isAddOn=true;}
$('#fdinv-middle div.box').each(function(){$(this).corner({tl:{radius:10},tr:{radius:10},bl:{radius:10},br:{radius:10}});});}};$(document).ready(function(){self.init();});return self;})();