// JavaScript Document
$(document).ready(function ()
		        {

				$("#market1_pict").css({opacity: 0});
				$("#market2_pict").css({opacity: 0});
				$("#market3_pict").css({opacity: 0});
				$("#market4_pict").css({opacity: 0});
				$("#market1_text").css({opacity: 0});
				$("#market2_text").css({opacity: 0});
				$("#market3_text").css({opacity: 0});
				$("#market4_text").css({opacity: 0});
				$("#market_text_infront").css({opacity: 0});


		                $('#nav1').mouseover(function()
		                        {
		                                $('#nav1').fadeTo("slow", 0);
		                        });
		                $('#nav1').mouseout(function()
		                        {
		                                $('#nav1').fadeTo("slow", 1.0);
		                        });
						$('#nav2').mouseover(function()
		                        {
		                                $('#nav2').fadeTo("slow", 0);
										$('#company_dd').animate( { opacity: 'show', height: 'show' }, 500 );
										if(nav2_timer) {
                        clearTimeout(nav2_timer);
                        nav2_timer = null
                }
		                        });
		                $('#nav2').mouseout(function()
		                        {
									nav2_timer = setTimeout(function () { $('#nav2').fadeTo("slow", 1.0);  $('#company_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 1000);
		                        });
						$('#company_dd span').mouseover(function()
		                        {
		                                if(nav2_timer) {
                        clearTimeout(nav2_timer);
                        nav2_timer = null
                }
		                        });
						$('#company_dd a').mouseover(function()
		                        {
		                               if(nav2_timer) {
                        clearTimeout(nav2_timer);
                        nav2_timer = null
                }
		                        });
		                $('#company_dd span').mouseout(function()
		                        {
									nav2_timer = setTimeout(function () { $('#nav2').fadeTo("slow", 1.0);  $('#company_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 500);
		                        });
						$('#nav3').mouseover(function()
		                        {
		                                $('#nav3').fadeTo("slow", 0);
										$('#markets_dd').animate( { opacity: 'show', height: 'show' }, 500 );
										if(nav3_timer) {
                        clearTimeout(nav3_timer);
                        nav3_timer = null
                }
		                        });
						$('#nav3').mouseout(function()
		                        {
									nav3_timer = setTimeout(function () { $('#nav3').fadeTo("slow", 1.0);  $('#markets_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 1000);
		                        });
						$('#markets_dd span').mouseover(function()
		                        {
		                                if(nav3_timer) {
                        clearTimeout(nav3_timer);
                        nav3_timer = null
                }
		                        });
						$('#markets_dd a').mouseover(function()
		                        {
		                               if(nav3_timer) {
                        clearTimeout(nav3_timer);
                        nav3_timer = null
                }
		                        });
		                $('#markets_dd span').mouseout(function()
		                        {
									nav3_timer = setTimeout(function () { $('#nav3').fadeTo("slow", 1.0);  $('#markets_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 500);
		                        });
						$('#nav4').mouseover(function()
		                        {
		                                $('#nav4').fadeTo("slow", 0);
										$('#contact_dd').animate( { opacity: 'show', height: 'show' }, 500 );
										if(nav4_timer) {
                        clearTimeout(nav4_timer);
                        nav4_timer = null
                }
		                        });
		               $('#nav4').mouseout(function()
		                        {
									nav4_timer = setTimeout(function () { $('#nav4').fadeTo("slow", 1.0);  $('#contact_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 1000);
		                        });
					   $('#contact_dd span').mouseover(function()
		                        {
		                                if(nav4_timer) {
                        clearTimeout(nav4_timer);
                        nav4_timer = null
                }
		                        });
						$('#contact_dd a').mouseover(function()
		                        {
		                               if(nav4_timer) {
                        clearTimeout(nav4_timer);
                        nav4_timer = null
                }
		                        });
		                $('#contact_dd span').mouseout(function()
		                        {
									nav4_timer = setTimeout(function () { $('#nav4').fadeTo("slow", 1.0);  $('#contact_dd').animate( { opacity: 'hide', height: 'hide' }, 500 ); }, 500);
		                        });
						$('#nav5').mouseover(function()
		                        {
		                                $('#nav5').fadeTo("slow", 0);
		                        });
		                $('#nav5').mouseout(function()
		                        {
		                                $('#nav5').fadeTo("slow", 1.0);
		                        });
						$('#nav5').click(function()
		                        {
		                                $('#dist_login_dd').animate( { opacity: 'show', height: 'show' }, 500 );
		                        });
						$('#login_close').click(function()
		                        {
		                                $('#dist_login_dd').animate( { opacity: 'hide', height: 'hide' }, 500 );
		                        });
						$('#nav6').mouseover(function()
		                        {
		                                $('#nav6').fadeTo("slow", 0);
		                        });
		                $('#nav6').mouseout(function()
		                        {
		                                $('#nav6').fadeTo("slow", 1.0);
		                        });
						$('#nav7').mouseover(function()
		                        {
		                                $('#nav7').fadeTo("slow", 0);
		                        });
		                $('#nav7').mouseout(function()
		                        {
		                                $('#nav7').fadeTo("slow", 1.0);
		                        });


						$('#market1').mouseover(function()
		                        {
		                        var htmlStr = $('#market1_text').html();
		                        $('#market_text_infront').html(htmlStr);
		                        $("#market_text_infront").css({opacity: 0});
								$('#market1_pict').fadeTo("normal", 1.0, function(){  $("#market1_pict").css({opacity: 0}); $('#market_behind_pict').attr("src","img/interface/golf_img.jpg"); $('#market_text_infront').fadeTo("normal", 1.0); });
								$('#market1').fadeTo("normal", 0);
		                        });
		                $('#market1').mouseout(function()
		                        {
		                                $('#market1').fadeTo("normal", 1.0);
		                        });
						$('#market2').mouseover(function()
		                        {
		                        var htmlStr = $('#market2_text').html();
								$('#market_text_infront').html(htmlStr);
		                        $("#market_text_infront").css({opacity: 0});
								$('#market2_pict').fadeTo("normal", 1.0, function(){  $("#market2_pict").css({opacity: 0}); $('#market_behind_pict').attr("src","img/interface/lawn_care_operator_img.jpg"); $('#market_text_infront').fadeTo("normal", 1.0); });
		                                $('#market2').fadeTo("normal", 0);
		                        });
		                $('#market2').mouseout(function()
		                        {
		                                $('#market2').fadeTo("normal", 1.0);
		                        });
						$('#market3').mouseover(function()
		                        {
		                        var htmlStr = $('#market3_text').html();
								$('#market_text_infront').html(htmlStr);
		                        $("#market_text_infront").css({opacity: 0});
								$('#market3_pict').fadeTo("normal", 1.0, function(){  $("#market3_pict").css({opacity: 0}); $('#market_behind_pict').attr("src","img/interface/sports_turf_img.jpg"); $('#market_text_infront').fadeTo("normal", 1.0); });
		                                $('#market3').fadeTo("normal", 0);
		                        });
		                $('#market3').mouseout(function()
		                        {
		                                $('#market3').fadeTo("normal", 1.0);
		                        });
						$('#market4').mouseover(function()
		                        {
		                        var htmlStr = $('#market4_text').html();
								$('#market_text_infront').html(htmlStr);
		                        $("#market_text_infront").css({opacity: 0});
								$('#market4_pict').fadeTo("normal", 1.0, function(){  $("#market4_pict").css({opacity: 0}); $('#market_behind_pict').attr("src","img/interface/homeowner_img.jpg"); $('#market_text_infront').fadeTo("normal", 1.0); });
		                                $('#market4').fadeTo("normal", 0);
		                        });
		                $('#market4').mouseout(function()
		                        {
		                                $('#market4').fadeTo("normal", 1.0);
		                        });
		});