$(document).ready(function() {

        $('#slider').anythingSlider({
				startStopped    : false, // If autoPlay is on, this can force it to start stopped
				width           : 480,   // Override the default CSS width
				easing          : 'easeInOutBack',
				autoPlay		: true,
				stopAtEnd       : false,
				delay			: 5000,
				autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
//				resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
				onSlideComplete : function(slider){
					// alert('Welcome to Slide #' + slider.currentPage);
				},
				onShowStop : function(e, slider){
					setTimeout(function(){
						if (slider.currentPage === slider.pages) { slider.gotoPage(1); }
					}, 4000);
				}
			});
    
});