var theInt = null;
		var $crosslink, $navthumb;
		var curclicked = 0;
		
		theInterval = function(cur){
			clearInterval(theInt);
			
			if( typeof cur != 'undefined' )
				curclicked = cur;
			for(var i=0; i<4; i++){
				$navthumb.removeClass("active-thumb" + i);
			}
			$navthumb.eq(curclicked).addClass("active-thumb"+curclicked);
				$(".stripNav ul li a").eq(curclicked).trigger('click');
			
			theInt = setInterval(function(){
				for(var i=0; i<4; i++){
					$navthumb.removeClass("active-thumb" + i);
				}
				$navthumb.eq(curclicked).addClass("active-thumb"+curclicked);
				$(".stripNav ul li a").eq(curclicked).trigger('click');
				curclicked++;
				if( 4 == curclicked )
					curclicked = 0;
				
			}, 3000);
		};
		
		$(function(){
			
			$("#main-photo-slider").codaSlider();
			
			$navthumb = $(".nav-thumb");
			$bigimage = $(".big-image");
			
			$bigimage
			.click(function() {
				var $this = $(this);
				theInterval($this.attr('name').slice(1) - 1);
				return false;
			});
			
			theInterval();
		});
