(function(c){c.fn.rotatingGallery=function(a){c.extend({},c.fn.rotatingGallery.defaults,a);return this.each(function(){var b=c(this);b.currentPage=1;b.itemsPerPage=a.itemsPerPage;b.rotatingGalleryList=b.find("ul");b.rotatingGalleryItems=b.find("li");b.pageWidth=c(b.find("li")[0]).outerWidth(true)*b.itemsPerPage;b.rotatingGalleryItems_next=b.find(".jsRotatingGallery_next");b.rotatingGalleryItems_previous=b.find(".jsRotatingGallery_previous");b.numPages=Math.ceil(b.rotatingGalleryItems.length/b.itemsPerPage);
b.rotatingGalleryItems_next.click(function(a){a.preventDefault();c.fn.rotatingGallery.pageNext(b)});b.rotatingGalleryItems_previous.click(function(a){a.preventDefault();c.fn.rotatingGallery.pagePrevious(b)})})};c.fn.rotatingGallery.defaults={itemsPerPage:10};c.fn.rotatingGallery.pageNext=function(a){if(a.currentPage++>=a.numPages)a.currentPage=1;c(a.rotatingGalleryList).animate({left:(a.currentPage-1)*a.pageWidth*-1},1E3,function(){})};c.fn.rotatingGallery.pagePrevious=function(a){if(a.currentPage--<=
1)a.currentPage=a.numPages;c(a.rotatingGalleryList).animate({left:(a.currentPage-1)*a.pageWidth*-1},1E3,function(){})}})(jQuery);
