	
		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).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('mouseover');
			
			theInt = setInterval(function(){
				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('mouseover');
				curclicked++;
				if( 6 == curclicked )
					curclicked = 0;
				
			}, 600000);
		};
		
		$(function(){
			
			$("#main-photo-slider").codaSlider();
			
			$navthumb = $(".nav-thumb");
			$crosslink = $(".cross-link");
			
			$navthumb
			.mouseover(function() {
				var $this = $(this);
				theInterval($this.parent().attr('href').slice(1) - 1);
				return false;
			});
			
			theInterval();
		});



  function loadSearch() {
    var searchText = document.getElementById("search-textbox");
    var searchButton = document.getElementById("search-button");

      var el = document.getElementById("search-textbox");
        var helpText = "Search for 1,000's of Missouri items!";
    el.value = helpText;
    el.onfocus = function() {if (this.value == helpText) { el.value = "";}};
    el.onblur = function() {if (this.value == "") { el.value = helpText;}}



    searchText.onkeyup = function() {
      if (event.keyCode=='13') { searchButton.click();}
    };
    
    searchButton.onclick = function() {
      if (searchText.value != '') {
        window.location = '/search.aspx?find=' + encodeURIComponent(searchText.value).replace(/%20/g, '+');
        return false;
      }
    };
  }
  
  MC.addLoadEvent(loadSearch);

