(function(a){a.extend({widgets:[]});a.extend({secondTimers:{}});a.extend({secondTimersInterval:setInterval(function(){a.runSecondTimers()},1e3)});a.fn.widgets=function(c,b){a.widgets.push({selector:this.selector,widgetName:c,options:b});a.applyWidgets()};a.applyWidgets=function(){a.each(a.widgets,function(){var c=this,b=a(c.selector),d=c.widgetName+"Attached";if(b.length>0&&b.data(d)==undefined&&a.isVisible(b)){b.data(d,true);a.fn[c.widgetName].apply(b,[c.options])}})};a.isVisible=function(a){return a.is(":visible")};a.addSecondTimer=function(d,e,b,c){a.secondTimers[e]={$object:d,seconds:b,countDown:b,functionCall:c}};a.removeSecondTimer=function(b){delete a.secondTimers[b]};a.runSecondTimers=function(){a.each(a.secondTimers,function(b,a){a.countDown--;if(a.countDown==0){a.countDown=a.seconds;a.functionCall(a.$object)}})};a.trace=function(a){window.console&&window.console.log(a)};a.dump=function(b){if(window.console){a.trace(b);a.trace(typeof b);for(var c in b)trace(c+": "+b[c])}}})(jQuery)
