var sofi={init:function(){var self=this;self.layout.init();self.quotes.init();},layout:{dom:{},init:function(){var self=this;self.dom.window=$(window);self.dom.fill=$("#fill");self.dom.body=$("#body");self.dom.wrap=$("#wrap");$(window).resize(function(){self.layout();}).resize();window.setTimeout(function(){self.dom.window.resize();},100);$("#navi > li").each(function(){$(this).width($(this).find("> a").width());});},layout:function(){var self=this;var x=(self.dom.window.width()-930)/2;if(x<0)x=0;self.dom.body.css({paddingRight:Math.ceil(x)});var w=Math.floor(x);self.dom.fill.width(w);self.dom.wrap.css({marginLeft:w});}},quotes:{dom:{},total:0,step:-1,init:function(){var self=this;self.dom.quotes=$("ul.quotes li");self.total=self.dom.quotes.length;self.next();if(self.total>1){window.setInterval(function(){self.next();},10000);}},next:function(){var self=this;if(self.step>=0){self.dom.quotes.eq(self.step).fadeOut(2000);}
self.step++;if(self.step==self.total){self.step=0;}
self.dom.quotes.eq(self.step).fadeIn(2000);}}};$(document).ready(function(){sofi.init();});
