//---------------------------------------------------------------
// jQuery for BPA HOME page
// Luann Ebert, May 7, 2011
// ltebert@comcast.net
//

$(document).ready(function(){

	//---------------------------------------------------------------
	// functions for home page slide show. automatic rotation of very 
	// large images on home page
		
	// create the image rotator
    setInterval("rotateimages()", 3600);

});
// end document ready function



//---------------------------------------------------------------
	// for homepage slideshow

    function rotateimages() {
            var oCurPhoto = $('#photo_show div.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0)
                oNxtPhoto = $('#photo_show div:first');

            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
	}



