$.rand = function (min, max) {
    if( max ) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    } else {
        return Math.floor(Math.random() * (min + 1));
    }
}

$(document).ready(function(){
	
	if ($('div#testimonialsRndm').length) {
		$('div#testimonialsRndm div').each(function () { $(this).hide(); });
		$('div#testimonialsRndm div').eq($.rand(0, $('div#testimonialsRndm div').length-1)).show();
	}

	    if ($('.slideshow').length) {
		$('.slideshow').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			timeout:  6000		
		});
		
	}
	
});
