// JavaScript Document
var gallery1 = new Array("images/company1.gif","images/company2.gif","images/company3.gif");

var gallery2 = new Array("images/products1.gif","images/products2.gif","images/products3.gif","images/products4.gif","images/products5.gif","images/products6.gif","images/products7.gif","images/products8.gif");

//var gallery3 = new Array("images/autosp1.gif","images/autosp2.gif","images/autosp3.gif","images/autosp4.gif");

//var gallery4 = new Array("images/displays1.gif","images/displays2.gif");

//var gallery5 = new Array("images/video1.gif","images/video2.gif","images/video3.gif","images/video4.gif");

var mouseout_gallery=new Array();
	mouseout_gallery[1]="images/company0.gif";
	mouseout_gallery[2]="images/products0.gif";
	//mouseout_gallery[3]="images/autosp1.gif";
	//mouseout_gallery[4]="images/displays1.gif";
	//mouseout_gallery[5]="images/video1.gif";
	
$(document).ready(function() {
	
		$(".dropmenudiv_d").bind('mouseover', function(){
			var id=$(this).attr("id");
			var ext_char=id.charAt(8);
		
		$("#" +id+ " a").bind('mouseout', function(){	
			$("#image" + ext_char).attr("src", eval("mouseout_gallery[" +ext_char+ "]"));									  
		});	
		
		$("#" +id+" a:nth-child(2)").bind('mouseover', function(){																
			$("#image" +ext_char).attr("src",eval("gallery" +	ext_char+"[0]"));
		});
		$("#" +id+" a:nth-child(3)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[1]"));
		});
		$("#" +id+" a:nth-child(4)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[2]"));
		});
			$("#" +id+" a:nth-child(5)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[3]"));
		});
		$("#" +id+" a:nth-child(6)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[4]"));
		});
		$("#" +id+" a:nth-child(7)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[5]"));
		});
		
		$("#" +id+" a:nth-child(8)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[6]"));
		});
		
		$("#" +id+" a:nth-child(9)").bind('mouseover', function(){
			$("#image"+ext_char).attr("src",eval("gallery" +	ext_char+"[7]"));
		});
		
	});		
});