$(document).ready( function() {
    var textArray = [
        '"Since working with Tia Ribary & Associates my net income has increased by 20%!"  Barbara MacKay, North Star Facilitators',
        '"You are a lifesaver!!"   Kathie Nelson, Connectworks',
		'"And, I have more time for play, feel more organized and completely supported."  Barbara MacKay, North Star Facilitators',
        '"I find Tia and her Associates extremely professional, efficient and conscientious."  Barbara MacKay, North Star Facilitators',
        '"Bringing you into my work may be the smartest	 thing that I have done to date. ".  Gary Edwards, Dynamic Leadership',
        '"In the last three months we\'ve had three of our highest priorities come to fruition as a result of your ongoing support and consulting services." Brian Corekin, Monster Fuses',
        '"Tia\'s accuracy, high integrity and follow through are all reasons I recommend her to any business owner."  Kirsten Hope, KirstenHope.com',
		 '"Their work is accurate and they\'re a pleasure to work with. "  Barbara MacKay, North Star Facilitators',
        '"My stress level has dropped dramatically, and I have more time for those things that really matter."  Molly Davis, Matters That Matter'
    ];
    $('#text-content').loadText( textArray, 10000 ); // ( array, interval )
});
// custom jquery plugin loadText()
$.fn.loadText = function( textArray, interval ) {
    return this.each( function() {
        var obj = $(this);
        obj.fadeOut( 'slow', function() {
            obj.empty().html( random_array( textArray ) );
            obj.fadeIn( 'slow' );
        });
        timeOut = setTimeout( function(){ obj.loadText( textArray, interval )}, interval );
        // reload random text (if not animated) -- entirely optional, can be removed, along with the reload link above (<a href="javascript:;" id="text-reload"><em>randomize</em></a>)
        $("#text-reload").click( function(){
            if( !obj.is(':animated') ) { clearTimeout( timeOut ); obj.loadText( textArray, interval );} // animation check prevents "too much recursion" error in jQuery
        });
    });
}
//public function
function random_array( aArray ) {
    var rand = Math.floor( Math.random() * aArray.length + aArray.length );
    var randArray = aArray[ rand - aArray.length ];
    return randArray;
}
