((function(){var a,b=function(a,b){return function(){return a.apply(b,arguments)}};jQuery(function(){var b;b=$(".rotator");if(b.length)return b.each(function(){return new a($(this))})}),a=function(){function a(a){this.element=a,this.wait=b(this.wait,this),this.stopTimer=b(this.stopTimer,this),this.next=b(this.next,this),this.timer=null,this.timeBetweenRotate=8e3,this.wait()}return a.prototype.next=function(){var a,b,c;return this.stopTimer(),c=this.element,a=this.element.find("li:visible"),b=this.element.find("li:hidden:first"),b&&c.fadeOut("slow",function(){return b.show(),a.hide().detach().appendTo(c),c.fadeIn(2e3)}),this.wait()},a.prototype.stopTimer=function(){return clearTimeout(this.timer),this.timer=null},a.prototype.wait=function(){return this.timer=setTimeout(this.next,this.timeBetweenRotate)},a}()})).call(this);var StatisticsRotator={statistics:null,statsKeys:null,statsLabels:null,statsDiv:null,statIndex:0,timer:null,timeBetweenStats:7e3,fadeDuration:300,statsDivWidthInCols:12,cellSize:76,initialize:function(a){var b=this;this.statsDiv=$("#stats"),this.statistics=a;var c=function(){b.positionStatsDiv()};c(),$(window).resize(c),b.setKeys(),this.statsKeys.length>0&&(b.setLabels(),b.next())},hasValue:function(a){return a!="$0"&&a!="0"},setKeys:function(){var a=this,b=[];$.each(this.statistics,function(c,d){a.hasValue(d)&&b.push(c)}),this.statsKeys=b},getKey:function(a){return this.statsKeys[a]},setLabels:function(){var a={monthly_amount:"/assets/label-monthly-amount.png",monthly_apps:"/assets/label-monthly-apps.png",total_amount:"/assets/label-total-amount.png",total_apps:"/assets/label-total-apps.png",daily_amount:"/assets/label-daily-amount.png",daily_apps:"/assets/label-daily-apps.png"};this.statLabels=a},wait:function(){var a=this,b=function(){a.next()};this.timer=setTimeout(b,this.timeBetweenStats)},next:function(){clearTimeout(this.timer),this.timer=null,this.statsDiv.html(""),this.pickStatIndex(),this.buildRow(this.getStatValue(),this.getStatLabel()),this.animate(),this.wait()},positionStatsDiv:function(){var a=$("#photo-grid").innerWidth(),b=Math.floor((a-1)/this.cellSize),c=Math.floor((b-this.statsDivWidthInCols)/2)*this.cellSize;this.statsDiv.css({left:c})},pickStatIndex:function(){this.statIndex++,this.statIndex>=this.statsKeys.length&&(this.statIndex=0)},currentKey:function(){return this.getKey(this.statIndex)},getStatValue:function(){return this.statistics[this.currentKey()]},getStatLabel:function(){return this.statLabels[this.currentKey()]},buildRow:function(a,b){var c;if(this.hasValue(a)){for(var d=0;d<a.length;d++)c=a.charAt(d),this.buildDigit(c).appendTo(this.statsDiv);this.buildDescription().appendTo(this.statsDiv)}else this.next()},buildDigit:function(a){var b=$("<span />").text(a);return a=="$"&&b.addClass("dollar-sign"),b},buildDescription:function(){return $("<span />").css({backgroundImage:'url("'+this.getStatLabel()+'")'})},animate:function(){var a=$("#stats span").not(".description").toArray().reverse(),b=this.fadeDuration;$(a).filter(":eq(4), :eq(7), :eq(11)").addClass("comma"),$(a).css({opacity:0}).each(function(a){var c=a*b;$(this).delay(c).animate({opacity:1})})}},testimonialList=[[],[{},{text:"This phone call for me today was extremely difficult. My savings are gone; my family is gone; and I have nobody. [Your staff person] kept a really upbeat tone and tried to reassure me that she’ll do everything she can to get the application processed. It was more the tone of her voice, though. When things seem so bleak and you talk to someone who is so perky and upbeat and is trying to help you look for a silver lining&hellip; It is nice to talk to someone like that.",gender:"f"},{text:"I’ve never applied for any benefits and he made the process so easy. I was out of work for a long time and then started a part-time job. Within a month, I was laid off again. Your whole organization really scrambled to get everything I needed.",gender:"m"},{text:"In the past, I have felt that certain Customer Service Reps were not sensitive to my needs and provided the quickest and most convenient solution to my problems from their perspective. But not in this case. Her professional and courteous attitude, expert knowledge, and patience in handling my specific issues were very important to my complete customer satisfaction.",gender:"f"},{text:"I have to say this because I was getting ready to give myself a good cry because I missed the LIHEAP and I’ve been getting that for years. I wanted to go (to the County Assistance Office) but didn’t want to go by myself because sometimes I get dizzy&hellip; So then my phone rang and she was telling me all of the things that I could get; Food Stamps and stuff like that.",gender:"f"},{text:"I’m so amazed at how fast you work. Even after the application was submitted, people were calling me, making sure I was following through and getting this done. It’s like you all got together and said ‘We are going to help this woman’.",gender:"f"},{text:"I can’t wait to get back to work. I’m 51 years old and I’m not used to not working. People look at me like I’m taking advantage of the situation. I’m just trying to put food on the table. I really want to work. Hand me a shovel and I’ll use it.",gender:"m"},{text:"This is a time when people need help and are at their worst. We don’t want to ask for help. I’m really grateful that you understand that I’m not taking advantage of the situation. You don’t make me jump through hoops and don’t slam doors in my face.",gender:"m"},{text:"&hellip;my vacuum broke and my microwave oven. Everything is broken. I just felt so sorry for myself and thought maybe you people could help me for my drugs because I haven’t bought anything new for five years because of the drugs. I thank you kindly. I mean that very sincerely.",gender:"f"},{text:"I really appreciate all you’re doing. It’s tremendous the way that you extend yourselves.",gender:"m"},{text:"Your staff couldn’t be more friendly, compassionate, thorough, and intelligent. Thank goodness you’re doing this! Everyone I spoke to was so calm and had lovely manners. Look what you’re doing for me: this benefit amount is equivalent to my monthly mortgage payment.",gender:"f"},{text:"I worked my whole life and just fell on some bad luck. That’s when people need something like you guys. You have good attitudes and want to help. At times like this, it’s nice for someone to put their hand out and say ‘Can I help you up?’ A genuine person who really wants to help me? Holy cow! You guys are great and should feel good about what you do.",gender:"m"},{text:"It is so nice to talk to someone who is sincerely concerned. You guys make this so much easier and more pleasant.",gender:"m"},{text:"Are you serious? Oh my gosh! You don’t know how much that means to me. I’ve even been to the Salvation Army to try to get food. I’m just so thankful for that amount [in food stamps].",gender:"f"},{text:"I don’t even know how you found me! &hellip;I’m in shock and I can’t believe this. My bills are horrible. My husband died of Alzheimer’s and we both worked all of our lives. His Alzheimer’s treatment ate up all of our money. His drugs were over $600 a month. Just thinking that someone wants to help me makes me happy.",gender:"f"},{text:"I would like to say thank you to each and every one who helped me get Food Stamps that I so badly need&hellip; I have gone shopping twice and I am very surprised at how helpful food stamps are in supplementing the expense of going food shopping.",gender:"f"}],[{},{text:"You are a blessing for a lot of people. There are people like myself who need it; people who support their kids, grand kids, and their great-grand kid. So bless all of you with your nice personalities who have helped me.",gender:"f"},{text:"I was so shocked when I received your call. I was depressed and at the brink of an anxiety attack. I hung up and cried at first when you called because I was upset. In the past three weeks I’ve gone through three failed job interviews and I felt like a failure. None of us understand how we got into this predicament.",gender:"f"},{text:"I live alone and I’m not eating right. I haven’t been sleeping well or eating well. I try to juggle everything, you know? If I had Food Stamps I could use that money towards my water bill or the IRS.",gender:"m"},{text:"We need this so desperately. Thank you. My husband worked his whole life and we never, ever collected any kind of Food Stamps or prescription help&hellip; A lot of people are embarrassed and go without food and prescriptions. Thank you for reaching out to me.",gender:"f"},{text:"We’re in a different place financially now than we were many years ago. I’ve never had to ask for help from anybody and this was just magical. It’s brought some optimism back into a dark situation. I would be lost and overwhelmed without you.",gender:"m"},{text:"This is very much appreciated. Being 65, unemployed, disabled, and on my own it's a miracle just to be able to pay my rent each month. Thank you.",gender:"f"},{text:"Do you know that it got so bad that I was skipping my medicine to save. My Doctor gets mad and says there is no if’s, and’s or but’s – you have a heart condition and you must take your medicine. But I can’t afford it.",gender:"m"},{text:"Calling a 1-800 number doesn’t always result in a good conversation on the other end. I was pleasantly surprised when I called the Benefits Data Trust.",gender:"f"},{text:"What’s so good about it is you all reached out to me. I hadn’t gotten to this on my own because I hadn’t gotten to that point yet.",gender:"f"},{text:"I have $1 something in my checking account. For our 50th anniversary we couldn’t even go out and get a cheeseburger. You sit here at 81 and can’t even get an old cheeseburger&hellip;",gender:"m"},{text:"I called at 4:30, right after I got off work. A lot of people’s desks are cleared off at 4:30. He never once acted like he was in a hurry&hellip; By the time we finished the call, he was on his own time.",gender:"m"},{text:"I cried when I got my first Social Security check because I’m not accustomed to not working. You have done everything for me. The nature of who you all are is so special. You truly take care of people. Every one of you has a heart of gold.",gender:"f"},{text:"I wish to express appreciation for my being applied for the PACE program. It is a great benefit to many seniors and it doesn’t burden the taxpayers! For me, it makes not only this season brighter; but also, the seasons I have remaining.",gender:"m"},{text:"I have received my SNAP card and it is in effect. I was amazed. Within two weeks I got my card. I also got the PACE card. I did get my [rent] rebate check, too! You’ve been helpful with everything.",gender:"m"},{text:"I’m so glad you didn’t let me drop through the cracks. I would have. I was really, really scared. I’m so grateful.",gender:"f"}]],TestimonialRotator={testimonials:null,photoGrid:null,highlightedCell:null,highlightedCellImg:null,arrowBackground:null,arrowBorder:null,textBubble:null,gridWidth:0,numCols:0,photoBorder:1,cellSize:76,photoGridOffsetTop:130,arrowRelativeOffsetTop:10,leftSideArrowRelativeOffsetLeft:-27,rightSideArrowRelativeOffsetLeft:82,bubbleRelativeOffsetTop:-30,leftSideBubbleRelativeOffsetLeft:-326,rightSideBubbleRelativeOffsetLeft:99,bubbleBottomMax:370,row:0,col:0,rowMin:1,rowMax:2,colMin:1,colMax:0,middleCol:0,lastRow:0,lastCol:0,fadeDuration:1e3,fadeDelay:1250,timeBetweenTestimonies:18e3,timer:null,initialize:function(){var a=this;this.loadJSONFromList(),this.photoGrid=$("#photo-grid"),this.highlightedCell=$("#highlighted-cell"),this.highlightedCellImg=$("#highlighted-cell img"),this.arrowBackground=$("#arrow-background"),this.arrowBorder=$("#arrow-border"),this.textBubble=$("#text-bubble");var b=function(){a.calcGridWidth(),a.calcNumCols(),a.calcColMax(),a.calcMiddleCol()};b(),$(window).resize(b),a.next()},loadJSONFromList:function(){this.testimonials=testimonialList},wait:function(){var a=this,b=function(){a.next()};this.timer=setTimeout(b,this.timeBetweenTestimonies)},next:function(){clearTimeout(this.timer),this.timer=null,this.clearTestimonial(function(){this.pickCell(),this.positionHighlight(),this.showTextBubble(),this.wait()})},clearTestimonial:function(a){var b=this,c=a,d=function(){c.apply(b)};this.highlightedCellImg.fadeTo("slow",0),this.arrowBackground.fadeTo("slow",0),this.arrowBorder.fadeTo("slow",0),this.textBubble.fadeTo("slow",0,d)},pickCell:function(){do this.row=Math.floor(Math.random()*(this.rowMax-this.rowMin+1)+this.rowMin),this.col=Math.floor(Math.random()*(this.colMax-this.colMin+1)+this.colMin);while(this.row==this.lastRow&&this.col==this.lastCol);this.updateLast()},updateLast:function(){this.lastRow=this.row,this.lastCol=this.col},positionHighlight:function(){var a,b,c,d;b=this.photoGrid.offset().top+this.photoBorder+this.row*this.cellSize,a=this.photoGrid.offset().left+this.photoBorder+this.col*this.cellSize,c=-1*a,d=-1*b+this.photoGridOffsetTop-1;var e=c+"px "+d+"px";this.highlightedCellImg.css({backgroundPosition:e}),this.highlightedCell.show(),this.highlightedCellImg.fadeTo(this.fadeDuration,1),this.highlightedCell.offset({top:b,left:a})},showTextBubble:function(){var a,b,c,d,e,f,g,h,i=this.testimonials[this.row][this.col];a='<div id="testimonial">'+i.text+"</div>",i.sig&&(a+='<div id="sig">- '+i.sig+"</div>"),this.col>=this.middleCol?(this.arrowBackground.removeClass("right").addClass("left"),this.arrowBorder.removeClass("right").addClass("left"),d=this.highlightedCell.offset().left+this.leftSideBubbleRelativeOffsetLeft,b=this.highlightedCell.offset().left+this.leftSideArrowRelativeOffsetLeft,c=b+2):(this.arrowBackground.removeClass("left").addClass("right"),this.arrowBorder.removeClass("left").addClass("right"),d=this.highlightedCell.offset().left+this.rightSideBubbleRelativeOffsetLeft,b=this.highlightedCell.offset().left+this.rightSideArrowRelativeOffsetLeft,c=b-2),e=this.highlightedCell.offset().top+this.bubbleRelativeOffsetTop,arrowTop=this.highlightedCell.offset().top+this.arrowRelativeOffsetTop,this.textBubble.html(a),this.textBubble.show(),this.arrowBackground.show(),this.arrowBorder.show(),f=this.textBubble.height()+2,g=e+f,g>this.bubbleBottomMax&&(h=g-this.bubbleBottomMax,e-=h),this.textBubble.delay(this.fadeDelay).fadeTo(this.fadeDuration,1),this.textBubble.offset({top:e,left:d}),this.arrowBackground.delay(this.fadeDelay).fadeTo(this.fadeDuration,1),this.arrowBackground.offset({top:arrowTop,left:b}),this.arrowBorder.delay(this.fadeDelay).fadeTo(this.fadeDuration,1),this.arrowBorder.offset({top:arrowTop,left:c})},calcGridWidth:function(){this.gridWidth=this.photoGrid.innerWidth()},calcNumCols:function(){this.numCols=Math.floor((this.gridWidth-1)/this.cellSize)},calcColMax:function(){this.colMax=this.numCols-2},calcMiddleCol:function(){this.middleCol=Math.floor(this.numCols/2)}};$(document).ready(function(){$.getJSON("/features.json",function(a){StatisticsRotator.initialize(a)}),TestimonialRotator.initialize()})
