// JavaScript Document - used for category and sub-category layers display 
  
$(document).ready(function(){
var count=1;
// $("a").easyTooltip();		// for tooltips
 });

$(document).ready(function(){
  $("#navmenu-h li,#navmenu-v li").hover(
    function() { $(this).addClass("iehover"); },
    function() { $(this).removeClass("iehover"); }
  );
});

$(document).ready(function(){

$(".btn-slide").hover(function(){
		var pp = $("#mainnav");
		var position_cat = pp.position();		
		$("#menu-vertical").css("top",position_cat.top+29);
		$("#menu-vertical").css("left",position_cat.left);
		$("#menu-vertical").css("z-index",9999);
		$("#menu-vertical").show("slow");
		$(this).toggleClass("active");
//		$("#btn_cat").attr("src","images/btn_channels_click.gif", count++ % 2 == 1);			
		});

$().mousemove(function(ee){
//      This function closes all layers if user is outside of menu area...
//		Menu area is defined rougly by size of biggest elements...
//		updated Oct. 27. - no close on bottom position - changed horizontal menus with vertical...
		var x = ee.pageX;
		var y = ee.pageY;	
		var l = $('#menu-vertical').position().left;
		var r = l+650;
		if((y <77 || x < l || x > r)) {
//		console.log("X is: %d  Y is %d Container L %d  Container R", x, y, l, r);
		$("#menu-vertical").hide("slow"); 			 //  - category panel layers
		};
}); 
});

