var GLB={timer:8000,texttimer:8000}
var SLD={init:function(){setInterval("SLD.slideSwitch()",GLB.timer);},slideSwitch:function(){$(".allButtons").css("opacity","0.0");var $active=$('#mainImage DIV.active');var $active2=$('#hero DIV.active');if($active.length==0&&$active2.length==0){$active=$('#mainImage DIV:last');$active2=$('#hero DIV:last');}
var $next=$active.next().length?$active.next():$('#mainImage DIV:first');var $next2=$active2.next().length?$active2.next():$('#hero DIV:first');$active.addClass('last-active');$active2.addClass('last-active');$next.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active.removeClass('active last-active');});$next2.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active2.removeClass('active last-active');});$next.addClass('active');$next2.addClass('active');$active.removeClass('active');$active2.removeClass('active');},homePgInit:function(arrayObj){setInterval('SLD.homePgSwitch()',5000);},showImage:function(imgStr,xpos,ypos,lnk,call){SLD.changePostion(xpos,ypos);SLD.changeCallToAction(lnk,call);},changeBackground:function(img){$('#mainImage').css({'background':'url('+img+') no-repeat 0 0',opacity:0.0}).animate({opacity:1},5000,function(){});},changePostion:function(xpos,ypos){$('#hero DIV').css({'left':xpos,'top':ypos})},changeCallToAction:function(lnk,call){var htmlStr='<h2 class="pink-button"><a href="'+lnk+'">> '+call+'</a></h2><h2 class="green-button"><a href="/donate">> Donate to Housing Works</a></h2>'
$('#hero DIV').html(htmlStr);}}
