	//change css for IE

 	if (!jQuery.browser.msie) {

		var head = $("head");	

		$(head).append("<link rel='stylesheet' href='css/content.css' type='text/css' media='screen, projection' /><link rel='stylesheet' href='css/print.css' type='text/css' media='print' />");

	} 

	

$(document).ready(function() {
		
		$(".main_menu ul li a").hover(

			function () {

				$(this).css('background-color','#680e2b'); 

				if ($(this).parent().prev().find('a').hasClass('active')){

					//if prev active

					$(this).parent().css('background', 'url("images/red-slash.gif") no-repeat 0 100%');

					$(this).parent().next().css('background', 'url(images/top-red.gif) no-repeat 0 100%');

				} else {

					if ($(this).parent().next().find('a').hasClass('active')){

						//if next active

						$(this).parent().css('background', 'url("images/down-red.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/red-slash.gif") no-repeat 0 100%');

					} else {

						//if middle is active

						$(this).parent().css('background', 'url("images/down-red.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/top-red.gif") no-repeat 0 100%');

					}

				}
				
			}, 

		    function () {

				if (!$(this).hasClass('active')){

					//if not active

					$(this).css('background-color','#000'); 

					if ($(this).parent().next().find('a').hasClass('active')){

						//if next active

						$(this).parent().css('background', 'url("images/slash.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/down-red.gif") no-repeat 0 100%');

					} else {

						if ($(this).parent().prev().find('a').hasClass('active')){

							//if prev active

							$(this).parent().css('background', 'url("images/top-red.gif") no-repeat 0 100%');

							$(this).parent().next().css('background', 'url("images/slash.gif") no-repeat 0 100%');

						} else {

							//if middle is active

							$(this).parent().css('background', 'url("images/slash.gif") no-repeat 0 100%');

							$(this).parent().next().css('background', 'url("images/slash.gif") no-repeat 0 100%');

						}

					}
					

				} else {

					//is active

					$(this).parent().css('background', 'url("images/down-red.gif") no-repeat 0 100%');

					$(this).parent().next().css('background', 'url("images/top-red.gif") no-repeat 0 100%');
					
					$(this).css('background-color','#680e2b');

					//$(this).parent().next().css('background', 'url(../images/slash.gif) no-repeat 0 100%');

				}

			}

	    );

		/*------------------------------------------*/
		
		$(".sub_menu ul li a").hover(

			function () {

				$(this).css('background-color','#333');

				if ($(this).parent().prev().find('a').hasClass('sub_act')){

					//if prev active

					$(this).parent().css('background', 'url("images/sub-grey.gif") no-repeat 0 100%');

					$(this).parent().next().css('background', 'url(images/sub-down-red.gif) no-repeat 0 100%');

				} else {

					if ($(this).parent().next().find('a').hasClass('sub_act')){

						//if next active

						$(this).parent().css('background', 'url("images/sub-down-grey.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/sub-grey.gif") no-repeat 0 100%');

					} else {

						//if middle is active

						$(this).parent().css('background', 'url("images/sub-down-grey.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/sub-down-red.gif") no-repeat 0 100%');

					}

				}
				
			}, 

		    function () {

				if (!$(this).hasClass('sub_act')){

					//if not active

					$(this).css('background-color','#7A1132'); 

					if ($(this).parent().next().find('a').hasClass('sub_act')){

						//if next active

						$(this).parent().css('background', 'url("images/sub-red.gif") no-repeat 0 100%');

						$(this).parent().next().css('background', 'url("images/sub-down-grey.gif") no-repeat 0 100%');

					} else {

						if ($(this).parent().prev().find('a').hasClass('sub_act')){

							//if prev active

							$(this).parent().css('background', 'url("images/sub-down-red.gif") no-repeat 0 100%');

							$(this).parent().next().css('background', 'url("images/sub-red.gif") no-repeat 0 100%');

						} else {

							//if middle is active

							$(this).parent().css('background', 'url("images/sub-red.gif") no-repeat 0 100%');

							$(this).parent().next().css('background', 'url("images/sub-red.gif") no-repeat 0 100%');

						}

					}
					

				} else {

					//is active

					$(this).css('background-color','#333');

					$(this).parent().css('background', 'url("images/sub-down-grey.gif") no-repeat 0 100%');

					$(this).parent().next().css('background', 'url("images/sub-down-red.gif") no-repeat 0 100%');
				
				}

			}

	    );

		/*------------------------------------------*/
		
		$(".main_menu ul li a").each(function(){

			if ($(this).hasClass("active")) {

				$(this).css('background-color','#680e2b');

				$(this).parent().css('background', 'url("images/down-red.gif") no-repeat 0 100%');

				$(this).parent().next().css('background', 'url("images/top-red.gif") no-repeat 0 100%');

			}

		});

});	