// JavaScript Document dependent on jquery.js

/* Begin Ready Function */
$(document).ready(function() {

	/* TOP MENU FUNCTIONS */
	$("#first").hover(function(){
				$("#first").addClass("first");
				$("#menuBox").css("display", "block" );

		}, function() {
				$("#first").removeClass("first");
				$("#menuBox").css("display", "none" );
		});
	

	$("#second").hover(function(){
				$("#second").addClass("second");
				$("#menuBox").css("display", "block" );

		}, function() {
				$("#second").removeClass("second");
				$("#menuBox").css("display", "none" );
		});
	
		$("#menuBox").hover(function(){
				$("#menuBox").css("display", "block" );
				$("#second").addClass("second");
		}, function() {
				$("#menuBox").css("display", "none" );
				$("#second").removeClass("second");
		});


	$("#third").hover(function(){
				$("#third").addClass("third");
				$("#menuBox3").css("display", "block" );
				//$("#contentLeft").css("display", "none" );
				
		}, function() {
				$("#third").removeClass("third");
				$("#menuBox3").css("display", "none" );
				//$("#contentLeft").css("display", "block" );
		});
	
	$("#menuBox3").hover(function(){
				$("#menuBox3").css("display", "block" );
				$("#third").addClass("third");
		
		}, function() {
				$("#menuBox3").css("display", "none" );
				$("#third").removeClass("third");
				
		});

/*-----------*/
$("#fourth").hover(function(){
				$("#fourth").addClass("fourth");
				$("#menuBox4").css("display", "block" );
				//$("#contentLeft").css("display", "none" );
				
		}, function() {
				$("#fourth").removeClass("fourth");
				$("#menuBox4").css("display", "none" );
				//$("#contentLeft").css("display", "block" );
		});
	
	$("#menuBox4").hover(function(){
				$("#menuBox4").css("display", "block" );
				$("#fourth").addClass("fourth");
		
		}, function() {
				$("#menuBox4").css("display", "none" );
				$("#fourth").removeClass("fourth");
				
		});

	

 }); /* End Ready Function */

	
	
	
	function showSublinks() {
		document.getElementById('contentRightBottom').style.display='block';
	}
	
	function switchMenu() {
		document.getElementById('contentRightBottom').style.display='block';
		document.getElementById('contentRightBottomSubmenu').style.display='none';
	}

	function categoryLinks() {
		if(document.getElementById('contentRightBottom').style.display == 'block') {
		document.getElementById('contentRightBottom').style.display='none';
		document.getElementById('contentRightBottomSubmenu').style.display='block';
		}
	}
	
	function moreInfo() {
		if(document.getElementById('more1').style.display == 'block') {
		document.getElementById('more1').style.display='none';
		}else{
		document.getElementById('more1').style.display='block';
		}
	}
	function moreInfo2() {
		if(document.getElementById('more2').style.display == 'block') {
		document.getElementById('more2').style.display='none';
		}else{
		document.getElementById('more2').style.display='block';
		}
	}
	function moreInfo3() {
		if(document.getElementById('more3').style.display == 'block') {
		document.getElementById('more3').style.display='none';
		}else{
		document.getElementById('more3').style.display='block';
		}
	}
	

	oldTextAry = new Array();
	function changeText (fieldObj, newTexStr) {
		if (newTexStr == fieldObj.innerHTML) {
			fieldObj.innerHTML = oldTextAry[fieldObj.id];
			} else {
			oldTextAry[fieldObj.id] = fieldObj.innerHTML;
			fieldObj.innerHTML = newTexStr;
		}
	}
