
 $(document).ready( function() {

 	$("#explore-thumbs li").append("<b></b>");
	
	$("#explore-thumbs li b").css({ backgroundColor:"black", opacity:"0.5" });

	$("#explore-thumbs li.selected b").hide();
 

 	$("#explore-thumbs li").hover(
      function () {
        $(this).not(".selected").find("b").hide();
      }, 
      function () {
        $(this).not(".selected").find("b").show();
      }
    );
	
	
 	$("#explore-thumbs li a").click(function () { 
	
		var imgSrc = $(this).attr("href");

		$("#hero").attr("src", imgSrc);
		
		$("#explore-thumbs li.selected").find("b").show();
		$("#explore-thumbs li").removeClass("selected");
		
		
		$(this).parent().addClass("selected");
		$(this).find("b").hide();
				
		return false;	
	});

 	$("#go-right").click(function () {
		var $cur = $("#explore-thumbs li.selected");
		
		var $next = $cur.next('li');
		if( $next.length != 0 ) {
			var imgSrc = $next.find("a").attr("href");
			$("#hero").attr("src", imgSrc);
		
			$cur.find("b").show();
			$cur.removeClass("selected");
		
			$next.find("b").hide();
			$next.addClass("selected");
		}
		return false;
	}); 

	$("#go-left").click(function () {
		var $cur = $("#explore-thumbs li.selected");
		
		var $prev = $cur.prev('li');
		if( $prev.length != 0 ) {
			var imgSrc = $prev.find("a").attr("href");
			$("#hero").attr("src", imgSrc);
		
			$cur.find("b").show();
			$cur.removeClass("selected");
		
			$prev.find("b").hide();
			$prev.addClass("selected");
		}
		return false;
	}); 




 
});