  $(document).ready(function(){
	   $(function () {
			$('#content-scroll img').hide();//hide all the images on the page
		});
		


	  $("#content-slider").slider({
	    animate: true,
	    change: handleSliderChange,
	    slide: handleSliderSlide
	  });
	});

	function handleSliderChange(e, ui)
	{
	  var maxScroll = $("#content-scroll").attr("scrollWidth") - $("#content-scroll").width();
	  $("#content-scroll").animate({scrollLeft: ui.value * (maxScroll / 100) }, 1000);
	  
	}

	function handleSliderSlide(e, ui)
	{
	  var maxScroll = $("#content-scroll").attr("scrollWidth") - $("#content-scroll").width();
	  $("#content-scroll").attr({scrollLeft: ui.value * (maxScroll / 100) });
	  
	}

	var i = 0;//initialize
	var int=0;//Internet Explorer Fix
	$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
		var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
	});

	function doThis() {
		var images = $('#content-scroll img').length;//count the number of images on the page
		if (i >= images) {// Loop the images
			clearInterval(int);//When it reaches the last image the loop ends
		}
		$('img:hidden').eq(0).fadeIn(500);//fades in the hidden images one by one
		i++;//add 1 to the count
	}
