function Slide ( sNum, sSrc, sHref, sCap ) { var myBlock = 'shape' + sNum; this.sBlock = $(myBlock); this.sNum = sNum; this.sSrc = sSrc; this.sHref = sHref; this.sCap = sCap; } var setSlides = function () { var slide1 = new Slide (1, "/admin/images/uploaded/index/1318426177photo1.jpg", "/projects/outreach.html", "

So much of what Uganda Hands for Hope does relies on our fabulous staff.  From our nursery teachers to our Community Outreach Team to our long- and short-term volunteers, our programmes would not be possible without them!

"); var slide2 = new Slide (2, "/admin/images/uploaded/index/1318836407P1000867.JPG", "/volunteer/index.html", "

We have had many donations brought in recently, and as it is rainy season, the wellies we recently distributed were of great help to many families.  We are still looking for rain boots and umbrellas for our staff!

"); var slide3 = new Slide (3, "/admin/images/uploaded/index/1318426960photo2.jpg", "/projects/distributions.html", "

We have had many volunteers come over this past summer and they have contributed so much to our programmes--from sorting donations, to launching livelihood projects, to organising HIV Day, to helping with the Holiday Programme, to painting the library.  Camber, Jen, Ryan and Emily, Christina, Amy, Adam, D and Lauren, Libby and Hannah, and Isabelle: thank you for all your hard work!

"); var slide4 = new Slide (4, "/admin/images/uploaded/index/1318836566DSC04215.JPG", "/projects/distributions.html", "

We have recently launched a candle-making project for some of our older Afternoon Programme children.  They have been busy making three types of candles for sales both for stores, and for our visitors.  Remember to check them out when you come by!

"); var slide5 = new Slide (5, "/admin/images/uploaded/index/1318937072DSCN0802.JPG", "/engage/sponsor.html", "

We are in urgent need of new sponsors for our new nursery class.  Without new sponsors, children like this one will not be able to attend school.  If you or someone you know are interested in sponsoring a child, contact info@onlinehope.org.  Thanks for your support!

"); var slides = Array(slide1, slide2, slide3, slide4, slide5); return slides; }; var startRotator = function (mySlides) { var index = 0; var totalPics = mySlides.length; var rotator = function() { index = (index + 1)%totalPics; changeSlide(mySlides[index]); }; rotator.periodical(6000); }; var setColorEvents = function (myBox) { if (myBox != null) { var myImg = myBox.getElement('img'); if (myImg != null) { setGrayEvent(myImg); } } }; var setBoxEvent = function (mySlide) { if (mySlide.sBlock != null) { var el = mySlide.sBlock; el.setStyle('cursor', 'pointer'); el.addEvents('click', function () { alert('click'); changeSlide(mySlide); }); } }; var showTW = function () { $('facebook').setStyle('display', 'none'); $('twitter').setStyle('display', 'block'); }; var showFB = function () { $('twitter').setStyle('display', 'none'); $('facebook').setStyle('display', 'block'); }; var changeSlide = function (mySlide) { var myGif = '/images/box' + mySlide.sNum + '.gif'; $('rotate1').fade('out'); (function () { $('rotate1').set('src', mySlide.sSrc); $('rotate_num').set('src', myGif); $('trans_boxF').set('html', mySlide.sCap); $('feature_link').set('href', mySlide.sHref); }).delay(500); (function () { $('rotate1').fade('in'); }).delay(600); return false; } window.addEvent('domready', function() { var mySlides = setSlides(); mySlides.each( function (el) { setBoxEvent(el); }); startRotator(mySlides); setBoxEvent($('shape1'), mySlides[1]); setBoxEvent($('shape2'), mySlides[2]); setBoxEvent($('shape3'), mySlides[3]); setBoxEvent($('shape4'), mySlides[4]); setBoxEvent($('shape5'), mySlides[5]); setColorEvents($('box1')); setColorEvents($('box2')); setColorEvents($('box3')); setColorEvents($('box4')); var myBox = $('box4'); myBox.addEvents({ 'mouseenter': function () { $('trans_box4').tween('height', 100); }, 'mouseleave': function () { $('trans_box4').tween('height', 0); } }); });