//File added by raj for offset height adjustment of fly-out submenu
$(document).ready(function(){ 
	$("#catrootmenu ul li ul li").css({'margin-left' : '8px'});
	$("#catrootmenu ul li").hover(function() {
		var wind_curr_height = $(window).height();
		var top_pos			 = parseInt($(this).position().top, 10);
		var scrollTop	 	 = $(window).scrollTop(); 
		var	child_height	 =	parseInt($(this).children('ul').height(), 10);
		var pop_final_top	 =	parseInt(child_height, 10)+ parseInt(top_pos, 10); 
		if ((top_pos+child_height) > wind_curr_height-250){
			final_top	=	-$(this).children('ul').height()+12; 
			$(this).children('ul').css({'top' : final_top}); 
		} 
	}); 
}); 
 
