function positionFooter(){
	/*
		if($(window).height() > 700){
			$("#footer").css({position:"absolute",top:($(window).scrollTop()+$(window).height()-$("#footer").height())+"px"})
		}	
		*/
	}
 


$(document).ready(function(){


		positionFooter(); 
		$(window).scroll(positionFooter).resize(positionFooter);

		
	//	$("ul[id!='current'].select li[id!='current']").css('opacity',0.7);
	//	$(".b_select").css('opacity',1);
	//	$("ul[id!='current'].select li span.white_sx").css('opacity',0.9);
	//	$("ul[id!='current'].select li span.white_dx").css('opacity',0.9);
		

	 $(".nav ul.sub").hide();



	
	$("ul.select li a.a_select").hover(function() { //Hover over event on list item
		$(this).find("span.green_sx").show();
    	$(this).find("span.white_sx").hide();
    	$(this).find("span.green_dx").show();
    	$(this).find("span.white_dx").hide(); 
    	
    	$(this).css("background-image", "url('img/menu_green_centro.png')");
		$(this).css("background-repeat", "repeat-x");
		$(this).css("color", "#FFF"); 
		
	//	$(this).parent().css('opacity',1);
		
		//$("ul[id!='current'].select li").css('opacity',1);
		//$("ul[id!='current'].select li span.white_sx").css('opacity',1);
		//$("ul[id!='current'].select li span.white_dx").css('opacity',S);
    	
	}, function () {
	 

   	 
		
		
		if ($(this).parent().find("ul.sub").is(':visible')) {
    	$(this).find("span.green_sx").show();
    	$(this).find("span.white_sx").hide();
		
    	$(this).find("span.green_dx").show();
    	$(this).find("span.white_dx").hide();
    	$(this).css("background-image", "url('img/menu_green_centro.png')");
		$(this).css("background-repeat", "repeat-x");
		$(this).css("color", "#FFF"); 
		
    		} if ($(this).parent().find("ul.sub").is(':hidden')) {
    	$(this).find("span.white_sx").show();
    	$(this).find("span.green_sx").hide();
    	$(this).find("span.white_dx").show();
    	$(this).find("span.green_dx").hide();
	//	$(this).parent().css('opacity',0.7);
    	$(this).css("background-image", "url('img/menu_white_centro.png')");
		$(this).css("background-repeat", "repeat-x");
		$(this).css("color", "#8f8f8f");
    		
    		}

	});
	
	$("ul.select li a.a_select").bind('click',function() {
	//	$("ul.select li[class!='b_select']").css("opacity",0.7);
	$("ul.sub").hide();	
//	$(this).parent().css("opacity", 1);
//	$(this).css('opacity',1);
		$("a.a_select span.white_sx").show();
    	$("a.a_select span.green_sx").hide();
    	$("a.a_select span.white_dx").show();
    	$("a.a_select span.green_dx").hide();
        $("a.a_select").css("background-image", "url('img/menu_white_centro.png')");
		$("a.a_select").css("background-repeat", "repeat-x");
		$("a.a_select").css("color", "#8f8f8f");
	//	$("a.a_select").css('opacity',0.7);
//	$(this).parent().parent().css("opacity", 1);
		
		/*
	$("ul[id='current'].select a.a_select span.white_sx").hide();
   	$("ul[id='current'].select a.a_select span.green_sx").show();
   	$("ul[id='current'].select a.a_select span.white_dx").hide();
   	$("ul[id='current'].select a.a_select span.green_dx").show();
    $("ul[id='current'].select a.a_select").css("background-image", "url('img/menu_green_centro.png')");
	$("ul[id='current'].select a.a_select").css("background-repeat", "repeat-x");
	$("ul[id='current'].select a.a_select").css("color", "#8f8f8f");
	*/
		
    
	$(this).parent().find("ul.sub").fadeIn("slow");
    	$(this).find("span.green_sx").show();
    	$(this).find("span.white_sx").hide();
    	$(this).find("span.green_dx").show();
    	$(this).find("span.white_dx").hide();
	 	$(this).css("background-image", "url('img/menu_green_centro.png')");
		$(this).css("background-repeat", "repeat-x");
		$(this).css("color", "#FFF"); 
		//$(this).parent().css('opacity',0.7);
	});
	
	/*
	$("ul.select[id='current'] li a.a_select").bind('mouseout',function() {
		if($(this).css("background-image") != 'url("http://localhost:8888/grc/img/menu_green_centro.png")')
		{
			$(this).css("background-image",'url("img/menu_green_centro.png")');
			$(this).find("span.green_sx").show();
    		$(this).find("span.white_sx").hide();
    		$(this).find("span.green_dx").show();
    		$(this).find("span.white_dx").hide();
			$(this).parent().css("opacity", 0.7); 
		}
		});
	*/
	

	$("ul.select[id!='current'] li a.a_select").bind('mouseout',function() {
	//	if($(this).css("background-image") != 'url("http://localhost:8888/grc/img/menu_green_centro.png")')
	//		 $(this).parent().css("opacity", 0.7); 
	//	$(this).css("background-image", "url('img/menddddu_white_centro.png')");
		/*
	$(this).parent().find("ul.sub").hide();
	$("ul.select[id='current']").find("ul.sub").show();
	
	$("ul[id='current'].select li span.green_sx").show();
	
    $("ul[id='current'].select li span.white_sx").hide();
    $("ul[id='current'].select li span.green_dx").show();
    $("ul[id='current'].select li span.white_dx").hide();
	
	$("ul[id='current'].select li a.a_select").css("background-image", "url('img/menu_green_centro.png')");
	$("ul[id='current'].select li a.a_select").css("background-repeat", "repeat-x");
	$("ul[id='current'].select li a.a_select").css("color", "#FFF"); 
	$("ul[id='current'] li").css("opacity",1);
	$(this).parent().css("opacity", 0.7); 
	
    	$(this).find("span.green_sx").hide();
    	$(this).find("span.white_sx").show();
    	$(this).find("span.green_dx").hide();
    	$(this).find("span.white_dx").show();
	 	$(this).css("background-image", "url('img/menu_white_centro.png')");
		$(this).css("background-repeat", "repeat-x");
		$(this).css("color", "#8f8f8f"); 
	*/
	
	});
	
	
	
	
    	$("ul#current li a.a_select").find("span.green_sx").show();
    	$("ul#current li a.a_select").find("span.white_sx").hide();
    	$("ul#current li a.a_select").find("span.green_dx").show();
    	$("ul#current li a.a_select").find("span.white_dx").hide();
    	$("ul#current li a.a_select").css("background-image", "url('img/menu_green_centro.png')");
		$("ul#current li a.a_select").css("background-repeat", "repeat-x");
		$("ul#current li a.a_select").css("color", "#FFF"); 
		
		$("ul#current").find("ul.sub a[id=current_sub]").css("color", "#FFF"); 
		$("ul#current").find("ul.sub").fadeIn("slow");
    });
    
	
    
