//(function($) {
	function configurescroller(){
		
		//Get size of the image, how many images there are, then determin the size of the image reel.
		var scrollerWidth = $("#scroller").width();
		var containerSize = $(".container_reel > div").size();
		
		var containerReelWidth = scrollerWidth  * containerSize;

		//Adjust the image reel to its new size
		$(".container_reel").css({'width' : containerReelWidth});
		
		//Paging  and Slider Function
		rotate = function(){
			var triggerID = $active.attr("rel") - 1; //Get number of times to slide
			var container_reelPosition = triggerID * scrollerWidth ; //Determines the distance the image reel needs to slide
			$("#navigate_rotator > ul > li > div").removeClass('currentslide').addClass('normalslide'); //Remove all active class
			$("#navigate_rotator li").attr("active","0");
			
			$active.attr('active','1');
			$("#navigate_rotator > ul > li:eq(" + triggerID + ") > div").removeClass('normalslide').addClass('currentslide');
			//Slider Animation
			$(".container_reel").animate({
				left: -container_reelPosition
			}, 500 );
		}; 
		
		//Rotation  and Timing Event
		rotateSwitch = function(){
			play = setInterval(function(){ //Set timer - this will repeat itself every 7 seconds
				$active = $('#navigate_rotator li[active="1"]').closest('li').next(); //Move to the next paging
				if ( $active.length === 0) { //If paging reaches the end...
					$active = $('#navigate_rotator li:first'); //go back to first
				}
				rotate(); //Trigger the paging and slider function
			}, 8000); //Timer speed in milliseconds (5 seconds)
		};
		
		rotateSwitch(); //Run function on launch
		
		$(".container_reel > div").hover(function() {
			clearInterval(play); //Stop the rotation
		}, function() {
			rotateSwitch(); //Resume rotation timer
		});	
		
		//On Click
		$("#navigate_rotator li").click(function() {
			$active = $(this); //Activate the clicked paging
			//Reset Timer
			clearInterval(play); //Stop the rotation
			rotate(); //Trigger rotation immediately
			rotateSwitch(); // Resume rotation timer
			return false; //Prevent browser jump to link anchor
		});
	}
//})(jQuery);

