    $(document).ready(function(){  
	
//HOME PAGE NAV DROPDOWNS
	
	    $("#services_home").hover(function(){
			$("#nav a").css("color","#ffffff");
			$(this).css("color","#ffcc33");
			$(".sub-nav").hide();  
            $("#sub-nav-services").show();  
        });  
		$("#incentives_home").hover(function(){
			$("#nav a").css("color","#ffffff");
			$(this).css("color","#ffcc33");
			$(".sub-nav").hide();  
            $("#sub-nav-incentives").show();  
        });    
		$(".nosub_home").hover(function(){
			$("#nav a").css("color","#ffffff");
			$(".sub-nav").hide();   
        });
		
//MAIN PAGE NAV IMAGE ROLLOVERS
		
		$(function() {
			$("#page_nav a img").hover(function() {
    		$(this).attr("src", $(this).attr("src").split("s.png").join("s_on.png"));
  		}, function() {
    		$(this).attr("src", $(this).attr("src").split("s_on.png").join("s.png"));
  		});
		});
		
//MAIN PAGE NAV DROPDOWNS
		
		$("#services_nav").hover(function(){
			$(".page_sub-nav").hide();  
            $("#page_sub-nav-services").show();  
        });  
		$("#incentives_nav").hover(function(){
			$(".page_sub-nav").hide();  
            $("#page_sub-nav-incentives").show();  
        });   
		$("#benefits_nav").hover(function(){
			$(".page_sub-nav").hide();   
        });   
		$("#process_nav").hover(function(){
			$(".page_sub-nav").hide();   
        });   
		
//KEEP ACTIVE ITEM WHEN ROLLING OVER CORRESPONDING SUBMENU
		
		$("#page_sub-nav-services").hover(function(){ 
		 	$("#services_nav img").attr("src", $("#services_nav img").attr("src").split("s.png").join("s_on.png"));
		}, function(){ 
		 	$("#services_nav img").attr("src", $("#services_nav img").attr("src").split("s_on.png").join("s.png"));
		}); 
		
		$("#page_sub-nav-incentives").hover(function(){ 
		 	$("#incentives_nav img").attr("src", $("#incentives_nav img").attr("src").split("s.png").join("s_on.png"));
		}, function(){ 
		 	$("#incentives_nav img").attr("src", $("#incentives_nav img").attr("src").split("s_on.png").join("s.png"));
		});  
		
		$("#page_sub-nav-projects").hover(function(){ 
		 	$("#projects_nav img").attr("src", $("#projects_nav img").attr("src").split("s.png").join("s_on.png"));
		}, function(){ 
		 	$("#projects_nav img").attr("src", $("#projects_nav img").attr("src").split("s_on.png").join("s.png"));
		}); 
		
		
//KEEP CURRENT PAGE MENU ACTIVE WHEN ROLLING OFF OF MENU
		
		var crntPage = window.location;
		
		$("#page_content , #header , #sidebar").mouseover(function(){
			if (crntPage == "http://saveyourgreen.ca/services/" || crntPage == "http://saveyourgreen.ca/services/energy-audits/" || crntPage == "http://saveyourgreen.ca/services/energy-efficiency-retrofits/" || crntPage == "http://saveyourgreen.ca/solar-generation/") {
				$(".page_sub-nav").hide();  
				$("#services_nav img").attr("src", $("#services_nav img").attr("src").split("s.png").join("s_on.png"));
			} else if (crntPage == "http://saveyourgreen.ca/incentives/" || crntPage == "http://saveyourgreen.ca/incentives/saveonenergy/" || crntPage == "http://saveyourgreen.ca/incentives/fit-program/") {
				$(".page_sub-nav").hide();  
				$("#incentives_nav img").attr("src", $("#incentives_nav img").attr("src").split("s.png").join("s_on.png"));
			} else if (crntPage == "http://saveyourgreen.ca/benefits/") {
				$(".page_sub-nav").hide();  
				$("#benefits_nav img").attr("src", $("#benefits_nav img").attr("src").split("s.png").join("s_on.png"));
			} else if (crntPage == "http://saveyourgreen.ca/process/") {
				$(".page_sub-nav").hide();  
				$("#process_nav img").attr("src", $("#process_nav img").attr("src").split("s.png").join("s_on.png"));
			} else if (crntPage == "http://saveyourgreen.ca/about-us/" || crntPage == "http://saveyourgreen.ca/links/" || crntPage == "http://saveyourgreen.ca/contact-us/" || crntPage == "http://saveyourgreen.ca/careers/") {
				$(".page_sub-nav").hide();
			} else if (crntPage == "http://saveyourgreen.ca/syg-program/") {
				$(".page_sub-nav").hide();
				$("#syg_nav img").attr("src", $("#syg_nav img").attr("src").split("s.png").join("s_on.png"));
			}
        });  
		
//RETURN ACTIVE PAGE MENU ITEM TO INACTIVE WHILE ROLLING OVER OTHER MENU ITEMS
		
		$("#incentives_nav, #benefits_nav, #process_nav, #syg_nav").mouseover(function(){ 
			if (crntPage == "http://saveyourgreen.ca/services/" || crntPage == "http://saveyourgreen.ca/services/energy-audits/" || crntPage == "http://saveyourgreen.ca/services/energy-efficiency-retrofits/" || crntPage == "http://saveyourgreen.ca/services/solar-generation/") {
		 		$("#services_nav img").attr("src", $("#services_nav img").attr("src").split("s_on.png").join("s.png"));
			} 
		}); 
		$("#services_nav, #benefits_nav, #process_nav, #syg_nav").mouseover(function(){ 
			if (crntPage == "http://saveyourgreen.ca/incentives/" || crntPage == "http://saveyourgreen.ca/incentives/saveonenergy/" || crntPage == "http://saveyourgreen.ca/incentives/fit-program/") {
				$("#incentives_nav img").attr("src", $("#incentives_nav img").attr("src").split("s_on.png").join("s.png"));
			}
		});
		$("#services_nav, #incentives_nav, #process_nav, #syg_nav").mouseover(function(){ 
			if (crntPage == "http://saveyourgreen.ca/benefits/") {
				$("#benefits_nav img").attr("src", $("#benefits_nav img").attr("src").split("s_on.png").join("s.png"));
			}
		});
		$("#services_nav, #incentives_nav, #benefits_nav, #syg_nav").mouseover(function(){ 
			if (crntPage == "http://saveyourgreen.ca/process/") {
				$("#process_nav img").attr("src", $("#process_nav img").attr("src").split("s_on.png").join("s.png"));
			}
		});
		$("#services_nav, #incentives_nav, #benefits_nav, #process_nav").mouseover(function(){ 
			if (crntPage == "http://saveyourgreen.ca/syg-program/") {
				$("#syg_nav img").attr("src", $("#syg_nav img").attr("src").split("s_on.png").join("s.png"));
			}
		});
		

		
		
		
		
    });  
