		var theInt = null;
		var $crosslink, $navthumb;
		var curclicked = 0;

		theInterval = function(cur){
			clearInterval(theInt);
			
			if( typeof cur != 'undefined' )
				curclicked = cur;

			$crosslink.removeClass("active-thumb");
			$navthumb.eq(curclicked).addClass("active-thumb"); //.parent() removed
				$(".stripNav ul li a").eq(curclicked).trigger('click');

				for(var i = 1; i <= 5; i++)
				{
					if(i == (curclicked+1))
					{
						//styling now achieved with CSS
						//document.getElementById('img' + i).style.fontWeight = 'normal';
//						document.getElementById('img' + i).style.fontSize = '10px';
					}
					else
					{
						//styling now achieved with CSS
						//document.getElementById('img' + i).style.fontWeight = 'normal';
//						document.getElementById('img' + i).style.fontSize = '10px';
					}
				}
			
			theInt = setInterval(function(){
				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).addClass("active-thumb"); //.parent() removed
				$(".stripNav ul li a").eq(curclicked).trigger('click');

				for(var i = 1; i <= 5; i++)
				{
					if(i == (curclicked+1))
					{
						//styling now achieved with CSS
						//document.getElementById('img' + i).style.fontWeight = 'normal';
//						document.getElementById('img' + i).style.fontSize = '10px';
					}
					else
					{
						//styling now achieved with CSS
						//document.getElementById('img' + i).style.fontWeight = 'normal';
//						document.getElementById('img' + i).style.fontSize = '10px';
					}
				}

				curclicked++;
				if( 5 == curclicked )
					curclicked = 0;

			}, 5000);
		};
		
		$(function(){
			
			$("#main-photo-slider").codaSlider();
			
			//original .nav-thumb class changed to .slidenum
			$navthumb = $(".slidenum");
			$crosslink = $(".cross-link");
			
			$navthumb
			.click(function() {
				var $this = $(this);
				theInterval($this.attr('href').slice(1) - 1);
				return false;
			});
			
			theInterval();
		});

