JQuery and Java functions for Carousel.