$(document).ready(function(){


	$('#thumbs-list').hover(
		function(){
			$("#greenbox-holder").show();
		},
		function(){
			$("#greenbox-holder").hide();
		}
	);

	$('#thumbs-list li').hoverIntent({
		sensitivity: 1,
		interval: 0,
		over: thumbOver,
		timeout: 0,
		out: thumbOut
	});
	
	function thumbOver() {
		$(this).append($("<div class='thumb-arrow'>&nbsp;</div>'"));
		$(this).siblings().append($("<div class='greenblock'></div>"));
		$(this).find("span").clone().appendTo($("#thumbs-list")).addClass("current-thumb-label");
		var tarGet = $(this).attr("id");
		$("#awards-list").find("."+tarGet).addClass("hover");
	};
	function thumbOut() {
		$(this).siblings().find("div:last").remove();
		$('.current-thumb-label').remove();
		$("#awards-list").find(".hover").removeClass("hover");
		$(".thumb-arrow").remove();
	};
	
	$('#awards-list li').hoverIntent({
		sensitivity: 1,
		interval: 0,
		over: awardOver,
		timeout: 0,
		out: awardOut
	});
	
	function awardOver() {
		var tarGet = $(this).attr("class");
		$(this).addClass("hover");
		$("#"+tarGet).append($("<div class='thumb-arrow'>&nbsp;</div>'"));
		$("#"+tarGet).find("span").clone().appendTo($("#thumbs-list")).addClass("current-thumb-label");
		$("#"+tarGet).siblings().append($("<div class='greenblock'></div>"));
	};
	function awardOut() {
		$(this).removeClass("hover");
		var tarGet = $(this).attr("class");
		$("#"+tarGet).siblings().find("div:last").remove();
		$('.current-thumb-label').remove();
		$(".thumb-arrow").remove();
	};

});
