// JavaScript Document
var $j = jQuery.noConflict();

$j(document).ready(function(){
							

	//change last item color
	$j("ul.menu_header li a:last  ").css("background","none");
	


	//Add class for each li  $('ul#root').children('li');
	$j("#menu ul > li").not("#menu ul > li > ul > li").each(function(i) {
		$j(this).addClass("c"+(i+1));
	 })
	



	//height boxes
	equalHeight($j(".equalHeight"));


	//add image to titles Home Center Left Boxes
	$j(".homeCenterLeft h4").append('<span class="homeLeftArrow"> </span>');


	$j(".menu_sidebar li li.active li a").append('<span class="homeSidetArrow"> </span>');

	//funtion close menu other_ways
	$j("ul.menu_others").mouseleave(function(){	   
		$j(this).slideToggle("slow");
	});
	//funtion open menu other_ways
	$j("a#otherPrograms").click(function(){
		$j("ul.menu_others").slideToggle("slow");
	});		
	$j("ul.menu_others").append('<div id="closeOtherWays"></div>');


	//list rotator	controller	home right
	$j('ul#rotatorNews').quote_rotator({
                buttons: { next: ' ', previous: ' ' }
     });		
	
	
	
	
	
});



//Equal Heights
function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $j(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

