
$("#solution-link").hover(
	function()
	{
		$("#solution-link").addClass("over");
		show_menu("solution-link", "solution");
	},
	function()
	{
		$("#solution-link").removeClass("over");
		$("#solution").hide();
	}
);

$("#solution").hover(
	function()
	{
		$("#solution-link").addClass("over");
		$("#solution").show();
	},
	function()
	{
		$("#solution-link").removeClass("over");
		$("#solution").hide();		
	}
);
/////////////////

$("#product-link").hover(
	function()
	{
		$("#product-link").addClass("over");
		show_menu("product-link", "product");
	},
	function()
	{
		$("#product-link").removeClass("over");
		$("#product").hide();
	}
);
////////////////////////
$("#product").hover(
	function()
	{
		$("#product-link").addClass("over");
		$("#product").show();
	},
	function()
	{
		$("#product-link").removeClass("over");
		$("#product").hide();		
	}
);



function init_front_image()
{
	var offset = $("#image-rover").offset();
	var top = offset.top + 220;
	var left = offset.left + 650;
	$("#thumb").css("top", top + "px");
	$("#thumb").css("left", left + "px");	
	for(i=1;i<=3;i++)
	{
		set_thumb_event(i);
	}
	$("#thumb").show();
}

function set_thumb_event(i)
{

		$("#thumb_"+i).hover(
			function()
			{
				if ($("#thumb_"+i).hasClass("current") === false)
				{
					$("#thumb_"+i).animate({
						"opacity": 1						
					}, 250);
				}
	
			},
			function()
			{
				if ($("#thumb_"+i).hasClass("current") === false)
				{				
					$("#thumb_"+i).animate({
						"opacity": 0.7
					}, 250);
				}
			}
		);
		
		$("#thumb_"+i).click(
			function()		
			{
				for(j=1;j<=3;j++)
				{
					if (i==j)
					{
						$(".main-image-"+j).fadeIn(600);
						$("#thumb_"+j).addClass("current");
					}
					else
					{
						$(".main-image-"+j).hide();
						$("#thumb_"+j).removeClass("current");
						if ($("#thumb_"+j).hasClass("current") === false)
						{				
							$("#thumb_"+j).animate({
								"opacity": 0.7
							}, 250);
						}												
					}
				}
			}
		);
		

	
	
}


function show_menu(tarid, showid)
{
	var offset = $("#"+tarid).offset();
	var top = offset.top + 30
	$("#"+showid).css("top", top + "px");
	$("#"+showid).css("left", offset.left + "px");
	$("#"+showid).show();
}