$(function () {
	//DropDown Menu
	$('#nav li').hover(
	function () {
			$('ul.drop', this).show();
	}, function () {
			$('ul.drop', this).hide();
	});
	//DropDown Menu On
	$('ul.drop').each(function () {
			var parentImg = $(this).parent().find('img');
			var parentOf = parentImg.attr('src');
			var parentOn = parentOf.replace('_off.', '_on.');
			$(this).hover(
			function () {
					parentImg.attr('src', parentOn);
			}, function () {
					parentImg.attr('src', parentOf);
			});
	});

	// Rollover
	$('img,:image').each(function () {
			var ofSrc = $(this).attr('src');
			var ovSrc = ofSrc.replace('_off.', '_on.');
			$(this).hover(function () {
					$(this).attr('src', ovSrc);
			}, function () {
					$(this).attr('src', ofSrc);
			});
	});
});


function Showsubmenu(id){
	document.getElementById(id).style.display='block';
}

function Hiddensubmenu(id){
	document.getElementById(id).style.display='none';
}

$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
