$(document).ready(function() {

	//hover code

		$(".learnLink a.learnBox").hover(

			  function () {

				$(this).find("span.learnBtn").css("background", "#bde9ff");

				$(this).find("span.learnText").css("border", "0.1em solid #ccc");

			  }, 

			  function () {

				$(this).find("span.learnBtn").css("background", "#fff");

				$(this).find("span.learnText").css("border", "0.1em solid #fff");

				$("div#featuresAndSpec span.learnText").css("border", "0.1em solid #333");

			  }

		);

		

	//menu hover code

		$("#mainUl li").hover(

			  function () {

				var temp = $(this).find("a")[0];

				var isInsideSub = $(this).parent().hasClass('subMenu');

				if ((!$(temp).hasClass('contactMail')) && (!isInsideSub) && ($(this).find("a.current").length == 0)) {

					$(temp).css("background", "#bde9ff url('img/menu-bg.jpg') repeat-y 100% 0");

				}

				if (($(this).find("ul.subMenu").length > 0) && ($(this).find("a.current").length == 0)) {

					$(this).find("span.mainDesc").css("display", "none");

					$(this).find("ul.subMenu").css("display", "block");

					$(this).find("ul.subMenu").css("background", "#bde9ff url('img/menu-bg.jpg') repeat-y 100% 0");

				}

			  }, 

			  function () {

				var temp = $(this).find("a")[0];

				var isInsideSub = $(this).parent().hasClass('subMenu');

				if ((!$(temp).hasClass('contactMail')) && (!isInsideSub) && ($(this).find("a.current").length == 0)) {

					$(temp).css("background", "#fff");

				}

				if (($(this).find("ul.subMenu").length > 0) && ($(this).find("a.current").length == 0)) {

					$(this).find("span.mainDesc").css("display", "block");

					$(this).find("ul.subMenu").css("display", "none");

					$(this).find("ul.subMenu").css("background", "#fff");

				}

			  }

		);

		

	if ((jQuery.browser.msie) && (jQuery.browser.version == '6.0')) {	

		$(".arrowGrey-span").css("display", "none");

		$(".currentAsub .arrowGrey-span").css("display", "block");

		//$("#leftMenu ul#mainUl li a").css("overflow", "hidden");

		//$("#leftMenu ul#mainUl li a.current").css("overflow", "visible");

	}

	

	//sub menu hover code

		$(".subMenu li").hover(

			  function () {

				if ((jQuery.browser.msie) && (jQuery.browser.version == '6.0')) {

					$(this).find(".arrowGrey-span").css("display", "block");

				} else {

					$(this).find("img.arrowGrey").css("display", "block");

				}

			  }, 

			  function () {

				if ((jQuery.browser.msie) && (jQuery.browser.version == '6.0')) {

					if ($(this).find("a.currentAsub").length == 0) {

						$(this).find(".arrowGrey-span").css("display", "none");

					}

				} else {

					if ($(this).find("a.currentAsub").length == 0) {

						$(this).find("img.arrowGrey").css("display", "none");

					}

				}

			  }

		);

		

});
