	// Run when document is loaded
	$(function(){
		// Horizontal Slider
		horizontalSlider();
	});
	
	// Horizontal Slider
		function horizontalSlider(){
			// Settings
			var wait 				= 3; 	// seconds
			var teller				= 0;	// Startpunt
			var firstrun			= true	// Firstrun

			// Declare
			var width = $('#horizontal-slide').width();
			var numberOfItems = $('#horizontal-slide-inner').find('.horizontal-slide-inner-item').size();
			var totalwidth = width * numberOfItems;
			$('#horizontal-slide-inner').css('width',totalwidth);

			// run horizontalSlider
			var cycleTimeout = setTimeout(function(){ runHorizontalSlider(wait,width,totalwidth,numberOfItems,teller,firstrun) }, wait*1000);
		}

		function runHorizontalSlider(wait,width,totalwidth,numberOfItems,teller,firstrun){
			teller++;
			var newLeft = teller * width;
			firstrun = false;
				if(teller==numberOfItems){
					newLeft = 0;
					teller = 0;
					$('#horizontal-slide-inner').animate({"left": "0px"},'slow',"swing");
				}else{
					$('#horizontal-slide-inner').animate({"left": "-="+width+"px"},'slow',"swing");
				}

			console.log(teller);
			var cycleTimeout = setTimeout(function(){ runHorizontalSlider(wait,width,totalwidth,numberOfItems,teller,firstrun) }, wait*1000);
		}
