// JavaScript Document

//following function is for equal column height for contentleft and sidebar

jQuery(document).ready(function($){
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$(document).ready(function() {
	equalHeight($(".column"));
});
});

//following function is for jquery menu hover on dashboard page

$(document).ready(function () {

  //get the default top value
  var top_val = $('#menu li a').css('top');

  //animate the selected menu item
  $('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});		

  $('#menu li').hover(
	  function () {
		  
		  //animate the menu item with 0 top value
		  $(this).children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});		
	  },
	  function () {

		  //set the position to default
		  $(this).children('a').stop().animate({top:top_val}, {easing: 'easeOutQuad', duration:500});		

		  //always keep the previously selected item in fixed position			
		  $('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:500});		
	  }		
  );

});
	
